Infolinks

Wednesday 11 July 2012

Script to Report REF Columns in the Database

Script to Report REF Columns in the Database

This script provides documentation with respect to the different REF columns in the database.


REM LOCATION: Object Management\Collection Reports
REM FUNCTION: Generate a list of all REF columns in the database
REM TESTED ON: 8.0.4.1, 8.1.5, 8.1.7, 9.0.1, 10.2.0.3, 11.1.0.6
REM PLATFORM: non-specific
REM REQUIRES: dba_refs
REM
REM
REM ******************** Oracle Administration ********************
 COLUMN owner FORMAT a8 HEADING 'Owner'COLUMN table_name FORMAT a23 HEADING 'Table|Name'COLUMN column_name FORMAT a15 HEADING 'Column|Name'COLUMN with_rowid FORMAT a5 HEADING 'With|Rowid'COLUMN is_scoped FORMAT a6 HEADING 'Scoped'COLUMN scope_table_owner FORMAT a8 HEADING 'Scope|Table|Owner'COLUMN scope_table_name FORMAT a15 HEADING 'Scope|Table|Name'BREAK ON ownerSET
ttitle
PAGES 58 LINES 130 FEEDBACK OFF VERIFY OFF 'Database REF Report' skip 2SELECT owner, table_name, column_name, with_rowid, is_scoped,scope_table_owner, scope_table_nameFROM dba_refsORDER BY owner;

No comments:

Post a Comment