I am new to Oracle, attempting to learn about connecting remote clients to an Oracle 12c Database server instance.
SUMMARY: I cannot get TNSPING to work from a client machine to a known good database on a host machine.
DETAILS:
I am hosting the Oracle 12c database on my Windows 7 x64 development machine. I've done numerous tests of connecting to the database from that machine - TNSPING, SQL*Plus, ASP.Net web page, and they all connect to the database no problem. Great!
So I figured a next logical step is to try to connect from another client inside my network. I created a Win7 client using VirtualBox running on the same host (RM08) as the Oracle Database. I completely disabled Windows Firewall on that client machine. I then installed the Oracle Client on that virtual machine. That gives me SQL*Plus and various other tools, and led me through a configuration wizard to create a tnsnames.ora.
When I tnsping from that virtual/client machine to the Oracle host I get "ORA-12541: TNS: no listener". But I am confident the listener is in fact running, because the database works fine when I access from the host machine itself.
Further information:
-- The host machine has IP address 192.168.1.6
-- The virtual/client machine has IP address 10.0.2.15
-- From the client machine I get success when I ping the host
-- From the client machine I can successfully open up various ASP.Net web pages at http://192.168.1.6
-- Windows firewall is completely disabled on BOTH the client and host machines.
On the client machine, the tnsnames.ora file has contents:
ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.6)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)
)
On the client machine, when I issue:
tnsping orcl
I get:
C:\Users\rmvirt>tnsping orcl
TNS Ping Utility for 64-bit Windows: Version 12.1.0.2.0 - Production on 20-APR-2
016 14:11:37
Copyright (c) 1997, 2014, Oracle. All rights reserved.
Used parameter files:
C:\app\client\rmvirt\product\12.1.0\client_1\network\admin\sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)
(HOST = 192.168.1.6)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = orcl)))
TNS-12541: TNS:no listener
If I ping by IP address, I get a similar message, but it mentions EZCONNECT, I assume because I including that option when installing Oracle client:
C:\Users\rmvirt>tnsping 192.168.1.6
TNS Ping Utility for 64-bit Windows: Version 12.1.0.2.0 - Production on 20-APR-2
016 14:13:26
Copyright (c) 1997, 2014, Oracle. All rights reserved.
Used parameter files:
C:\app\client\rmvirt\product\12.1.0\client_1\network\admin\sqlnet.ora
Used EZCONNECT adapter to resolve the alias
Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS=(PROTO
COL=TCP)(HOST=192.168.1.6)(PORT=1521)))
TNS-12541: TNS:no listener
Finally, if I issue
tnsping badname, I get:
C:\Users\rmvirt>tnsping badname
TNS Ping Utility for 64-bit Windows: Version 12.1.0.2.0 - Production on 20-APR-2
016 14:15:15
Copyright (c) 1997, 2014, Oracle. All rights reserved.
Used parameter files:
C:\app\client\rmvirt\product\12.1.0\client_1\network\admin\sqlnet.ora
TNS-03505: Failed to resolve name
That at least gives me confidence that my tnsnames.ora file is syntactically correct and being referenced.
I have read this somewhat similar question, with no luck: Using Oracle client to connect to remote database
I have also read the "Testing Connections" section from the "Database Net Services Administrators Guide" at Using Oracle client to connect to remote database.
But I am still stumped.
Can anyone suggest other troubleshooting steps?
Thanks!
listener.ora
look like? You're not usinglocalhost
for the host name, are you?