Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

tns alias connection weirdness

527623Jan 10 2008 — edited Jul 25 2010
Oracle 8.1.5 (ewww - I know)

I've got a single database on a server called PROD1. In the tnsnames.ora I have entries such as

mydatabase =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = host)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = PROD1)
)
)

PROD1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = host)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = PROD1)
)
)

Basically, they're both pointing to the same database. When I set my ORACLE_SID to PROD1 and try to connect, everything connects fine. When I try to use a connect string of username/password@mydatabase, I keep getting an ORA-1034 error - oracle not available. A client trace log file shows trying to use the alias and it appears in the log that everything works fine. A lsnrctl service command keeps incrementing the established connections. Nothing in the listener log regarding a refused connection.

Does anyone know what might be causing this?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 22 2010
Added on Jan 10 2008
25 comments
3,918 views