Sunday, March 9, 2008

How do you delete all records from the file that has 1 million records when the transaction log is full

Use Truncate instead of this is a minimally logged operation,there may be just enough
space in the transaction log to do the operation.truncate log only the datapage de-allocation not the deletion
of individual is not a non-logged operation

1 comment:

Shashi Thakur said...

One of the easiest method is to delete existing log file.

Steps :

Detach database,
Stop SQL Services,
Delete or rename ldf file,
Start SQLl Services,
Attach database.

This will automatically create a new blank ldf file. Now you can do whatever you want to do :)