I have tried many methods on the Internet, and the following common methods listed on the Internet are invalid for me, and they are all normal.
1. First check whether the network can be pinged. The network status in the figure below is correct.
2. Check whether the server monitoring service is started.
3. cmd -> tnsping ip address (or the instance name of the server, SID). If "TNS-12535: Operation timed out" is reported, it may be that the firewall on the server side is not closed.
4. cmd -> netstat -na to check whether port 1521 is closed, or set port 1521 as an exception
5. cmd-》lsnrctl status Check the monitoring status
chart, if the monitoring does not support services, etc., it can be basically determined in the D:\oracle\product\10.2.0\db_1\network\admin\listener.ora file or tnsnames.ora file There is a problem
with the following code in the listener.ora file:
Is HOST in this code your host name or IP, if not, please modify it to the corresponding host name and IP or localhost
# listener.ora Network Configuration File: D:\oracle\product\10.2.0\db_1\network\admin\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = D:\oracle\product\10.2.0\db_1)
(PROGRAM = extproc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
)
In the tnsnames.ora file,
is the HOST in this code your host name or IP? If not, please modify it to the corresponding host name and IP or localhost
# tnsnames.ora Network Configuration File: D:\oracle\product\10.2.0\db_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
LISTENER_ORCL =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST =localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
6. I solved it myself
Restart the two services shown in the figure below to solve the problem