日期:2014-05-16 浏览次数:20491 次
select sum(bytes)/(1024*1024) as free_space,tablespace_name from dba_free_space group by tablespace_name; SELECT A.TABLESPACE_NAME,A.BYTES TOTAL,B.BYTES USED, C.BYTES FREE, (B.BYTES*100)/A.BYTES "% USED",(C.BYTES*100)/A.BYTES "% FREE" FROM SYS.SM$TS_AVAIL A,SYS.SM$TS_USED B,SYS.SM$TS_FREE C WHERE A.TABLESPACE_NAME=B.TABLESPACE_NAME AND A.TABLESPACE_NAME=C.TABLESPACE_NAME;
select owner, object_type, status, count(*) count# from all_objects group by owner, object_type, status;
Select version FROM Product_component_version Where SUBSTR(PRODUCT,1,6)='Oracle';
Select Created, Log_Mode, Log_Mode From V$Database;
select a.segment_name,a.tablespace_name,b.table_name,a.bytes/1024/1024 mbytes,a.blocks from user_segments a, user_indexes b where a.segment_name = b.index_name and a.segment_type = 'INDEX' --索引 and a.tablespace_name='APPINDEX' --表空间 and b.table_name like '%PREP%' --索引所在表 order by table_name,a.bytes/1024/1024 desc
select segment_name, sum(bytes)/1024/1024 Mbytese from user_segments where segment_type='TABLE' and segment_name='表名' group by segment_name