Friday, December 30, 2011

To Shrink or Compress the DB file or DB log




USE DatabaseName

GO
DBCC SHRINKFILE(, 1)
BACKUP LOG WITH TRUNCATE_ONLY
DBCC SHRINKFILE(, 1)
GO



Note:- Provide the Database name and the TransactionLogName within single quotes

No comments:

There was an error in this gadget