|
Posted by Simon Hayes on 09/06/05 14:32
You can't stop MSSQL using the log, but you can break a single DELETE
into multiple batches (see example below). If you back up the
transaction log from time to time during the batch delete (or put the
database in single user mode first), this should keep the log size
under control. It would probably be a good idea to try it out on a test
system first, and also make a full backup before starting, just in case
something goes wrong.
Simon
set rowcount 50000 -- or whatever
delete from dbo.MyTable
where ...
while @@rowcount > 0
delete from dbo.MyTable
where ...
set rowcount 0
Navigation:
[Reply to this message]
|