Вы находитесь на странице: 1из 5

5/21/13

OTN Discussion Forums : DataPump TABLE_EXISTS_ACTION=APPEND ...

Welcome, Guest

Oracle Discussion Forums Oracle Database General Questions

Sign In / Register

Thread: DataPump TABLE_EXISTS_ACTION=APPEND


parameter, need help

Guest Settings
Search
FAQ

Planned upgrade has been postponed. More information


available here.
Reply to this Thread

Search Forum

Back to Thread List


Legend

Replies: 10 - Pages: 1 - Last Post: Feb 22, 2008 11:15 AM Last Post By: RG2

Guru : 2500 - 1000000 pts


RG2
Posts: 347
Registered: 03/05/07

DataPump
TABLE_EXISTS_ACTION=APPEND
parameter, need help
Posted: Feb 22, 2008 7:07 AM

Reply

Expert : 1000 - 2499 pts


Pro : 500 - 999 pts
Journeyer : 200 - 499 pts

Hi,

Explorer : 50 - 199 pts

I am trying to take a schema (A) from one DB (X) and


merge it to schema (A) on DB (Y). IF the table exists then I
simply would like to append the data that is not currently
there. If the object does not exists then bring it on Y. I
hope this makes sense.

Newbie : 0 - 49 pts

If I use the TABLE_EXISTS_ACTION=APPEND, can I use


this parameter when using the schema option, like as
follows?
expdp A/A@X schemas=A directory=TEST_DIR
dumpfile=A.dmp logfile=expdpA.log

Oracle ACE Director


Oracle ACE Member
Oracle Employee ACE
Ace Moderator
Forum Moderator
Java Champion
Ace Director Moderator

and then this...

Helpful Answer (5 pts)

impdp A/A@Y schemas=A directory=TEST_DIR


dumpfile=A.dmp logfile=impdpA.log
TABLE_EXISTS_ACTION=APPEND

Correct Answer (10 pts)

Will this work this way or does the


TABLE_EXISTS_ACTION=APPEND only work when I use the
tables options?
Message was edited by:
RG

Jaffy
Posts: 1,235
Registered: 05/14/07

Re: DataPump
TABLE_EXISTS_ACTION=APPEND
parameter, need help
Posted: Feb 22, 2008 7:24 AM
in response to: RG2

Reply

Hi,
You can use TABLE_EXISTS_ACTION=APPEND option to
append the data in new database. It will work.
downloaduk.oracle.com/docs/cd/B19306_01/server.102/b14215/exp_imp.htm
Jafar
https://forums.oracle.com/forums/thread.jspa?threadID=621541

1/5

5/21/13

RG2
Posts: 347
Registered: 03/05/07

OTN Discussion Forums : DataPump TABLE_EXISTS_ACTION=APPEND ...

Re: DataPump
TABLE_EXISTS_ACTION=APPEND
parameter, need help
Posted: Feb 22, 2008 7:35 AM
in response to: Jaffy

Reply

Will this also create/append indexes and constraints as well


if they do not exists or whatever else is associated to the
table?

sivamurugesh
Posts: 439
Registered: 01/13/01

Re: DataPump
TABLE_EXISTS_ACTION=APPEND
parameter, need help
Posted: Feb 22, 2008 7:39 AM
in response to: RG2

Reply

http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/dp_import.htm#sthref364
This gives more info.
Message was edited by:
sivamurugesh
Message was edited by:
sivamurugesh

Anantha R
Posts: 3,669
Registered: 08/02/07

Re: DataPump
TABLE_EXISTS_ACTION=APPEND
parameter, need help
Posted: Feb 22, 2008 7:40 AM
in response to: RG2

Reply

Using TABLE_EXISTS_ACTION=APPEND with PARALLEL


DEGREE.will give error sometimes due to unique constraint
violation error which is a bug.( dont remember the bug
number)
either Use APPEND or PARALLEL
null

RG2
Posts: 347
Registered: 03/05/07

Re: DataPump
TABLE_EXISTS_ACTION=APPEND
parameter, need help
Posted: Feb 22, 2008 7:43 AM
in response to: Anantha R

Reply

Using TRUNCATE, This deletes existing rows and then loads


the row from the source. I need to keep the existing data
in the target.

Anantha R
Posts: 3,669
Registered: 08/02/07

Re: DataPump
TABLE_EXISTS_ACTION=APPEND
parameter, need help
Posted: Feb 22, 2008 7:58 AM

Reply

in response to: RG2

https://forums.oracle.com/forums/thread.jspa?threadID=621541

2/5

5/21/13

OTN Discussion Forums : DataPump TABLE_EXISTS_ACTION=APPEND ...

TRUNCATE option cant be used.


To avoid hitting th bug, You have to Use APPDEND option
without PARALLEL degree option.

RG2
Posts: 347
Registered: 03/05/07

Re: DataPump
TABLE_EXISTS_ACTION=APPEND
parameter, need help
Posted: Feb 22, 2008 7:59 AM
in response to: Anantha R

Reply

OK Sounds good. I will give that a go tonight

RG2
Posts: 347
Registered: 03/05/07

Re: DataPump
TABLE_EXISTS_ACTION=APPEND
parameter, need help
Posted: Feb 22, 2008 10:41 AM
in response to: Anantha R

Reply

So I did a test run just now and I noticed that it there were
problem on the import.
Import: Release 10.2.0.3.0 - Production on Friday, 22
February, 2008 12:01:21
Copyright (c) 2003, 2005, Oracle. All rights reserved.
;;;
Connected to: Oracle Database 10g Enterprise Edition
Release 10.2.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options
Master table "GEMDEV"."SYS_IMPORT_SCHEMA_01"
successfully loaded/unloaded
Starting "GEMDEV"."SYS_IMPORT_SCHEMA_01":
gemdev/********@conv schemas=GEMDEV
directory=GEMDEV_DIR_DP dumpfile=GEMDEV.dmp
logfile=impdpGEMDEV.log TABLE_EXISTS_ACTION=APPEND
Processing object type SCHEMA_EXPORT/USER
ORA-31684: Object type USER:"GEMDEV" already exists
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type
SCHEMA_EXPORT/TABLESPACE_QUOTA
ORA-39083: Object type TABLESPACE_QUOTA failed to
create with error:
ORA-00959: tablespace 'GEMUSER_1' does not exist
Failing sql is:
DECLARE TEMP_COUNT NUMBER; SQLSTR
VARCHAR2(200); BEGIN SQLSTR := 'ALTER USER
"GEMDEV" QUOTA UNLIMITED ON "GEMUSER_1"'; EXECUTE
IMMEDIATE SQLSTR;EXCEPTION WHEN OTHERS THEN IF
SQLCODE = -30041 THEN SQLSTR := 'SELECT COUNT(*)
FROM USER_TABLESPACES WHERE TABLESPACE_NAME =
''GEMUSER_1'' AND CONTENTS = ''TEMPORARY'''; EXECUTE
IMMEDIATE SQLSTR
Processing object type
SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/TYPE/TYPE_SPEC
ORA-31684: Object type
TYPE:"GEMDEV"."T_VARCHAR2_TAB" already exists
ORA-31684: Object type
TYPE:"GEMDEV"."T_NUMBER_TAB" already exists
Processing object type SCHEMA_EXPORT/TABLE/TABLE
ORA-39083: Object type TABLE failed to create with error:
ORA-00959: tablespace 'GEMINDEX_1' does not exist
Failing sql is:
CREATE TABLE "GEMDEV"."SYS_COMMISACTIVITYFLAG"
("ACTIVITY_FLAG" VARCHAR2(1) NOT NULL ENABLE,
"ACTIVITY_DESC" VARCHAR2(75) NOT NULL ENABLE,
PRIMARY KEY ("ACTIVITY_FLAG") ENABLE) ORGANIZATION
https://forums.oracle.com/forums/thread.jspa?threadID=621541

3/5

5/21/13

OTN Discussion Forums : DataPump TABLE_EXISTS_ACTION=APPEND ...

PRIMARY KEY ("ACTIVITY_FLAG") ENABLE) ORGANIZATION


INDEX NOCOMPRESS PCTFREE 10 INITRANS 2 MAXTRANS
255 LOGGING STORAGE(INITIAL 65536 NEXT 1048576
MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0
FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL
DEFAULT)
ORA-39083: Object type TABLE failed to create with error:
.
.
.
.
ORA-39112: Dependent object type TABLE_STATISTICS
skipped, base object type
TABLE:"GEMDEV"."LU_TOKENLINK" creation failed
ORA-39112: Dependent object type TABLE_STATISTICS
skipped, base object type
TABLE:"GEMDEV"."UD_BILLENTITY" creation failed
ORA-39112: Dependent object type TABLE_STATISTICS
skipped, base object type
TABLE:"GEMDEV"."UDTCONTACT_PHONENUMBER" creation
failed
ORA-39112: Dependent object type TABLE_STATISTICS
skipped, base object type
TABLE:"GEMDEV"."SYS_JOBTYPE_SUB" creation failed
Processing object type
SCHEMA_EXPORT/MATERIALIZED_VIEW
Job "GEMDEV"."SYS_IMPORT_SCHEMA_01" completed with
7822 error(s) at 12:07:54
So does this all mean that I need to have the exact same
structure as well? I only need to care about the data and
nothing else. I don't need the indexes, constrainsts, etc,
etc. just the data. I guess I could use the TABLES option
but I have over 800 tables.
Please help

Anantha R
Posts: 3,669
Registered: 08/02/07

Re: DataPump
TABLE_EXISTS_ACTION=APPEND
parameter, need help
Posted: Feb 22, 2008 11:03 AM
in response to: RG2

Reply

Note:341733.1 - Export/Import DataPump Parameters


INCLUDE and EXCLUDE - How to Load and Unload Specific
Objects
Which has the explanation for exporting/importing large
number of tables.

RG2
Posts: 347
Registered: 03/05/07

Re: DataPump
TABLE_EXISTS_ACTION=APPEND
parameter, need help
Posted: Feb 22, 2008 11:15 AM
in response to: Anantha R

Reply

Thanks for the info sir.

Pages: 1

Back to Thread List

https://forums.oracle.com/forums/thread.jspa?threadID=621541

4/5

5/21/13
About Oracle | Oracle and Sun |

OTN Discussion Forums : DataPump TABLE_EXISTS_ACTION=APPEND ...

| Subscribe | Careers | Contact Us | Site Maps | Legal Notices | Terms of Use | Your Privacy Rights

| Cookie Preferences

https://forums.oracle.com/forums/thread.jspa?threadID=621541

5/5

Вам также может понравиться