![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello, I have created a DTS package for importing about 4 million rows of data in to SQL2K database daily. The problem is that transaction log file bloats to 10-15 GB during update/delete phase. Lets say I have two tables "tblDTSTemp" and "tblData" DTS Package first must empty "tblDTSTemp" by executing "DELETE FROM tblDTSTemp". I'm sure there is a better way to flush data from tables (table truncating?) but for example sake how do I delete rows and periodically shrink transaction log (about every 10,000 rows)? Same problem with update, my DTS package executes following query after data has been loaded from text file in to tblDTSTemp "INSERT INTO tblDATA ([Hash], [Date], [Val1], [Val2]) VALUES (SELECT [Hash], [Date], [Val1], [Val2] FROM tblDTSTemp WHERE [Hash] Not IN (SELECT [Hash] FROM tblDATA )" The actual syntax is deferent but for simplicity sake I shortened it. I appreciate any suggestions. |
![]() |
| Thread Tools | |
| Display Modes | |
| |