| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Disable All constraints from application
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...Received on Wed Oct 22 2003 - 15:21:18 CDT
> 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
> > >
> > >
> >
> >
>
>
![]() |
![]() |