SQL Server Transaction Log Space Usage
Need to find out the amount of free space in your transaction log file on Microsoft SQL Server? Run the following command:
DBCC SQLPERF ( LOGSPACE )
It will tell you the percentage of transaction log space used, and the size of the transaction log file, which you then use to calculate the amount of free space in the transaction log or the amount of space in use.
The Result of the
DBCC SQLPERF (LOGSPACE) query is the following columns
Database Name, Log Size (MB), Log Space Used, Status. If there is a lot of FREE space in the transaction log, and you the file is too big you can shrink the size of the transaction log by running:
DBCC SHRINKFILE ( DBFILENAME_Log )
Like this? Follow me ↯Tweet Follow @pfreitag
SQL Server Transaction Log Space Usage was first published on August 31, 2007.