This discussion is archived
3 Replies Latest reply: Dec 25, 2011 1:47 PM by Oracle-user2 RSS

ORA-12514, TNS:listener does not currently know of service request

Oracle-user2 Newbie
Currently Being Moderated
pardon my potential dumb question...i'm trying to connect to oracle via sqldeveloper on oel5u6
when i use SID connection works but when I use Service Name (the one i useon windows) it gives the below error why?
Status : Failure - Test failed : Listener refused the connection with the following error : ORA-12514. TNS:listener does not currently know of service requested in connect descriptor.

do we use SID on linux boxes and service name on windows boxes? appreciate any enlightenment . tq

SqlDeveloper 3.0.04 OEL5u6
Oracle 11gR2 OEL5u6
jdkpath=/usr/java/jdk1.6.0_30

gave the below details:

user: system
password: system_password

host: hostname: oel5u6.localdomain (tried all other combos too i.e. localhost, ip address etc.)
port:1521
service name:orcl

provided all the details ....did some searching the forums too.....still no luck

*$ORACLE_HOME*
[oracle@oel5u6 bin]$ echo $ORACLE_HOME
/home/oracle/app/oracle/product/11.2.0/dbhome_2
*$ORACLE_SID*
[oracle@oel5u6 bin]$ echo $ORACLE_SID
orcl
oracle instance started
SQL> startup
ORACLE instance started.

Total System Global Area 1707446272 bytes
Fixed Size                  1336988 bytes
Variable Size             989858148 bytes
Database Buffers          704643072 bytes
Redo Buffers               11608064 bytes
Database mounted.
Database opened.
tnsnames.ora
# tnsnames.ora Network Configuration File: /home/oracle/app/oracle/product/11.2.0/dbhome_2/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

LISTENER_ORCL =
  (ADDRESS = (PROTOCOL = TCP)(HOST = oel5u6.localdomain)(PORT = 1521))


ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = oel5u6.localdomain)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )
listener.ora
# listener.ora Network Configuration File: /home/oracle/app/oracle/product/11.2.0/dbhome_2/network/admin/listener.ora
# Generated by Oracle configuration tools.

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = oel5u6.localdomain)(PORT = 1521))
    )
  )

ADR_BASE_LISTENER = /home/oracle/app/oracle
tnsping orcl
[oracle@oel5u6 bin]$ $ORACLE_HOME/bin/tnsping orcl

TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 24-DEC-2011 02:09:13

Copyright (c) 1997, 2009, Oracle.  All rights reserved.

Used parameter files:
/home/oracle/app/oracle/product/11.2.0/dbhome_2/network/admin/sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = oel5u6.localdomain)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))
OK (0 msec)
lsnrctl status
[oracle@oel5u6 bin]$ $ORACLE_HOME/bin/lsnrctl status

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 24-DEC-2011 02:09:17

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                24-DEC-2011 01:51:45
Uptime                    0 days 0 hr. 17 min. 31 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /home/oracle/app/oracle/product/11.2.0/dbhome_2/network/admin/listener.ora
Listener Log File         /home/oracle/app/oracle/diag/tnslsnr/oel5u6/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oel5u6.localdomain)(PORT=1521)))
Services Summary...
Service "orcl.localdomain" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB.localdomain" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully
sql developer startup log via terminal
Oracle SQL Developer
 Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 

Type the full pathname of a J2SE installation (or Ctrl-C to quit), the path will be stored in ~/.sqldeveloper/jdk
/usr/java/jdk1.6.0_30
Edited by: Oracler on Dec 24, 2011 12:04 AM

Edited by: Oracler on Dec 24, 2011 12:43 AM