-
I want to perform full improt using full exported dump file.
The target database already has objects that I want to import from the dump file, as well as rows.
Even thought I import ignore=Y , commit=y option, It takes too long and I see too long error message about constraints.
(since some of rows are already in the database)
What is the best way to import in this case.
If truncate is the best option, Do I need to truncate sys and system's object also.
-
Disable contraints.
Truncate tables (not sys and system).
Drop tables.
Import
Enable contraints.
-
Or,
1. disable constraints
2. truncate tables (not sys or system)
3. imp system/manager file=foo.bar ignore=y
4. enable constriants
Jeff Hunter
-
I disabled constraints , truncated tables and drop objects and then I imported. It worked.
I disabled constrains, truncated tables and imported with ignore=y option then I got the following errors.
Why is that? What is different between dropping objects or not? when I use ignore=Y option.
IMP-00017: following statement failed with ORACLE error 2261:
"ALTER TABLE "FILES" ADD UNIQUE ("VIDEO_ID","FILE_FORMAT_ID") USING INDEX P"
"CTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE (INITIAL 20480 NEXT 16384 MINEXTE"
"NTS 1 MAXEXTENTS 121 PCTINCREASE 50 FREELISTS 1 FREELIST GROUPS 1 BUFFER_PO"
"OL DEFAULT) TABLESPACE "DEVELOPMENT" ENABLE"
IMP-00003: ORACLE error 2261 encountered
ORA-02261: such unique or primary key already exists in the table
-
You dropped the tables and recreated 'em using import, you don't get any errors. But, you are trying to add constraint which already exists.
No big deal. Just an error message...
-
But, I specify import option ignore= Y. and there are lots of other constraints.
why do I get an error message about that constraint?
-
does data got loaded or not ? This is the only error message you got or any other messages. If just indexes you can always drop 'em and recreate 'em with a script.
-
One more same error message related to other table.
I don't know the reason, but It is better to drop the objects and import into the database. (truncate is not enough.)
Thanks.
-
I dunno why its giving problems, I did somany times. Try with no data first. and Just data nothing else in the second step.
1)imp system/xxx full=y ignore=y rows=n consitent=y
2)imp system/xxx full=y ignore=y rows=y commit=y indexes=n grants=n
-
It's complaining that the constraint already exists, this is because you only disabled it, not dropped it. Your original still exists. The error is ok and can be ignored.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|