Reputation: 221
I want to export a table from a database located on one server to another database located on another server.
Here is my setup:
The command that I found is used to export/import table within the same database:
expdp user/password dumpfile=hr.dmp directory=dmpdir schemas=hr logfile=
hr_exp.log
impdp user/password dumpfile=hr.dmp directory=dmpdir schemas=hr logfile=hr_imp.log
Any idea or tips on how to solve this?
Upvotes: 1
Views: 2449
Reputation: 33
Just to complement above answer, you can also use network_link option on the target server. This will not require any directory access and will allow to do import on the target sever via link.
The link should be pointing to the source database.
On TARGET DB (Data would be imported in this db)
connect user/password@target
CREATE DATABASE LINK sourceHR CONNECT TO hr IDENTIFIED BY hrpassword USING 'tns2source';
impdp user/password@target network_link=sourceHR tables=<table1>...
If you omit tables, it would be a schema level import for all objects on the source schema.
Hope it helps!
Upvotes: 1
Reputation: 4461
Datapump is a server-side tool only, which means you have to make the dumpfile accessible for serverB to import.
Another option is to have your directory-object point to a common area accessible from both serverA and serverB.
Upvotes: 1