Friday, August 7, 2009

SQL Server - Transaction Logs Full

The transaction log is the part of the database to which the SQL Server writes all transactions before writing them to the database.
To verify the percentage of SQL transaction log space being used, run the following command
DBCC SQLPERF(LOGSPACE)
In case Transaction Log becomes full, when use one of  the following commands
BACKUP LOG DatabaseName WITH TRUNCATE_ONLY
For Example BACKUP LOG test WITH TRUNCATE_ONLY

DBCC SHRINKFILE(TransactionLogName, 1)
For Example DBCC SHRINKFILE(test_Log, 1)

For more details about log full

1 comment: