728x90
-- 테이블찾기(Search Table)
SELECT dataBasename, tablename FROM dbc.tablesv WHERE LOWER(tablename) LIKE '%ycl00%'
-- 테이블용량(check table size)
select a.DatabaseName, a.tablename, CreateTimeStamp, CAST(SUM(CurrentPerm)/(1024*1024*1024) as DECIMAL(18,5)) (TITLE 'Used(GB)')
FROM dbc.tablesize A, dbc.tables b
where a.tablename=b.tablename
and a.DatabaseName = B.DatabaseName and A.DatabaseName = '~~~' and A.tablename = '~~~~'
group by 1,2,3 order by 3 desc;
-- 디스크용량(disk size)
select databasename,
CAST(sum(CurrentPerm)/(1024*1024*1024) as decimal(18,5)) (TITLE 'Used(GB)')
CAST(sum(MaxPerm)/(1024*1024*1024) as decimal(18,5)) (TITLE 'Allocated(GB)')
CAST((sum(MaxPerm)-sum(CurrentPerm))/(1024*1024*1024) as decimal(18,5)) (TITLE 'Free(GB)')
from dbc.diskspace
where databasename='~~~'
group by 1 order by 2 desc;
-- TDWM rule
SELECT * -- ruleid 찾기
FROM tdwm.RuleDefs
WHERE rulename = 'Reject_USR_PJ_5B_1H_Rows'
;
SELECT * -- rule 설명
FROM tdwm.rulequalifycriteria
WHERE 1=1
--AND rulename = 'Reject_USR_PJ_5B_1H_Rows'
AND ruleid IN (SELECT ruleid
FROM tdwm.RuleDefs
WHERE rulename = 'Reject_1H_Rows'
)
ORDER BY ruleid asc, crowid asc
;
728x90