Database – Oracle 12c schema restore using impdp from a different server

databasedatabase-administrationdatabase-restoreoracleoracle-11g

I have created 2 EC2 instances in AWS.

One acts as DB Server and one acts as client.

Oracle 12c DB instance is installed on DB server and Oracle 12c instant client on client server.

I have created a schema, added some tables and data in it and then I exported the DB dump and the log.

I am able to connect to Oracle server via sys user from Oracle Client server.

I have transferred the exported DB dump (using expdp command) and logs to client server.

I am trying to import the exported DB dump from the client server using impdp command.

create directory dumpdir as '/home/oracle/exportDB';
impdp smithj/pwd4smithj@newdevdb schemas=smithj directory=dumpdir dumpfile=smithj.dmp logfile=expdpsmithj.log

But I am not getting how to mention local server (client server) path as directory.

when ever i try adding a virtual directory it is saying path doesn't exists.

This path /home/oracle/exportDB is in client server.

Can you please give me suggestions as I am out of options.

PS: I am doing this for a POC purpose in scenario where there is less space in DB server and cannot send the DB dump file to DB server because it is huge.
And please do not down vote question. I have searched many forums and no where this is referenced.

Best Answer

The dumpdir is always created from the perspective of the database (server). Your impdp command uses this directory. The best way would be to create a link to the target directory on the client, or mount a share or what ever you prefer. Then create the directory in Oracle using something like CREATE OR REPLACE DIRECTORY dumpdir AS '/mount/dump_directory_on_client/'; or CREATE OR REPLACE DIRECTORY dumpdir AS '\\client\dumpdir'; (for Windows, for example) and start the import again.