How to monitor Transaction log in SQL server using DBCC SQLPERF Logspace?

Опубликовано: 31 Март 2026
на канале: Jagpal Singh
451
11

--Here’s an example of loading the LOGSPACE data into a table, and getting a useful result:

If not exists(select * from sys.tables where name = 't_logspace')
CREATE TABLE t_logspace
( [dbname] sysname
, logSizeMB float
, logSpaceUsedPct float
, Status int);

INSERT INTO t_logspace
EXEC ('DBCC SQLPERF(LOGSPACE);')--Here’s an example of loading the LOGSPACE data into a table, and getting a useful result:

If not exists(select * from sys.tables where name = 't_logspace')
CREATE TABLE t_logspace
( [dbname] sysname
, logSizeMB float
, logSpaceUsedPct float
, Status int);

INSERT INTO t_logspace
EXEC ('DBCC SQLPERF(LOGSPACE);')