 |
|
Oracle Tips by Burleson |
Chapter 7 Oracle Storage and Object
Internal Scripting
update
cons_temp set con_number=cons_nbr where
constraint_name=cons_name and
constraint_type=cons_type and
owner=cons_owner;
end loop;
close get_cons;
commit;
end loop;
close get_tab_nam;
commit;
end;
END;
/
create index pk_cons_temp on cons_temp(constraint_name);
create index lk_cons_temp2 on cons_temp(referenced_constraint);
set feedback off pages 0 termout off echo off
set verify off
set pages 48 lines 132
column pri_own format a15 heading 'Pri Table|Owner'
column for_own format a15 heading 'For Table|Owner'
column pri_tab format a15 heading 'Pri Table|Name'
column for_tab format a15 heading 'For Table|Name'
column pri_col format a30 heading 'Pri Key|Columns' word_wrapped
column for_col format a30 heading 'For Key|Columns' word_wrapped
ttitle 'Primary Key - Foreign Key Report'
spool pk_fk
break on a.owner on a.table_name on b.owner on b.table_name
select
b.owner pri_own,
The above is from the bestselling book
Mike Ault’s Oracle Internals Monitoring & Tuning Scripts.
It's only $49.95and you can download all the scripts immediately:
|
|
|
Need an Oracle Health Check?
Does your boss blame you for an Oracle performance problem?
Need to prove that your database is properly optimized?
BC Oracle performance guru's can quickly verify every aspect of your
Oracle database and provide a complete certification that your database
is fully optimized. |

|
|