RE: expdp

From: Rich Jesse <rjoralist3_at_society.servebeer.com>
Date: Wed, 28 Jan 2015 11:08:51 -0600 (CST)
Message-ID: <9c0a82078ef8b562fa793c9642d4efb7.squirrel_at_society.servebeer.com>



I replied:

...
> impdp mytestdba parfile=IMPTEST.DAT
>
> ...where IMPTEST.DAT contains:
>
> DIRECTORY=TEST_DIR
> DUMPFILE=MYEXP.dmp
> LOGFILE=MYIMP.log

...

OR, as another active thread mentions, use NETWORK_LINK, skipping the expdp step (and the need for non-default Oracle database DIRECTORY specs) altogether:

impdp mytestdba parfile=PRODIMP.DAT

...where PRODIMP.DAT might be:

LOGFILE="PRODIMP.log"
DIRECTORY=DATA_PUMP_DIR
NETWORK_LINK=PRODDB
TABLE_EXISTS_ACTION=TRUNCATE
SKIP_UNUSABLE_INDEXES=y
CONTENT=DATA_ONLY
PARALLEL=12
SCHEMAS=('MYSCHEMA1', 'MYSCHEMA2')

REMAP_SCHEMA='MYSCHEMA1:TEST1'
REMAP_SCHEMA='MYSCHEMA2:TEST2'
REMAP_TABLESPACE='MYSCHEMA1TSI:TEST1TSI'
REMAP_TABLESPACE='MYSCHEMA1TSD:TEST1TSD'
REMAP_TABLESPACE='MYSCHEMA2TSI:TEST2TSI'
REMAP_TABLESPACE='MYSCHEMA2TSD:TEST2TSD'
EXCLUDE=USER
EXCLUDE=TABLESPACE

EXCLUDE=ROLE_GRANT
EXCLUDE=STATISTICS So, this might be used if the tables already exist in Test and you just want to refresh the data from Prod.

And, yes, if the tablespaces or schemas have the same name on Prod and Test, you can ignore their respective REMAPs.

Rich

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Jan 28 2015 - 18:08:51 CET

Original text of this message