My Oracle Support Banner

DataPump Import Over a NETWORK_LINK Fails if the Database Link Contains Connection Qualifiers (Doc ID 811695.1)

Last updated on AUGUST 04, 2018

Applies to:

Oracle Database - Enterprise Edition - Version and later
Information in this document applies to any platform.
***Checked for relevance on 21-May-2013***


You created a database link with connection qualifiers: connect system/password

create public database link connect to system identified by password using '<tns-alias>';

and then started DataPump import to extract a schema from remote database:

#> impdp system/passwd directory=dpu logfile=impdp_test.log schemas=test

This raised the errors: Import: Release - 64bit Production on Monday, 16 February, 2009 15:56:12

Copyright (c) 2003, 2007, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release - 64bit Production
With the Partitioning, Data Mining and Real Application Testing options

ORA-39004: invalid state
ORA-39091: unable to determine logical standby and streams status
ORA-26667: invalid STREAMS parameter

Alternatively, when DataPump is started with DataPump API:

connect system/passwd
set serveout on
create or replace procedure CopySchema
   pschemafrom in varchar2,
   pschemato   in varchar2,
   net_link    in varchar2
) is
  hand number;
  vmessage varchar2(2000);

  hand := (operation   => 'IMPORT',
                              job_mode    => 'SCHEMA',
                              remote_link => net_link);

  dbms_datapump.add_file (handle    => hand,
                          filename  => 'impdp_test.log',
                          directory => 'DPU', 
                          filetype  => dbms_datapump.ku$_file_type_log_file);

  dbms_datapump.metadata_filter (handle => hand,
                                 name   => 'SCHEMA_LIST',
                                 value   => 'TEST');

  dbms_datapump.start_job (hand);

  when others then
    vmessage := sqlerrm;
    dbms_output.put_line (vmessage);

SQL> exec CopySchema (pSchemaFrom => 'TEST', pSchemaTo => 'TEST', net_link => 'X102A.ORACLE.COM@QUAL1');

ends with:

ERROR at line 1:
ORA-39004: invalid state
ORA-06512: at "SYS.COPY_SCHEMA", line 60
ORA-06512: at line 1

and the written logfile contains:

ORA-39091: unable to determine logical standby and streams status
ORA-26667: invalid STREAMS parameter X102A.ORACLE.COM@QUAL1


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.