Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am having a problem connecting sql developer to my Oracle 10g database. sqlplus is able to connect fine, but when I try to open the connection in sql developer, I get 'ORA-12514 TNS does not know of service' error. I have tried modifying my tnsnames.ora file. It has the following:

COTT3 = 
  (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))

Can anyone assist with any other files I may need to modify or let me know where im going wrong?


UPDATE Output of lsnrctl status

 [oracle@VM-COT-DEV1 ~]$ lsnrctl status

LSNRCTL for Linux: Version - Production on 02-FEB-2012 13:57:20

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version - Production
Start Date                02-FEB-2012 13:01:25
Uptime                    0 days 0 hr. 55 min. 54 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /opt/oracle/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File         /opt/oracle/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
Services Summary...
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

enter code here
share|improve this question
What is the JDBC url you use in SQL Developer? – a_horse_with_no_name Feb 2 '12 at 12:40
SYS@//localhost:1521/COTT3 – BON Feb 2 '12 at 14:06
That's not a JDBC url (they start with jdbc:) – a_horse_with_no_name Feb 2 '12 at 14:07
up vote 3 down vote accepted

Try this:

COTT3 = 
  (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))

If that doesn't work, replace "SERVICE_NAME" with "SID".

Put this in $ORACLE_HOME/network/admin/listener.ora:

        (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))

    (SID_DESC =
      (SID_NAME = COTT3)
          (ORACLE_HOME = /opt/oracle/oracle/product/10.2.0/db_1 )

Then restart the listener with:

lsnrctl reload

Are you 100% sure that the database has started up?


ps auxww | grep pmon | grep -i cott3

... produce any output?

share|improve this answer
No that didn't work :( – BON Feb 2 '12 at 12:16
Post the command-line output of "lsnrctl status". Are you on Windows or Linux? – Phil Feb 2 '12 at 12:26
I am using linux, added output above – BON Feb 2 '12 at 13:59
Added listener config – Phil Feb 2 '12 at 14:06
Awesome! The stuff I added to the listener.ora file did the trick! Thanks so much :) – BON Feb 2 '12 at 14:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.