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.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Importing into parallel tables?

Author  Topic 

timmy
Master Smack Fu Yak Hacker

1242 Posts

Posted - 2008-07-20 : 21:01:31
Hi all,

I haven't been round 'ere for a while but I have a question to ask. We have a series of large reference tables (>40 million rows) that are repopulated weekly from a text file using a DTS package. The problem is that the loading takes several hours and we'd ideally like to still have access to last weeks data while this weeks load is happening. We don't have the luxury of loading during the night because the source data is normally made available Monday morning.
We are trialling a new setup where we load into a separate set of tables, dropping the existing ones and renaming but this is frought with danger. I'm concerned that we will have processes or queries that will die once the tables are dropped.

Any advice/suggestions would be appreciated.

Cheers,

Tim

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-07-20 : 21:12:18
Load the data into staging tables and then use T-SQL (INSERT INTO/SELECT) to move it into the actual tables. In the actual tables, you'll have last week's data in them already.

You should either run a full defrag on these tables or update statistics after the import is done.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

timmy
Master Smack Fu Yak Hacker

1242 Posts

Posted - 2008-07-20 : 21:16:41
Thanks Tara, but there will be a significant delay between the truncating and re-loading of the data. I was hoping to keep the changeover as short as possible

Cheers,

Tim
Go to Top of Page
   

- Advertisement -