Link to home
Start Free TrialLog in
Avatar of luchuanc
luchuancFlag for United States of America

asked on

Export/Import data only using data pump

Hi,

I have 2 tables (axium.trx , axium.history) in 2 databases. They have the same data but different indexes.

I need to refresh the data (just the data) in 2 tables in database 2 using the data from database 1 using data pump.
What the syntax (expdp, impdp) would be ?

Thanks,

Luchuan
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

http://www.oracle-base.com/articles/10g/oracle-data-pump-10g.php#TableExpImp

expdp axium/password tables=TRX,HISTORY directory=TEST_DIR dumpfile=myTables.dmp logfile=expdpmytables.log

impdp axium/password tables=TRX,HISTORY directory=TEST_DIR dumpfile=myTables.dmp logfile=impdpmytables.log TABLE_EXISTS_ACTION=TRUNCATE
Avatar of luchuanc

ASKER

Hi slightwv,

Is there any difference between using axium user and the system user in the command?

Thanks,

Luchuan
I prefer a minimal privilege setup.  If you use system then that password will liekly be in some script somewhere.

I try to never hard-code the SYS or SYSTEM password.

Other than the security issue, there shouldn't be any.

You should just need to add the SCHEMAS and probably the INCLUDE options:
schemas=AXIUM include=TABLE:"IN ('TRX','HISTORY')"

You will just need to mess around with it until you get the results you want.
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
For just the data, include a "CONTENT=DATA_ONLY" statement in your expdp commands.
Thanks a lot,

Luchuan