SQL Server - Force Database Log File Shrink

by Administrator 6. October 2009 20:51

 

USE DATABASENAME
GO
DBCC SHRINKFILE(LOGNAME, 1)
BACKUP LOG DATABASENAME WITH TRUNCATE_ONLY
DBCC SHRINKFILE(LOGNAME, 1)


Buy Me a Beer ?

If you've found this site useful, you could help support its running costs by either checking out the adverts on the page if you find anything that interests you - or by making a small donation