How to activate the firewall in oracleMTS Mode

Source: Internet
Author: User
Recently, when we set up a test environment, we found that after the firewall for listening to port 1521 is enabled, the remote connection still cannot be connected, and the database can be normally connected only when the ip address is not limited to the port. The reason is as follows: first, this database is MTS, that is, the sharing mode: SQLshowparametershared_servers; NAMETYPEVALUE ----------------

Recently, when we set up a test environment, we found that after the firewall for listening to port 1521 is enabled, the remote connection still cannot be connected, and the database can be normally connected only when the ip address is not limited to the port. The reason is as follows: first, this database is MTS, that is, the sharing mode: SQL show parameter shared_servers; NAME TYPE VALUE ----------------

Recently, when we set up a test environment, we found that after the firewall for listening to port 1521 is enabled, the remote connection still cannot be connected, and the database can be normally connected only when the ip address is not limited to the port.

The reason is as follows:

First, this database is MTS, that is, the sharing mode:

SQL> show parameter shared_servers;NAME                                 TYPE        VALUE------------------------------------ ----------- ------------------------------max_shared_servers                   integershared_servers                       integer     1

The connection mode in the shared mode is that the client will redirect to the dispatcher after listening for a connection such as 1521, And the dispatcher port is random. If you only activate 1521, you will not be able to connect to the database. You will find that the telnet ip address is 1521, but the database cannot be connected.

In this case, you can solve the problem as follows:

You can perform Dedicated mode connection on the client and add the SERVER = DEDICATED configuration in tnsnames. ora:

test =  (DESCRIPTION =    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.97.1)(PORT = 1521))    (CONNECT_DATA =     (SERVER = DEDICATED)      (SERVICE_NAME = test)    )  )

Then fix the dispatcher Port

# vi initSID.ora*.dispatchers="(address=(protocol=tcp)(port=49316))(dispatchers=3)"

Restart an instance

You can view the dispatcher port and then activate the Firewall:

SQL> select name,network from v$dispatcher;NAME----NETWORK--------------------------------------------------------------------------------D000(ADDRESS=(PROTOCOL=tcp)(HOST=auto_oracle.dmc.com)(PORT=49316))

Configure the firewall to allow access to the port 49316.

In this case, you need to activate two ports: 1521 and 49316.

Original article address: how to activate the firewall in oracle MTS mode, thanks to the original author for sharing.

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.