-
Notifications
You must be signed in to change notification settings - Fork 4
/
invalid_constraints.sql
53 lines (47 loc) · 1.27 KB
/
invalid_constraints.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
--==============================================================================
-- GPI - Gunther Pippèrr
-- Desc: show invalid constraints in the database
-- Date: 10 2015
--
--==============================================================================
set linesize 130 pagesize 300
ttitle "List of not validated or invalid constraints" skip 2
column owner format a20
column table_name format a30
column constraint_name format a30
column validated format a20
select owner
, table_name
, constraint_name
, status
, validated
from dba_constraints
where ( validated != 'VALIDATED'
or status != 'ENABLED')
and owner not in
('SYS'
, 'MDSYS'
, 'SI_INFORMTN_SCHEMA'
, 'ORDPLUGINS'
, 'ORDDATA'
, 'ORDSYS'
, 'EXFSYS'
, 'XS$NULL'
, 'XDB'
, 'CTXSYS'
, 'WMSYS'
, 'APPQOSSYS'
, 'DBSNMP'
, 'ORACLE_OCM'
, 'DIP'
, 'OUTLN'
, 'SYSTEM'
, 'FLOWS_FILES'
, 'PUBLIC'
, 'SYSMAN'
, 'OLAPSYS'
, 'OWBSYS'
, 'OWBSYS_AUDIT')
order by owner
/
ttitle off