To Shrink Db Log file in Sql Server 2008
USE DatabaseName
GO
DBCC SHRINKFILE(<TransactionLogName>, 1)
BACKUP LOG <DatabaseName> WITH TRUNCATE_ONLY
DBCC SHRINKFILE(<TransactionLogName>, 1)
GO
Example
Use Emp
GO
DBCC SHRINKFILE(Emp_Log, 1)
BACKUP LOG Emp WITH TRUNCATE_ONLY
DBCC SHRINKFILE(Emp_Log, 1)
GO
No comments:
Post a Comment