Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update statement for 8,000,000 rows - bypass the Log?
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
00799187
Message ID:
00799287
Vues:
24
What about doing the update in batches? Put the database in Simple Recovery mode and then do the updates in batches of 1000 (or something like it) in a loop. Periodically, issue a CHECKPOINT within the loop to cause SQL Server to truncate the log. Afterwards, put the database back into Full Recovery mode and do a full backup.

-Mike

>Hi,
>
>I have to do an update statement changing the value in one field for 8,000,000 rows in a table. This always fills-up my transaction log - how can I do this without hitting the transaction log?
>
>Thanks.
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform