Go Back   Rhinocerus > Newsgroup > Newsgroup comp.databases.oracle.server

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 03-08-2006, 01:43 PM
Jeremy
Guest
 
Posts: n/a
Default Disabling/enabling all constraints/triggers for a schema

There are plenty of home-grown scripts for reading the data dictionary
and then generating a "disable" or "enable" constraints script - is
there any native functionality in Oracle though to do this?

9iR2 plus...

--
jeremy

We use Oracle 9iR2 on Solaris 8 with the Oracle HTTP Server and
mod_plsql
Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

  #2 (permalink)  
Old 03-08-2006, 07:14 PM
DA Morgan
Guest
 
Posts: n/a
Default Re: Disabling/enabling all constraints/triggers for a schema

Jeremy wrote:
> There are plenty of home-grown scripts for reading the data dictionary
> and then generating a "disable" or "enable" constraints script - is
> there any native functionality in Oracle though to do this?
>
> 9iR2 plus...


No. And for that I am very thankful.
--
Daniel A. Morgan
http://www.psoug.org
damorgan@x.washington.edu
(replace x with u to respond)
Reply With Quote
  #3 (permalink)  
Old 03-08-2006, 11:31 PM
Joel Garry
Guest
 
Posts: n/a
Default Re: Disabling/enabling all constraints/triggers for a schema


Jeremy wrote:
> There are plenty of home-grown scripts for reading the data dictionary
> and then generating a "disable" or "enable" constraints script - is
> there any native functionality in Oracle though to do this?
>
> 9iR2 plus...
>
> --
> jeremy
>
> We use Oracle 9iR2 on Solaris 8 with the Oracle HTTP Server and
> mod_plsql


Depending on what exactly you want to accomplish, there's imp with
constraints=n, or indexfile with constraints=y, see the utilities
manual.

jg
--
@home.com is bogus.
"At this point, I get into a bag end. There must be some Oracle bug,
but I can't find where area problem lie. " - bug 3891092

Reply With Quote
  #4 (permalink)  
Old 03-09-2006, 08:17 AM
Jeremy
Guest
 
Posts: n/a
Default Re: Disabling/enabling all constraints/triggers for a schema

In article <1141848877.395875@yasure.drizzle.com>, DA Morgan says...
> Jeremy wrote:
> > There are plenty of home-grown scripts for reading the data dictionary
> > and then generating a "disable" or "enable" constraints script - is
> > there any native functionality in Oracle though to do this?
> >
> > 9iR2 plus...

>
> No. And for that I am very thankful.
>


Because....?

--

jeremy
Reply With Quote
  #5 (permalink)  
Old 03-09-2006, 08:44 AM
Jeremy
Guest
 
Posts: n/a
Default Re: Disabling/enabling all constraints/triggers for a schema

In article <1141864312.949646.281930@e56g2000cwe.googlegroups .com>, Joel
Garry says...
>
> Jeremy wrote:
> > There are plenty of home-grown scripts for reading the data dictionary
> > and then generating a "disable" or "enable" constraints script - is
> > there any native functionality in Oracle though to do this?
> >
> > 9iR2 plus...
> >

>
> Depending on what exactly you want to accomplish, there's imp with
> constraints=n, or indexfile with constraints=y, see the utilities
> manual.
>


Thanks for that. What we are trying to do is move a subset of data from
one DB to another. If we disable the constraints and triggers in the
target DB's corresponding schema, we can load all the data on a "per
table" basis (via DB links) without any issues of FKs being violated and
then simply re-enable the constraints & triggers at the end.

--

jeremy
Reply With Quote
  #6 (permalink)  
Old 03-09-2006, 09:18 AM
frank.van.bortel@gmail.com
Guest
 
Posts: n/a
Default Re: Disabling/enabling all constraints/triggers for a schema

I'd be careful with such an approach, as it it easy to introduce
inconsistencies in your data. What if a constraint cannot be validated
after the data move?

Make sure you have checks in place for those events.

Reply With Quote
  #7 (permalink)  
Old 03-09-2006, 09:57 AM
Jeremy
Guest
 
Posts: n/a
Default Re: Disabling/enabling all constraints/triggers for a schema

In article <1141899499.047589.229110@j33g2000cwa.googlegroups .com>,
frank.van.bortel@gmail.com says...
> I'd be careful with such an approach, as it it easy to introduce
> inconsistencies in your data. What if a constraint cannot be validated
> after the data move?
>
> Make sure you have checks in place for those events.
>


Yes, thanks. Testing is underway!

--

jeremy

Reply With Quote
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
XML Schema Alan Churchill Newsgroup comp.soft-sys.sas 0 07-12-2007 06:16 AM



All times are GMT. The time now is 02:57 AM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.