Take the 2-minute tour ×
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. It's 100% free, no registration required.

I have installed Oracle 11g to an ubuntu, I can connect to DB using sqlplus from the localhost, But I cannot connect from another computer, I have configured my tnsnames.ora as followed;

ELIF =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.15.58)(PORT = 1521))
(CONNECT_DATA =
  (SERVER = DEDICATED)
  (SERVICE_NAME = ELIF)
)
)

when I make a tnsping I got the following error;

Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.15.58)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SID = ELIF))) TNS-12541: TNS:no listener

Edit: "lsnrctl statu" and "netstat -an | grep 1521" results.

oracle@cms:~$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 25-JAN-2012 13:26:16

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                25-JAN-2012 02:33:02
Uptime                    0 days 10 hr. 53 min. 13 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /home/oracle/app/oracle/diag/tnslsnr/cms/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
Services Summary...
Service "ELIF" has 1 instance(s).
  Instance "ELIF", status READY, has 1 handler(s) for this service...
Service "ELIFXDB" has 1 instance(s).
  Instance "ELIF", status READY, has 1 handler(s) for this service...
The command completed successfully



oracle@cms:~$ netstat -an | grep 1521
tcp        0      0 127.0.0.1:1521          0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:32656         127.0.0.1:1521          ESTABLISHED
tcp        0      0 127.0.0.1:1521          127.0.0.1:32656         ESTABLISHED
unix  2      [ ACC ]     STREAM     LISTENING     115265   /var/tmp/.oracle/sEXTPROC1521
share|improve this question
    
We had the same problem, but with different cause.Though listener was configured to listen on server hostname, it really was listening on loopback interface only. The issue was in /etc/hosts file. It contains server hostname in line related to loopback (starting with 127.0.0.1). Remowing server hostname from that line solved our problem. –  user13330 Oct 10 '12 at 11:58
add comment

1 Answer 1

up vote 6 down vote accepted

Type:

lsnrctl start

On your Unix box. That starts the listener.

If you still can't connect after that it's either a firewall issue or the listener isn't configured.

share|improve this answer
    
my listener is started, and I can connect in linux box. my listener configuration is as followed can you help me with that configuration. –  dursun Jan 25 '12 at 7:41
    
Post the results of the following: "lsnrctl status" and "netstat -an | grep 1521". I suspect it's the listener only listening on localhost or your firewall's turned on. –  Phil Jan 25 '12 at 8:05
    
I have edited my question for lsnrctl status and netstat. –  dursun Jan 25 '12 at 8:35
1  
Ok, it's only listening on localhost. You need to edit /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora and replace "localhost" or "127.0.0.1" with the hostname of the linux box (it'll be after "HOST=" in the file). Then type "lsnrctl reload" –  Phil Jan 25 '12 at 9:14
    
thank you that solved my problem. –  dursun Jan 25 '12 at 11:04
add comment

Your Answer

 
discard

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.