0

I have installed 2 oracle databases (i.e) 2 different instances in a server. From Username, Password, SID, Listener everything is different. Like Mentioned Below.

Instance 1:
Username : TEST
Password : TEST123
Port : 1111
SID : ForTest

Instance 2:
Username : NEW
Password : NEW123
Port : 2222
SID : ForNew

I am trying to export a table from Instance 1, by giving the following EXPDP command.

EXPDP TEST/TEST123@ForTest DIRECTORY=EXP_DIREC DUMPFILE=MAP_TABLE.DMP version=11.1 TABLES=MAP_TABLE

I am getting the exception like,

UDE-12154: operation generated ORACLE error 12154
ORA-12154: TNS:could not resolve the connect identifier specified

Where can i specify, that the export should use specific instance.

RobinHood
  • 2,367
  • 11
  • 46
  • 73
  • ForTest is the connect identifier that you should have in your tnsnames.ora. Another way is to use the connect string like this (for **Instance 1**): `EXPDP TEST/TEST123@"(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(Host=YourHostName)(Port=1111)))(CONNECT_DATA=(SID=ForTest)))" DIRECTORY=EXP_DIREC DUMPFILE=MAP_TABLE.DMP version=11.1 TABLES=MAP_TABLE`. There is even a shorter way called EzConnect, but it requires the usage of service names and, depending on your OS, some quotes escaping. – stee1rat Jan 11 '16 at 14:39
  • In the Second way i am going, but getting the exception as, LRM-00116: syntax error at 'ADDRESS_LIST' following '(' – RobinHood Jan 11 '16 at 14:46
  • 1
    Try this: `EXPDP TEST/TEST123@\"(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(Host=YourHostNa‌​me)(Port=1111)))(CONNECT_DATA=(SID=ForTest)))\" DIRECTORY=EXP_DIREC DUMPFILE=MAP_TABLE.DMP version=11.1` – stee1rat Jan 11 '16 at 14:50
  • Thanks a lot. That is working fine. – RobinHood Jan 11 '16 at 14:51
  • That's the escaping I was talking about :) – stee1rat Jan 11 '16 at 14:52
  • I haven't look at the last point. Anyhow..once again thanks a lot..:) – RobinHood Jan 11 '16 at 14:53

1 Answers1

0

You already specified the instance

Try login to it

sqlplus is/pass@sid

and note error

check tnsnames and listener file

Cheers Brian

user1979139
  • 764
  • 5
  • 5