Public database link does not work

Hello

I want to create a link from public database between 2 server in a different physical location, but in an intranet. Once I created the public database link... I keep having this error



ORA-12154: TNS: could not resolve service name
12154 00000 - "TNS: could not resolve the connect identifier specified.


*(Server 1-German-11gR2) *.
TNS:

Server1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = 178.44.44.45)(PORT = 15210))
)
(CONNECT_DATA =
(SID = server1)
(SERVER = DEDICATED)
)
)




* Server (2-Malaysia-9iR2). *
AMT:

Server2 =
(DESCRIPTION =
(FAILOVER = ON)
(LOAD_BALANCE = OFF)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = 178.44.44.35)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP) (HOST = 178.44.44.81)(PORT = 1521))
)
(SDU = 32777)
(CONNECT_DATA =
(SERVICE_NAME = PROD_server2)
)
)



I just want to create a database link course where Server 2 can enter the data on server 1, so I create my link database to Server 2. However, I always saw the problem. The TNSi under here are sample test, but it is working very well in here when connect you using the sql and sql navigator developer. (I think that nothing wrong with the tns) but is somehow the error message given TNS: could not resolve service name. So I don't really know what has gone wrong... PLEASE HELP ~ ~



~ Vincent.

Hello
If you create the link db on server 2 so you need a tnsnames.ora entry that points to the server 1.
You should have an entry in the file tnsnames.ora on server - 2

Server1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = 178.44.44.45)(PORT = 15210))
)
(CONNECT_DATA =
(SID = server1)
(SERVER = DEDICATED)
)
)

then create the database on server 2 - link

CREATE DATABASE LINK PUBLIC 'server1_schemaA '.
CONNECT to schemaA
IDENTIFIED BY password
Using "Server1."

Kind regards
Mike

Tags: Database

Similar Questions

Maybe you are looking for