Open Oracle Service port connection on Windows Server 2003 System firewall 1521 TNS timeout

Source: Internet
Author: User
Tags connect pack require socket thread dedicated server port number firewall

To enable Oracle clients to connect properly to an Oracle server with a firewall, it is not enough to open a 1521 or custom listening port alone.

The server installed Windows2003, and opened the system from the firewall, found in the connection on the firewall opened on the listening port 1521 still unable to connect, reported TNS connection Timeout error. Then try to shut down the firewall and connect to indicate what other ports are not open.

The connection operation still fails when I open port 1521. I suspect that there is a problem with the network, try using Telnet server_ip:1521, the connection is accepted, the 1521 port has been opened.

There is no way of querying Oracle data to understand that network listener only acts as a mediator, when the customer connects it, it looks for the corresponding database instance process according to the configuration, and then spawned a new database connection, the connection port by network Listener is passed to the client, and then the client is no longer dealing with it, even if listener stops working. This new connection port is unpredictable and will be blocked by the firewall.

A new feature of the Windows Socket2 specification is a shared socket, which is a socket for a process that shares another process (see the MSDN Reference for details). If you let network listener share sockets with the database service process, the connection port will not change.

How do I set a Shared Socket?

Create a new string value on the registry: HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME0: Use_shared_socket=true. If more than one directory is installed, each similar directory is set: Hkey_local_machine\software\oracle\homex (x directory number)

Require restart instance after setting

Oracle Original:

Use_shared_socket

You can set the Use_shared_socket parameter to TRUE to enable the use of SHARED sockets. If This parameter was set to TRUE, the network listener passes the socket descriptor for client connections to the database Thread. As a result, the client does not need to establish a new connection to the database thread and database connection time IM Proves. Also, all database connections share the "port number used by" network listener, which can is useful if you are Up Third-party proxy servers.

On Windows NT 4.0 Service Pack3 or earlier, enabling this option precludes bringing the network listener up or down in a C ASE where a database connection spawned by the network listener is active. Therefore, may

Need to shut down all of the databases serviced by a network, listener you can before down and bring a restart list Ener. This results to the way shared sockets have been implemented in WINSOCK2. WINSOCK2 does not

Allow a reliable thread to a network listener on "any port" which other connections are active. This isn't a issue on Windows NT 4.0 Service Pack 4 orlater. Oracle recommends that you upgrade to Windows NT 4.0 Service Pack 4 If you intend to set this parameter.

This parameter is a TCP/IP environment in dedicated server mode. If This parameter is set, your cannot use the 8.1.5 listener to spawn Oracle 7.x databases. To spawn a Oracle 8.0.x database from 8.1.5 Listener

Oracle Client Connection server, first to find 1521 listening port, the server's 1521 listening port to the server process process to issue a request, and return a random port, returned to the client, the client to connect to this port. This brings trouble to the firewall settings on the server, this port is random, how to open?

This problem on the Windows platform has become a big problem, and many forums have been asked, but few can solve it. UNIX platform do not worry, the system will automatically solve this problem.

This problem on the Windows platform has become a big problem, and many forums have been asked, but few can solve it. UNIX platform do not worry, the system will automatically solve this problem. The Matalink provides three solutions, in fact Use_shared_socket is the most effective and convenient. But after countless implementations, still no success, finally found that Oracle 8.1.7 bugs need to be patched, upgraded to Oracle 8.1.7.1.2

Required in MTS mode (shared mode)

Required in MTS mode (shared mode) Oracle is the private mode by default.

It was found that if the parameters were not set in the Init file, Oracle would still require a random port and 1521 ports to communicate with each other, but this random port, which does not change with the client session and login, is fixed when the server is not restarted.

It was found that if the parameters were not set in the Init file, Oracle would still require a random port and 1521 ports to communicate with each other, but this random port, which does not change with the client session and login, is fixed when the server is not restarted. (The experiment found that, in private mode, each connection, the Oracle server will provide a non-1521 port in +1 ways.) Therefore, you also need to add an argument to the end of the Init.ora file:

Mts_dispatchers= "(Address= (PROTOCOL=TCP) (HOST=MYORADB) (port=1521)) (Dispatchers=1)"

So that you can really implement a single port, through the firewall.

So that you can really implement a single port, through the firewall.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.