TNS_ADMIN not working with DB links
From: Stephane Vachon <svachon_at_colt.mais.hydro.qc.ca>
Date: Mon, 2 May 1994 14:53:06 GMT
Message-ID: <Cp6K0I.6MC_at_ireq.hydro.qc.ca>
Date: Mon, 2 May 1994 14:53:06 GMT
Message-ID: <Cp6K0I.6MC_at_ireq.hydro.qc.ca>
Hi folks,
I've just noticed that when using the environment variable TNS_ADMIN pointing to a different directory than '/var/opt/oracle' everything is ok except for database links. It looks like database links are always looking for the file 'tnsnames.ora' located under '/var/opt/oracle/tnsnames.ora' instead of '$TNS_ADMIN/tnsnames.ora'. Is it a bug or what ???
Ex: TNS_ADMIN=/opt/etc export TNS_ADMIN TWO_TASK=TEST_CONNECTOR export TWO_TASK In file $TNS_ADMIN/tnsnames.ora TEST_CONNECTOR=(DESCRIPTION= (ADDRESS=
(COMMUNITY=TEST_COMMUNITY)
(PROTOCOL=tcp)
(HOST=machine.domain.bla.bla)
(PORT=1521)
) (CONNECT_DATA=
(SID=DATABASE)
) ) sqlplus system/manager Everything is OK. SQL> create public database link LNK1 using 'TEST_CONNECTOR'; SQL> database link created SQL> select * from sys.dual_at_LNK1; ERROR at line 1: ORA-12154: TNS:could not resolve database name but if you do the same test copying the file 'tnsnames.ora' into '/var/opt/oracle' everything works ok.
So we could say that an Oracle database link is not looking for the TNS_ADMIN environment variable but instead it's looking for the hard coded directory '/var/opt/oracle'.
svachon_at_mais.hydro.qc.ca Received on Mon May 02 1994 - 16:53:06 CEST