-
Can somebody please send me a script that will disable all my constraints and enable them after words?
Please help
-
Run this script first and you will get the script called disable.sql
when you disable the constraint and finish your job and edit the script disable.sql change disable to enable and run it again and all disabled constraints will be enabled again.
set feed off pages 0 head off echo off line 100 ver off
col col1 newline
accept username prompt 'Please enter owner of Tables: '
REM #
REM # create script to disable all referencial constraints
REM #
spool disable.sql
select 'alter table '|| r_owner ||'.'||
table_name ||' disable constraint '||
constraint_name ||';'
from user_constraints
where r_owner = upper('&username')
and constraint_type = 'R';
spool off
-
metalink scripts
[url]http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=1019923.6[/url]
Reddy,Sam
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|