테이블 용량 조회
-- 테이블 용량 조회 DECLARE @SIZE INT -- 관리대상 테이블 크기(KB) DECLARE @LOW BIGINT SELECT @LOW = LOW FROM MASTER.DBO.SPT_VALUES WHERE NUMBER = 1 AND TYPE = 'E' SELECT TMP.CRDATE AS DATES ,OBJECT_NAME(TMP.ID) AS NAME ,CONVERT(CHAR(11),SUM(ROWS)) AS ROWS ,LTRIM(STR(SUM(TMP.RESERVED) * @LOW / 1024.,15,0) + ' ' + 'KB') AS RESERVED ,LTRIM(STR(SUM(TMP.DATA) * @LOW / 1024.,15,0) + ' ' + 'KB') AS DATA ,LTRIM(STR((S..
DataBase/SQL Server
2024. 12. 6. 15:15