您的位置:首页 - 教程 - Oracle - 正文
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';

评论: