Oracle中查看无效的对象、约束、触发器和索引

1、检查无效的数据库对象:

SELECT owner, object_name, object_type,status 
FROM dba_objects 
WHERE status = 'INVALID'; 


2、检查不起作用的约束:

SELECT owner, constraint_name, table_name, constraint_type, status
FROM dba_constraints
WHERE status = 'DISABLED';


3、检查无效的触发器:

SELECT owner, trigger_name, table_name, status
FROM dba_triggers
WHERE status = 'DISABLED'; 



4、检查失效的索引:

select index_name,table_name,tablespace_name,status
From dba_indexes 
Where status<>'VALID';

 转自< http://blog.itpub.net/28408358/viewspace-764437/  >

posted @ 2016-06-14 16:34  PoleStar  阅读(2755)  评论(0编辑  收藏  举报