[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Export/Import data only using data pump

Posted on 2012-08-16
6
Medium Priority
?
774 Views
Last Modified: 2012-08-19
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
0
Comment
Question by:luchuanc
  • 3
  • 2
6 Comments
 
LVL 78

Expert Comment

by:slightwv (䄆 Netminder)
ID: 38301176
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
0
 

Author Comment

by:luchuanc
ID: 38301282
Hi slightwv,

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

Thanks,

Luchuan
0
 
LVL 78

Expert Comment

by:slightwv (䄆 Netminder)
ID: 38301322
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.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 78

Accepted Solution

by:
slightwv (䄆 Netminder) earned 2000 total points
ID: 38301328
>>but different indexes.

I just remembered this requirement.  You will also need to tell expdp and impdp to not include indexes/constraints/??? and only do the tables and data.

If the link I posted doesn't show all the options, I'll defer to the online docs for your version.
0
 
LVL 32

Expert Comment

by:awking00
ID: 38301592
For just the data, include a "CONTENT=DATA_ONLY" statement in your expdp commands.
0
 

Author Closing Comment

by:luchuanc
ID: 38309399
Thanks a lot,

Luchuan
0

Featured Post

Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.
Suggested Courses
Course of the Month19 days, 1 hour left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question