Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Disable All constraints from application

Re: Disable All constraints from application

From: Niall Litchfield <niall.litchfield_at_dial.pipex.com>
Date: Wed, 22 Oct 2003 21:21:18 +0100
Message-ID: <3f96e6bd$0$9475$cc9e4d1f@news.dial.pipex.com>


you are of course correct.

--
Niall Litchfield
Oracle DBA
Audit Commission UK
*****************************************
Please include version and platform
and SQL where applicable
It makes life easier and increases the
likelihood of a good answer
******************************************
"Jack Wang" <nospam_at_nospam.com> wrote in message
news:28Alb.76$SJ1.68_at_edtnps84...

> Are you sure 'alter constraint' exists? I had to use 'alter table...'
>
> - Jack
>
> "Niall Litchfield" <n-litchfield_at_audit-commission.gov.uk> wrote in message
> news:3f969f68$0$251$ed9e5944_at_reading.news.pipex.net...
> > The command to disable a constraint is 'alter constraint
<constraint_name>
> > disable;' So running
> >
> > select 'alter constraint '||constraint_name||' disable;'
> > from user_constraints
> > where....
> >
> > will give you some output you can use to write a script to do what you
wish.
> > a similar script can be made to reenable afterwards.
> >
> > Updating the data dictionary directly is a terrible terrible idea. You
> > wouldn't hex edit the file allocation table on a windows system to
delete a
> > file would you?
> >
> > --
> > Niall Litchfield
> > Oracle DBA
> > Audit Commission Uk
> > "Davide Gurgone" <mortecerta_NOSPAM__at_libero.it> wrote in message
> > news:l_wlb.331351$R32.10927377_at_news2.tin.it...
> > > Hi All,
> > > I hope I'm not OT :o!
> > >
> > > I've got a problem, I need to disable temporally all constraints in
one
> > > specific schema, but the script I do doesn't work:
> > >
> > > UPDATE USER_CONSTRAINTS
> > > SET STATUS = 'DISABLED'
> > > WHERE R_OWNER = 'OWNER'
> > > COMMIT;
> > >
> > > I need it to Truncate every table in my shema.
> > >
> > > If someone has got another idea, I'm happy to implement it!!!
> > >
> > > Thanks all!
> > >
> > > Davide
> > >
> > >
> >
> >
>
>
Received on Wed Oct 22 2003 - 15:21:18 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US