Re: ORA-12514

From: <>
Date: Tue, 08 Jul 2008 16:17:04 +0200
Message-ID: <>

On Tue, 8 Jul 2008 03:59:02 -0700 (PDT), wrote:

>Have a 10g database on Solaris.
>Need to connect with an ordinary unix user ie not oracle.
>can connect with
>sqlplus username/password
>with the ORACLE_SID set in environment
>But if I append the SID like so:
>sqlplus username/password_at_REPORT
>I get "ORA-12514: TNS:listener does not currently know of service
>requested in connect
>Why the difference?
>BTW I have an application which builds a connect string like
>Also not quite sure if it good practice to define TNS_ADMIN or just
>rely on putting tnsnames.ora in $ORACLE_HOME/network/admin.

>sqlplus username/password
>with the ORACLE_SID set in environment

This doesn't use tnsnames.ora

in your tnsnames.ora you have

<whatever> should be equal to the service_name initialization parameter, and this should have been registered with the listener. Check this out by using lsnrctl services. If it has't been registered, issue
alter system register
in sqlplus.
The listener needs to start before the database, in order to make registration possible.

Best practice is
move tnsnames.ora, listener.ora and sqlnet.ora to /var/opt/oracle. This is a version independent directory. set TNS_ADMIN to /var/opt/oracle.

Sybrand Bakker
Senior Oracle DBA
Received on Tue Jul 08 2008 - 09:17:04 CDT

Original text of this message