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 2005 Forums
 SSIS and Import/Export (2005)
 Log Size Balloons during import, bigger then table

Author  Topic 

Will H
Yak Posting Veteran

56 Posts

Posted - 2008-02-25 : 18:36:26
I'm importing about 15 million rows of data from an access file to an MSSQL database. Some of the fields in the Access file are of DataType "text". The destination fields in the SQL DB are of type varchar(50), and none of the text fields in the access file actually use anything other then English characters. I put in a "data conversion" item to handle the switch from "text" (which usually trys conversion to nvarchar by default) to varchar.

The import works, and the resulting table ends up weighing about 1.2 gigs. HOWEVER, the log itself is a crazy 7-8 gigs heavy. I have no idea why the log size bloats this much. I can backup/shrink later in the package, but this 8 gig could easily push the hard drive over its limit at some point before completion and I'm looking for a better alternative.

Database is on "simple" recovery mode. The combined size of the db, before the operation, log + data, is maybe around 5 meg.

Incidentally, I tried with out the intermediate data conversion step, and a similar thing happened - log finishes up about 7 gig, table is 1.2

Seems ridiculous that the log should grow faster then the table. Any ideas why??

---------------------------------------------------------
SSRS Kills Kittens.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-02-25 : 18:40:51
Commit the changes in smaller batches.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page
   

- Advertisement -