21 Nov 2005

Physically Shrinking An SQL Server 2000 DB's Transaction Log File

Had a big old transaction log (LDF) file that I wanted to cut down to size after backup.

This was quick (but very dirty):

  1. Set Recovery mode to "Simple" in DB Properties > Options.
  2. Ran a CHECKPOINT command in Query Analyser
  3. Ran a DBCC SHRINKDATABASE() command in Query Analyser

No comments:

Post a Comment

Comments are very welcome but are moderated to prevent spam.

If I helped you out today, you can buy me a beer below. Cheers!