How to find the log file used space in SQL Server
Check the log size in percentage across all databases using the following SQL query:
DBCC SQLPERF(LOGSPACE)
The result of the query provides details about the log space used by different databases. Below is an example of how the output might look:
Database Name Log Size (MB) Log Space Used (%) Status ----------------------------------------------------------- master 1.992188 43.52941 0 tempdb 15.99219 2.393747 0 model 7.992188 18.23069 0 msdb 28.80469 7.770545 0
This output shows the log size and the percentage of space used for each database. The data is useful for monitoring and maintaining the health of your SQL Server databases.