oracle中查看无效的对象、约束、触发器和索引(Helloblock写作)
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';
mail:helloblock@126.com
QQ:1654294099
转载于:https://blog.51cto.com/helloblock/1294372