Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems with log and delete
Message
From
08/04/2003 17:36:01
 
 
To
08/04/2003 12:58:04
Victor Chigne
Inteliventas
Peru
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
00775148
Message ID:
00775260
Views:
22
You don't have a lot of options really. As Roman said, if you're dumping the entire table, use TRUNCATE TABLE.

If you not, changing the Recovery model to SIMPLE will help matters a little bit. SQL Server will still log the deletes but will remove the entries when a CHECKPOINT occurs. You could setup a script that would delete the rows in a loop, doing 1000 (or whatever) at a time. Using SET ROWCOUNT. Periodically, issue the CHECKPOINT command to cause SQL Server to truncate the log.

After you're done, you can set the recovery model back to FULL and do a database backup.

-Mike

>Dear sirs:
>
>I have to delete at least 1 and a half million rows of one table in my data base, the problem is that my log file grows to much in the process. Is there a way to stop the log while the delete is going on?
>
>Thank you in advance
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Previous
Reply
Map
View

Click here to load this message in the networking platform