- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Broken Foreign Keys
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2005 06:46 AM
тАО06-16-2005 06:46 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2005 09:32 AM
тАО06-16-2005 09:32 AM
Re: Broken Foreign Keys
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2005 09:12 PM
тАО06-16-2005 09:12 PM
SolutionBefore import, disable all triggers executing the result of the following query:
select 'alter trigger'||' '||owner||'.'||object_name||' '||'disable'
from dba_objects
where object_type = 'TRIGGER';
And, after, re-enable them:
select 'alter trigger'||' '||owner||'.'||object_name||' '||'enable'
from dba_objects
where object_type = 'TRIGGER';
Regards,
Eric Antunes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2005 10:35 PM
тАО06-16-2005 10:35 PM
Re: Broken Foreign Keys
Here is the sequence I used (it concern a fromuser/touser import, not full) :
1. import tables structure with options "rows=n indexes=n constraints=n grants=n" and some other extra options such as buffer, ignore...
2. disable trigger with a script like that :
sqlplus /nolog << EOF
connect ${login}/${pass}
set verify off
set head off
set pages 0
spool trigoff_$$.sql
select 'alter trigger '||trigger_name||' disable;' from user_triggers;
spool off
sta trigoff_$$.sql
exit
EOF
rm trigoff_$$.sql
3. import data with a new imp command with options "indexes=n constraints=n grants=n".
4. enable constraints with a last import command using options "rows=n indexes=y constraints=y grants=y"
Import data without indexes and constraints make it faster than all-in-one. You have to parse 3 times the file so it may be a better thing to have a user export than a full export.
Triggers will be activated by imp itself at end of step 3.
Regards,
Fred
"Reality is just a point of view." (P. K. D.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-17-2005 01:56 AM
тАО06-17-2005 01:56 AM
Re: Broken Foreign Keys
What do you mean by "broken"?
what is the status of the constraint?
query the status field:
desc dba_constraints
Name Null? Type
------------------------------- -------- ----
OWNER NOT NULL VARCHAR2(30)
CONSTRAINT_NAME NOT NULL VARCHAR2(30)
CONSTRAINT_TYPE VARCHAR2(1)
TABLE_NAME NOT NULL VARCHAR2(30)
SEARCH_CONDITION LONG
R_OWNER VARCHAR2(30)
R_CONSTRAINT_NAME VARCHAR2(30)
DELETE_RULE VARCHAR2(9)
STATUS VARCHAR2(8)
DEFERRABLE VARCHAR2(14)
DEFERRED VARCHAR2(9)
VALIDATED VARCHAR2(13)
GENERATED VARCHAR2(14)
BAD VARCHAR2(3)
RELY VARCHAR2(4)
LAST_CHANGE DATE
let us know
regards
yogeeraj