Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problems with log and delete
Message
De
08/04/2003 17:36:01
 
 
À
08/04/2003 12:58:04
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
00775148
Message ID:
00775260
Vues:
21
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform