dbTalk Databases Forums  

How to Choose Method to Transfer Data from Production to Reporting database

microsoft.public.sqlserver.datawarehouse microsoft.public.sqlserver.datawarehouse


Discuss How to Choose Method to Transfer Data from Production to Reporting database in the microsoft.public.sqlserver.datawarehouse forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Resant
 
Posts: n/a

Default How to Choose Method to Transfer Data from Production to Reporting database - 07-06-2005 , 09:04 PM






My current project now is how to synchronize (data transfer) between
Production Database & Reporting Database using DTS, but I have no idea
how to do it and using which the best method. Need to know, that two
database have different structure tables - of course - and have a
thousand records inside, and our transaction working 24 hours, so
that's imposible to delete all records at Reporting Database and
replace with new data. The method that I've considered now is :

Quote:
Give flag field at all Production tables
- 0 : haven't transfered at all
- 1 : the record have been modified
- 2 : have transfered to Reporting database

So I only need delete all records at Reporting Services which match
record at Production have flag 1, and then transfered all records that
have flag 0 and 1.
But the weakness of my method is how to synchronize for deleted
records? Should I save the primary key of deleted records, or is there
any other method?
Please give me suggestion/comment for my method.

Thanks



Reply With Quote
  #2  
Old   
JT
 
Posts: n/a

Default Re: How to Choose Method to Transfer Data from Production to Reporting database - 07-07-2005 , 09:15 AM






To determine what records have been deleted from MyTable in the Reporting
Database, you can left join MyTable from the Reporting Database (RD) back to
the Production Database (PD) on the primary key (pkey) and select
RD.MyTable.pkey where PD.Mytable.pkey is null.

Now, to delete these records from the Reporting version of MyTable:

delete from RD.MyTable where pkey in (the above subquery)

"Resant" <resant_v (AT) yahoo (DOT) com> wrote

Quote:
My current project now is how to synchronize (data transfer) between
Production Database & Reporting Database using DTS, but I have no idea
how to do it and using which the best method. Need to know, that two
database have different structure tables - of course - and have a
thousand records inside, and our transaction working 24 hours, so
that's imposible to delete all records at Reporting Database and
replace with new data. The method that I've considered now is :

Give flag field at all Production tables
- 0 : haven't transfered at all
- 1 : the record have been modified
- 2 : have transfered to Reporting database

So I only need delete all records at Reporting Services which match
record at Production have flag 1, and then transfered all records that
have flag 0 and 1.
But the weakness of my method is how to synchronize for deleted
records? Should I save the primary key of deleted records, or is there
any other method?
Please give me suggestion/comment for my method.

Thanks




Reply With Quote
  #3  
Old   
Resant
 
Posts: n/a

Default Re: How to Choose Method to Transfer Data from Production to Reporting database - 07-07-2005 , 08:05 PM



I understand what you mean, but I've hundred records, so using that
query, I think is still have slow performance.


Reply With Quote
  #4  
Old   
JT
 
Posts: n/a

Default Re: How to Choose Method to Transfer Data from Production to Reporting database - 07-08-2005 , 08:04 AM



Actually, I would expect the query portion to run within a few seconds, if
the two tables are joined using an indexed column.

"Resant" <resant_v (AT) yahoo (DOT) com> wrote

Quote:
I understand what you mean, but I've hundred records, so using that
query, I think is still have slow performance.




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.