When encountering a ORA-12505: TNS: Listen Program Currently, you cannot identify the SID and other errors in the connection descriptor. You need to check the following Configuration:
1. check the tnsnames in the database client $ oraclehome/client_1/Network/Admin directory. the ora file is used to check whether the Listener Configuration of the Client Connection server is correct. The following configuration is used to connect to the listener of the local database server. The red mark is particularly important:
Orcl_localhost =
(Description =
(Address_list =
(Address = (Protocol = TCP )( Host = localhost )( Port = 1521 ))
)
(CONNECT_DATA =
(SID = Orcl )
(Server = dedicated)
)
)
2. check the listener in the $ oraclehome/db_1/Network/Admin directory of the database server. check whether the ora file is correctly configured. If the file is incorrectly configured, the client cannot connect to the server in any way. The following is the listener. some configurations of ora:
Listener =
(Description_list =
(Description =
(Address = (Protocol = IPC) (Key = extproc1 ))
(Address = (Protocol = TCP )( Host = lihe ) (Port = 1521 ))
))
The host marked in red is a special note. It is your computer name and cannot be simply written as localhost. If you are not sure about the computer name, you can use the DBA to log on to sqlplus.
Select host_name from V $ instance statement to query the host name.
The above problem may occur when the IP address of the local machine is changed or the computer name is manually changed. Check the configuration, change the database listening IP address, and restart the TNS listening service.