Hi,
I have a 12.1.0.2 single instance database running on Linux server. Port - 1521
I am not able to connect to the database from my local system.
sqlnet.ora contents
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
SQLNET.EXPIRE_TIME=5
tnsnames.ora contents (on both the server and remote machine)
SIT =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = dbserver01)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = SIT)
)
)
listener.ora contents
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = dbserver01)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = SIT)
(ORACLE_HOME = /u01/app/oracle/product/12.1.0.2/dbhome_1)
(SID_NAME = SIT)
)
)
LISTENER status:
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbserver01)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias listener
Version TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start Date 26-JUL-2017 23:46:09
Uptime 0 days 0 hr. 18 min. 22 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/12.1.0.2/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/dbserver01/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dbserver01)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "SIT" has 2 instance(s).
Instance "SIT", status UNKNOWN, has 1 handler(s) for this service...
Instance "SIT", status READY, has 1 handler(s) for this service...
Service "SITXDB" has 1 instance(s).
Instance "SIT", status READY, has 1 handler(s) for this service...
The command completed successfully
When I do a ping from the local server using the IP address, it works. But when I do a ping using the server name, I get "Ping request could not find host dbserver01. Please check the name and try again".
I tried changing the hostname to the IP address in the listener.ora and tnsnames.ora file, still no success.
Using IP address:
C:> sqlplus system/xxxx@SIT
TNS-12535: TNS:operation timed out
Using hostname:
C:> sqlplus system/xxxx@SIT
ORA-12545: Connect failed because target host or object does not exist