linux中oracle的日常维护命令
where A.tablespace_name=B.tablespace_name; 3 TABLESPACE_NAME USED_PERCENT ------------------------------ ------------ UNDOTBS1 33.25 SYSAUX 99.0364583 RISENET .0125 USERS 62.5 SYSTEM 98.6067708 EXAMPLE 68.25 PERFSTAT 28.7625 7 rows selected. 12 . 检查一些扩展异常的对象 select segment_name,segment_type,tablespace_name, (extents/max_extents)*100 Percent from sys.DBA_segments where max_extents!=0 and (extents/max_extents)*100>=95 order by percent; SQL> select segment_name,segment_type,tablespace_name, 2 (extents/max_extents)*100 Percent 3 from sys.DBA_segments 4 where max_extents!=0 and (extents/max_extents)*100>=95 5 order by percent; no rows selected 如果有记录返回,则这些对象的扩展已经快达到它定义时的最大扩展值。对于这些对象要修改它的存储结构参数。 13 . 检查system表空间内的内容 select distinct(owner) from dba_tables where tablespace_name='SYSTEM' and owner!='SYS' and owner!='SYSTEM' union select distinct(owner) from dba_indexes where tablespace_name='SYSTEM' and owner!='SYS' and owner!='SYSTEM'; SQL> select distinct(owner) from dba_tables 2 where tablespace_name='SYSTEM' and 3 owner!='SYS' and owner!='SYSTEM' 4 union 5 select distinct(owner) from dba_indexes 6 where tablespace_name='SYSTEM' and 7 owner!='SYS' and owner!='SYSTEM'; OWNER ------------------------------ MDSYS OLAPSYS OUTLN 如果有记录返回,则表明system表空间内存在一些非system和sys用户的对象。应该进一步检查这些对象是否与我们应用相关。如果相关请把这些对象移到非System表空间,同时应该检查这些对象属主的缺省表空间值, 14. 检查对象的下一扩展与表空间的最大扩展值 select a.table_name,a.next_extent,a.tablespace_name from all_tables a, (select tablespace_name,max(bytes) as big_chunk from dba_free_space group by tablespace_name) f where f.tablespace_name=a.tablespace_name and a.next_extent>f.big_chunk union select a.index_name,a.next_extent,a.tablespace_name from all_indexes a, (select tablespace_name,max(bytes) as big_chunk from dba_free_space group by tablespace_name) f where f.tablespace_name=a.tablespace_name 本文URL地址:http://www.bianceng.cn/OS/Linux/201410/45428.htm (编辑:源码网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |