very urgent help.
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: very urgent help.

Hybrid View

  1. #1
    Join Date
    Jan 2001
    Posts
    157

    Exclamation

    Can somebody please send me a script that will disable all my constraints and enable them after words?
    Please help

  2. #2
    Join Date
    Feb 2000
    Location
    New York,U.S.A.
    Posts
    245
    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

  3. #3
    Join Date
    Feb 2000
    Location
    Washington DC
    Posts
    1,843

    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
  •  


Click Here to Expand Forum to Full Width