Method 1:
Is the server operating system windows? If yes, find "configuration and migration tools, administration assistant for Windows NT (AAW)", find the leaf node of your Oracle Home directory in the AAW tree, right click, select properties. In the Properties dialog box, add a parameter named "use_shared_socket" with the value "true", and then restart the server.
The problem is that Oracle generates a thread (or process, I cannot remember) when responding to each client request. In this thread, it uses a random port to communicate with the client. After the preceding parameters are set, the unified port is used (tcp1521 by default ).
Method 2:
Create a new string value in the Registry: HKEY_LOCAL_MACHINE \ SOFTWARE \ oracle \ home0: use_shared_socket = true. If multiple directories are installed, set HKEY_LOCAL_MACHINE \ SOFTWARE \ oracle \ homex (X Directory number) for each similar directory)
Restart the instance after setting (only restart listener to find no effect)
Figure 1
Figure 2