모든 데이터베이스 전체 공간 및 여유 공간 조회
use tempdb go CREATE TABLE DBO.TBL_DB_SIZE ( ID INT IDENTITY, NAME NVARCHAR(100), RSVD NVARCHAR(50), DATA NVARCHAR(50), INDX NVARCHAR(50), UNUS NVARCHAR(50) ) EXEC SP_MSFOREACHDB ' USE [?] declare @id int -- The object id that takes up space ,@type character(2) -- The object type. ,@pages bigint -- Working variable for size calc. ,@dbname sysname ,@dbsize bigint ,@logsize bigint ,@reservedpages ..
더보기