I have two oracle database "orcl" and "orcl1" and each database i have two schemas( hr&log ) in the two databases with the same schema name . Now i have two tables table := A AND table := B . These tables are present in the database "orcl" in "HR" schema ,i want to import the data of the tables(A,B) from hr schema in orcl database to "log schema " in orcl1 database.Here i have created the structure of the tables (A & B) in hr schema in orcl1 database. When i use impdp command it is throwing error.

impdp hr/user@orcl1 tables=a,b directory=sys dumpfilename=a_b.dmp logfile=a_b.log

"table or object not found"

I have created both the objects in the orcl1 database and given necessary grants to the tables like select,insert to public

Can any one suggest me and approach .

Thank you.


It is not required to precreate the tables before importing.

First export the two tables:

expdp hr/user@orcl tables=a,b directory=sys dumpfilename=a_b.dmp logfile=a_b_exp.log

After that you can import them:

impdp hr/user@orcl1 tables=a,b directory=sys dumpfilename=a_b.dmp logfile=a_b_imp.log

Alternatively, create a database link in orcl1 pointing to orcl, and import the tables using it, without a dumpfile:

connect hr/user@orcl1
create database link orcl_link connect to hr identified by user using 'orcl';

impdp hr/user@orcl1 tables=a,b directory=sys network_link=orcl_link logfile=a_b_imp.log

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.