Re: ORA-12514

From: <sybrandb_at_hccnet.nl>
Date: Tue, 08 Jul 2008 16:17:04 +0200
Message-ID: <8et674dlnbrlo3r65b1hil1o45no100tku@4ax.com>


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

>Hello,
>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
>descriptor"
>Why the difference?
>BTW I have an application which builds a connect string like
>"username/password_at_REPORT".
>Also not quite sure if it good practice to define TNS_ADMIN or just
>rely on putting tnsnames.ora in $ORACLE_HOME/network/admin.
>
>TIA
>
>Martin

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

This doesn't use tnsnames.ora

ora-12514.
in your tnsnames.ora you have
connect_data=((host=)(protocol=tcp)(port=xxx)(*service_name=<whatever>*)

<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