-- Truncate the log by changing the database recovery model to SIMPLE.
ALTER DATABASE YourDBName
SET RECOVERY SIMPLE;
GO
-- Shrink the truncated log file to 1 MB.
DBCC SHRINKFILE (YourDBName_Log, 1);
GO
-- Reset the database recovery model.
ALTER DATABASE YourDBName
SET RECOVERY FULL;
Thursday, December 10, 2009
Truncate database log file
at 11:41 PM
Labels: SQL Server, SQL Server Tip
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment