Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
bridge
Yak Posting Veteran
93 Posts |
Posted - 2005-09-27 : 04:02:26
|
| If there are 100+ tables in the database, then which way would be good for incremental export (All tables have identity column as PK)? Approach 1Introduce a table that may contain the MAX value and the Primary key like 10000 and Customer_ID which is the name of the primary key of Cust table. Initially the table will be containing all the PKs and value as 0. The select statement will pick all the columns where PK value > column value in the increment start table and PK = PK value in the increment start table. And export the data into the .txt file.Approach 2Introduce an intermediary database with the same schema and increment start table. Similar scripts will run and populate the tables in this database. But the difference is only the database will be backed up and sent to the remote site where after restore the new records will be inserted. Rather than to have 100+ files.Please give me suggestions which approach will be good. |
|
|
|
|
|