Please note that I changed details for security purposes. However, the problem remains intact.
I installed an Oracle 11g database on a server at location, say, herp-devDV.derp.edu. Now I have another Oracle 11g database on a server at location, say, derp-db.derp.edu.
I entered the connection name, username, password, hostname, and service name in Oracle SQL developer for both herp-devDV.derp.edu and derp-db.derp.edu. I can connect to schema in derp-db.derp.edu, but not herp-devDV.derp.edu. It gives me this message:
Failure - Test failed: The Network Adapter could not establish the connection
I have the following information:
lsnrctl status
I received the following output
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 64-bit Windows: Version 11.2.0.1.0 - Production
Start Date 03-JUN-2014 13:37:22
Uptime 6 days 0 hr. 53 min. 4 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File D:\oracle\product\11.2.0\dbhome_1\network\admin\listener.ora
Listener Log File d:\oracle\diag\tnslsnr\HERP-DEVDB\listener\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=HERP-DEVDB.derp.edu)(PORT=1521)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "HERPDEVDBXDB" has 1 instance(s).
Instance "herpdevdb", status READY, has 1 handler(s) for this service...
Service "herpdevdb" has 1 instance(s).
Instance "herpdevdb", status READY, has 1 handler(s) for this service...
The command completed successfully
I then check out my listener.ora and find
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = D:\oracle\product\11.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:D:\oracle\product\11.2.0\dbhome_1\bin\oraclr11.dll")
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = HERP-DEVDB.derp.edu)(PORT = 1521))
)
)
At this point, I confess I am scratching my head as I don't see anything sticking out and telling me why this should not be working.
The only clue is when I check derp-db.derp.edu and run the command lsnrctl status
. Please
see excerpt below:
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DERP-DB.edu)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 64-bit Windows: Version 11.2.0.3.0 - Production
Start Date 18-MAY-2014 02:19:01
Uptime 22 days 12 hr. 23 min. 18 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
---etc----
So I am still scratching my head. Why would derp-db be connecting to the DERP-DB.edu but herp-devDB is connecting to EXTPROC1521? How do I fix this? The listener.ora and other files between these two servers are almost identical except for the name of the instances. Hmmm.
EDIT1: I changed the listener.ora in herp. This didn't fix it.
EDIT2: I cannot telnet into derp-db.derp.edu on port 1521. But I can still connect to it with SQL Developer? Wth?
Anyway assistance would be greatly appreciated. Thanks
Regards, Geeky
Restart it with the "lsnrctl start" command or on a Windows OS by starting the listener service. Ensure the correct hostname is specified in listner. ora. Add the hostname and IP address in the hosts file located under C:\Windows\System32\drivers\etc folder.
I am answering this for the benefit of future community users. There were multiple issues. If you encounter this problem, I suggest you look for the following:
Once I did these three things, I solved my problem.
I had a similar issue where I also continuously got the same error. I tried many things like changing the listener port number, turning off the firewall etc. Finally I was able to resolve the issue by changing listener.ora file. I changed the following line:
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
to
(ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1521))
I also added an entry in the /etc/hosts
file.
you can use Oracle net manager to change the above line in listener.ora file. See Oracle Net Services Administrator's Guide for more information on how to do it using net manager.
Also you can use the service name (database_name.domain_name
) instead of SID while making the connnection.
I Hope it helps.
I just had same issue when I installed the oracle 11g and then creating the database.
I don't even know that the listener has to create manually. Hence, I open Net Configuration Assistant and manually create the listener.
And I can connect the database that I created locally through sql developer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With