Monday, June 2, 2014

The transaction log for database 'sampledb' is full. To find out why space in the log cannot be reused, see the log_reuse_wait

Execute following commands to shrink logs -

ALTER DATABASE sampledb
SET RECOVERY SIMPLE;
GO

DBCC SHRINKFILE (sampledb_log, 1);
GO
sp_helpdb sampledb
GO
ALTER DATABASE sampledb
SET RECOVERY FULL
GO

Note : Shrinking of log file will not work if recovery mode is set to 'FULL'.

No comments:

Post a Comment