notebook/IT/SQL/SCRIPTS SQL QSA ORSYS/Demo mise en table du résultat d'un DBCC TABLRESULTS.sql
2020-11-26 18:38:25 +01:00

10 lines
245 B
Transact-SQL

DECLARE @LOGSPACE TABLE
(DATABASE_NAME sysname,
LOG_SIZE_MB FLOAT,
LOG_USE_PERCENT FLOAT,
STATUS INT);
INSERT INTO @LOGSPACE
EXEC ('DBCC SQLPERF(LOGSPACE);');
SELECT * FROM @LOGSPACE WHERE LOG_USE_PERCENT > 30;