![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi there I have created a DTS package which; Drops a table Creates it again Copies data from a text file into the table (simply using the 'copy column' transformation) However, my transaction log fills up, and I get an error - 'log file for database XXXX is full' etc. I am already looking into ways to reduce logging (from other posts) but is there a better way to get the data into the table, to minimize the writing to the transaction log? Would it be better to use bcp or BULK INSERT? (or is this what the DTS package uses anyway?) I don't need each insert into the table logging, but I do want to roll back the whole package if the insert fails. i.e. I want to be able to roll back the 'drop table'. I would be very grateful for any suggestions. Thanks, Lewis |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
Thanks very much for the promp reply Allan. I will try to use batches. When you say "set the recovery model of your DB to simple" - how do I do this? I am using SQL Server 7. Thanks again Lewis Veale lewisdotvealeatpdms.com www.pdms.com *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#5
| |||
| |||
|
#6
| |||
| |||
|
|
Excellent! It worked. Thanks Allen Would I be right in thinking that those two executions of sp_dboption are equivalent to ticking the 'Truncate log on checkpoint' and 'Select into/bulk copy' boxes, on the Options tab of the Database Props screen? Should I leave the database like this, or set either/both of these to 'false' once the import is complete? Thanks again. It is much appreciated. Lewis Veale lewisdotvealeatpdms.com www.pdms.com *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#7
| |||
| |||
|
#8
| |||
| |||
|
#9
| |||
| |||
|
|
One more thing.... Is EXEC SP_DBOPTION 'NHS_Car_Leasing', 'select into/bulkcopy', 'true' the same as EXEC sp_dboption 'name of database','select','true' ? Lewis Veale lewisdotvealeatpdms.com www.pdms.com *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#10
| |||
| |||
|
|
One more thing.... Is EXEC SP_DBOPTION 'NHS_Car_Leasing', 'select into/bulkcopy', 'true' the same as EXEC sp_dboption 'name of database','select','true' ? Lewis Veale lewisdotvealeatpdms.com www.pdms.com *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
![]() |
| Thread Tools | |
| Display Modes | |
| |