Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

HowTo disable constraints during tables creation ?

Zack.LApr 4 2007 — edited Apr 10 2007
Hi,
 Need to re-create all tables and re-create (no data) with ROWDEPENDENCIES option.  
 Approx 300+ tables.

Problem :
1. When dropping tables (all data truncated first), had to run drop table script a few 
    times in order to drop all tables.

2. When doing table creation, tables having foreign key on tables not created yet throws   
   ORA-00942 table or view does not exist.

3. Unable to disable all constraints as about 40% of constraints are disabled and when
    enable all constraints, unable to disable back the 40% disabled ones unless doing it
    manually. (Have many databases to be upgraded after testing )

Questions :
1.  How to disable constraints during tables drop/creation and enabling after creation ?
   ( like using imp, creating tables alphabetically and enabling enable constraints and 
     leave disabled ones alone. )  

Thanks in advance
Zack                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 8 2007
Added on Apr 4 2007
10 comments
1,486 views