Saturday, March 4, 2017

impdp using network_link parameter ORA-39113: Unable to determine database version


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 devdb connect to system identified by ******  using 'devdb';

Database link created.

oradev.domain.com:DEVDB:/opt/oracle/scripts $ impdp nologfile=y network_link=devdb parallel=8  content=metadata_only directory=SCRIPTS_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 'DEVDB'
ORA-06550: line 1, column 7:
PLS-00201: identifier 'SYS@DEVDB' 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
DEVDB
SYSTEM

devdb
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:

So create public database link and try import job again

SQL> create public database link devdb_link connect to system identified by ****** using 'devdb';

Database link created.

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

OWNER
--------------------------------------------------------------------------------
DB_LINK
--------------------------------------------------------------------------------
USERNAME
--------------------------------------------------------------------------------
HOST
--------------------------------------------------------------------------------
CREATED
---------
SYS
DEVDB   àold db link
SYSTEM
devdb
03-MAR-17

PUBLIC
DEVDB_LINK   à New db link
SYSTEM
devdb
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

oradev.domain.com:DEVDB:/opt/oracle/scripts $ impdp nologfile=y network_link=devdb_link parallel=8 content=metadata_only directory=SCRIPTS_DIR   schemas=FMUSER

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=devdb_link parallel=8  content=metadata_only directory=SCRIPTS_DIR schemas=FMUSER
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

Now my import job runs fine….

NOTE:  We cannot import objects containing LONG columns from remote DB over network_link

Please check here:

Reference:

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

0 comments:

Post a Comment

Auto Scroll Stop Scroll