Saturday, April 1, 2017

ORA-39113: Unable to determine database version during impdp network_link

SOURCE and TARGET databases are 12c databases

First copy the TNS of Source DB to the target side and test whether you are able to do tnsping the source db which we have copied

From Target DB:

Create a database link pointing to Source DB

SQL> create database link MYLINK connect to system identified by ****** using 'MYTARGET_TNS';

Database link created.

oradev01.domain.com:MYSOURCE1:/opt/oracle/scripts $ impdp nologfile=y network_link=MYTARGET parallel=8 sqlfile=abc.sql content=metadata_only directory=EXP_DIR

Import: Release 12.1.0.2.0 - Production on Fri Mar 3 16:20:14 2017

Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.

Username: system
Password:

Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options
ORA-39006: internal error
ORA-39113: Unable to determine database version
ORA-06550: line 1, column 7:
PLS-00352: Unable to access another database 'MYTARGET'
ORA-06550: line 1, column 7:
PLS-00201: identifier 'SYS@MYTARGET' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

ORA-39097: Data Pump job encountered unexpected error -6550


SQL> select * from dba_db_links;

OWNER
--------------------------------------------------------------------------------
DB_LINK
--------------------------------------------------------------------------------
USERNAME
--------------------------------------------------------------------------------
HOST
--------------------------------------------------------------------------------
CREATED
---------
SYS
MYTARGET
SYSTEM

MYTARGET_TNS
03-MAR-17


SQL> sho parameter global

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
global_context_pool_size             string
global_names                         boolean     FALSE
global_txn_processes                 integer     1


Reason:

According to Oracle "private db links would not work in expdp/impdp"


SOLUTION:

SQL> create public database link MYTARGET_LINK connect to system identified by *****  using 'MYTARGET_TNS';

Database link created.

SQL> set pages 999
SQL>  select * from dba_db_links;

OWNER
--------------------------------------------------------------------------------
DB_LINK
--------------------------------------------------------------------------------
USERNAME
--------------------------------------------------------------------------------
HOST
--------------------------------------------------------------------------------
CREATED
---------
SYS
MYTARGET
SYSTEM
MYTARGET_TNS
03-MAR-17

PUBLIC
MYTARGET_LINK
SYSTEM
MYTARGET_TNS
03-MAR-17


SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options
oradev01.domain.com:MYSOURCE1:/opt/oracle/scripts $ impdp nologfile=y network_link=MYTARGET_link parallel=8 sqlfile=abc.sql content=metadata_only directory=SCRIPTS_DIR      schemas=myschema

Import: Release 12.1.0.2.0 - Production on Fri Mar 3 19:19:20 2017

Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.

Username: system
Password:

Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options
Starting "SYSTEM"."SYS_SQL_FILE_SCHEMA_01":  system/******** nologfile=y network_link=MYTARGET_link parallel=8  content=metadata_only directory=SCRIPTS_DIR schemas=myschema
Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/PASSWORD_HISTORY
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/DB_LINK
Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
Processing object type SCHEMA_EXPORT/TABLE/PROCACT_INSTANCE
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT


Reference:

ORA-39113 When Running A DataPump Job Through NETWORK_LINK (Doc ID 2100177.1)



0 comments:

Post a Comment

Auto Scroll Stop Scroll