計算DB容量
計算TIPTOP 各營運中心USER資料庫大小
SELECT OWNER,SUM(bytes)/1024/1024/1024 sineGB
FROM dba_segments
WHERE OWNER in ('GB001','JP001','JP002','SOC','TW001',
'TW002','TW003','TW004','TW005','US000',
'US001','US002','US003','US004','US999',
'VG001','WS001')
AND tablespace_name in ('DBS1')
GROUP BY OWNER
ORDER BY OWNER
SELECT OWNER,tablespace_name,SUM(bytes)/1024/1024/1024 sineGB
FROM dba_segments
WHERE tablespace_name in ('DBS1','TEMPTABS')
GROUP BY OWNER,tablespace_name
ORDER BY OWNER,tablespace_name