Cal
Cal

Reputation: 867

Oracle: Remotely import using Impdp with DB link

I'm trying to import a schema using data pump. Here's my problem: I can only access the utility on the source DB server, but it's version 11.1, and the target DB version is 11.2, so if I run the import, I got an error:

UDI-00018: Data Pump client is incompatible with database version 11.01.00.06.00

I want to work around this by using my laptop, installed with the Oracle express version 11.2, same version as the target DB, by using this command:

impdp username/password@targetDB directory=data_pump_dir network_link=sourceDB schemas=EMP

In this command, targetDB is a public db link created on my local oracle, and the same record has been added to tnsnames.ora; sourceDB is a public db link created in the target DB, pointing to the source DB.

But I got this error:

Connected to: Oracle Database 11g Release 11.2.0.2.0 - 64bit Production
ORA-39001: invalid argument value
ORA-39200: Link name "sourceDB" is invalid.
ORA-12170: TNS:Connect timeout occurred

The source DB version is:

Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production PL/SQL Release 11.1.0.6.0 - Production
CORE 11.1.0.6.0 Production
TNS for 64-bit Windows: Version 11.1.0.6.0 - Production
NLSRTL Version 11.1.0.6.0 - Production

The target DB version is:

Oracle Database 11g Release 11.2.0.2.0 - 64bit Production
PL/SQL Release 11.2.0.2.0 - Production
CORE 11.2.0.2.0 Production
TNS for Linux: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production

My local DB version is:

Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production              
PL/SQL Release 11.2.0.2.0 - Production                                           
CORE    11.2.0.2.0  Production                                                         
TNS for 32-bit Windows: Version 11.2.0.2.0 - Production                          
NLSRTL Version 11.2.0.2.0 - Production  

So what did I do wrong?

Is there a way to import from the source to target?

Upvotes: 1

Views: 4351

Answers (1)

J. Chomel
J. Chomel

Reputation: 8395

It looks like you cannot access your local database remotely:

In order to avoid

ORA-12170: TNS:Connect timeout occurred Is to make sure that you are able to connect to the remote database.

I advise you start making sure it works with a simple query accessing the db-link:

SQL> select * from dual@sourceDB;

Another solution

Another solution to your problem is to specify the target version of the export file at the time you export it, e.g. with:

version=11.1

Upvotes: 0

Related Questions