hi all,
i have 2 database in the same host namely NEWDB and orcl.
I want to execute expdp orcl's data over a network_link to newdb 's directory location. (expdp is run in newdb)
On the source database
PUMPUSE@orcl 26-AUG-15 21:31:58> show parameter db_name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_name string orcl
PUMPUSE@orcl 26-AUG-15 21:47:15> show user
USER is "PUMPUSE" -- without "r"
PUMPUSE@orcl 26-AUG-15 21:45:01> select * from test;
A
----------
1
On the target database.
PUMPUSER@orcl3 26-AUG-15 21:42:32> show parameter db_name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_name string NEWDB
PUMPUSER@orcl3 26-AUG-15 21:53:02> show user
USER is "PUMPUSER" -- with a "r" unlike in source database
[oracle@SJOAM trace]$ tnsping orcl
Used parameter files:
/u01/app/grid/product/11.2.0.4/grid/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (description= (address_list= (address=(protocol=TCP)(host=SJOAM.oracleszejie.com)(PORT=1521))) (connect_data= (service_name=main.oracleszejie.com)))
OK (0 msec)
PUMPUSER@orcl3 26-AUG-15 21:48:30> select * from user_db_links;
no rows selected
PUMPUSER@orcl3 26-AUG-15 21:48:36> create database link orcl connect to PUMPUSE identified by abc123 using 'orcl';
Database link created.
PUMPUSER@orcl3 26-AUG-15 21:49:05> select * from test@orcl;
A
----------
1
WIth the database link "orcl" working on the target db(newdb), i issue the following
[oracle@SJOAM trace]$ expdp pumpuser/abc123 network_link=orcl dumpfile=orcl.dmp directory=export logfile=export.log
Export: Release 11.2.0.4.0 - Production on Wed Aug 26 21:50:40 2015
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
ORA-39001: invalid argument value
ORA-39200: Link name "orcl" is invalid.
ORA-12154: TNS:could not resolve the connect identifier specified
[oracle@SJOAM trace]$
Why is it not working when using expdp , but when inside database, select using the db link "orcl" works.
Please advise.
Regards,
Noob