--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);')