The oracle client could not connect to the server. The solution was to try to connect to the oracle server today, but it was always unsuccessful. later it was discovered that the firewall was enabled on the server, so the firewall added an exception port: 1521, I thought it would always be possible to connect this time, because the port number of the oracle listener is 1521, and the connection still fails. After checking the information on the Internet, it turns out that enabling port 1521 cannot solve the problem. oracle's network listener only acts as an intermediary. When the customer connects to it, it finds the corresponding database instance process according to the configuration, and creates a new database connection. The connection port is transmitted to the client by the network listener, and then the client uses the new port number to interact with the server. This new connection port is unpredictable and will be blocked by the firewall. Solution: The Windows Socket2 standard has a new feature: Shared Socket. The so-called Shared Socket refers to the Socket where one process shares another process (For details, refer to the MSDN reference ). If you want the network listener to share the socket with the database service process, the connection port will not change. How to Set Shared Socket? Create a new string value in the Registry: HKEY_LOCAL_MACHINE \ SOFTWARE \ ORACLE \ HOME0: USE_SHARED_SOCKET = true. If multiple directories are installed, you must set HKEY_LOCAL_MACHINE \ SOFTWARE \ ORACLE \ HOMEx (x Directory number) for each directory to restart the instance.