Flushing Transaction Logs and Recovering Space in SQL

by Joe Havelick 4. March 2008 09:24

The following script will truncate eveything from the SQL transaction log, and shrink the file.

--Truncate the Transcation log
BACKUP LOG DatabaseName WITH NO_LOG
---Shrink the physical file with 10% reserve
DBCC SHRINKDATABASE (DatabaseName, 10)

Tags:

Tech Tips

Comments (1) -

3/30/2009 9:25:30 AM #

addison

I realize this is an old entry.  

Would you recommend backing up the log prior to running this script?  I have an ~19GB log file that I would like to perform this on.

Regards

addison United States |

Comments are closed

About Me

Joe Havelick is a reasonable facsimile of this photo.


profile for Joe on Stack Exchange, a network of free, community-driven Q&A sites

Recommendations