Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> SUMMARY: ORA-12154: TNS:could not resolve service name

SUMMARY: ORA-12154: TNS:could not resolve service name

From: Jason Martin <jhmartin_at_bifrost.dhs.org>
Date: Tue, 27 Nov 2001 12:36:53 -0800
Message-ID: <Pine.LNX.4.33L2.0111271229570.19228-100000@services.bifrost.dhs.org>


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

As it turns out, the tnsnames.ora file is very sensitive to spacing. My file (slightly munged here) was:

somedbalias=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP)(HOST=the.database.host)(PORT=1521))
(CONNECT_DATA=(SID=xyz))

)

I couldn't tnsping it either, although I could telnet to the database port. The database server was on a remote host.

The trick was that I had to add spaces before all lines other then 'somedbalias', ie:

somedbalias=

   (DESCRIPTION=

      (ADDRESS=(PROTOCOL=TCP)(HOST=the.database.host)(PORT=1521))
      (CONNECT_DATA=(SID=xyz))

    )

One usually assumes the spacing is for readabiilty only, instead of being crucial to operation.

Oracle 8.0.4.0.0/SUN
- -Jason Martin
- --
Honey, PLEASE don't pick up the PH$@#*&$^(#@&$^%(*NO CARRIER PGP KeyID=0xEA954813 available from keyservers. Fingerprint:3B07 518C D76E 572F 7DAA 88A5 9763 835A EA95 4813

"They that give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -- Benjamin Franklin, 1759. -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: pgpenvelope 2.10.2 - http://pgpenvelope.sourceforge.net/

iEYEARECAAYFAjwD+XYACgkQl2ODWuqVSBNHoQCeLjooOV1IH4hiZ0+7Auc7Nkzs X4YAn0gmwrzKViW6kRMsIm6amJudQvCd
=uPrA
-----END PGP SIGNATURE----- Received on Tue Nov 27 2001 - 14:36:53 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US