Find Transaction Log Space Used

To query the space used by the transaction logs use the command, use DBCC SQLPERF(LOGSPACE). The command displays the Database Name, Log Size in Mega Bytes, the % of  log file used, remember the value is not the size it is the percentage used from the actual space of the log files. The results displayed is for all databases on the SQL Server instance.

Find the script below…


Monitoring transaction log files for the free space is a one of the very important tasks for a DBA.

Do you like this site? Like our FB page @\LearnSQLWithBru so that, you know when there is a new blog post.

— Bru Medishetty

Leave a Reply