Select c.table_name,Sum(c.bytes)/1024/1024 From (select a.owner,a.table_name,a.segment_name,b.segment_name,b.tablespace_name, b.bytes
from dba_lobs a, dba_segments b Where (a.segment_name=b.segment_name Or a.index_name=b.segment_name)
And a.owner In ('BRES','RTS','AIS') And b.owner In ('BRES','RTS','AIS') And a.table_name In ('T_BRM_UW_PROCESS_LOG_XML','T_BRM_UW_PROCESS_LOG','T_BRM_UW_RULE_RESULT')
Union
Select b.owner,b.segment_name,b.segment_name,b.segment_name,b.tablespace_name, b.bytes From dba_segments b
Where b.owner In ('BRES','RTS','AIS') And b.segment_name In ('T_BRM_UW_PROCESS_LOG_XML','T_BRM_UW_PROCESS_LOG','T_BRM_UW_RULE_RESULT')) c Group By c.table_name;
from dba_lobs a, dba_segments b Where (a.segment_name=b.segment_name Or a.index_name=b.segment_name)
And a.owner In ('BRES','RTS','AIS') And b.owner In ('BRES','RTS','AIS') And a.table_name In ('T_BRM_UW_PROCESS_LOG_XML','T_BRM_UW_PROCESS_LOG','T_BRM_UW_RULE_RESULT')
Union
Select b.owner,b.segment_name,b.segment_name,b.segment_name,b.tablespace_name, b.bytes From dba_segments b
Where b.owner In ('BRES','RTS','AIS') And b.segment_name In ('T_BRM_UW_PROCESS_LOG_XML','T_BRM_UW_PROCESS_LOG','T_BRM_UW_RULE_RESULT')) c Group By c.table_name;
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/11411056/viewspace-734387/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/11411056/viewspace-734387/