Порт 1521 oracle для чего
Перейти к содержимому

Порт 1521 oracle для чего

  • автор:

Порт 1521 oracle для чего

Review this information for port numbers and protocols used by components that are configured during the installation. By default, the first port in the range is assigned to the component, if it is available.

Table E-1 Ports Used in Oracle Components

Cluster Synchronization Service daemon (CSSD)

The Cluster Synchronization Service (CSS) daemon uses a fixed port for node restart advisory messages.

This port is used on all interfaces that have broadcast capability. Broadcast occurs only when a node eviction restart is imminent.

Grid Plug and Play (GPNPD)

GPNPD provides access to the Grid Plug and Play profile, and coordinates updates to the profile among the nodes of the cluster to ensure that all of the nodes have the most recent profile.

Multicast Domain Name Service (mDNS)

The mDNS process is a background process on Linux and UNIX, and a service on Window, and is necessary for Grid Plug and Play and GNS.

Oracle Cluster Registry

The port number is assigned automatically during installation. You cannot view or modify it afterward.

Oracle Clusterware Daemon (CRSD)

Oracle Clusterware daemon internode connection. The port number is assigned automatically during installation. You cannot view or modify it afterward.

Oracle Connection Manager

Listening port for Oracle client connections to Oracle Connection Manager. You can configure Oracle Connection Manager after installation using NETCA.

Quality of Management Service (QOMS) Server

The CRS Agent uses port 8888 locally to manage the lifecycle of the container.

Quality of Management Service (QOMS) Server

Port for the Quality of Management Service server.

Oracle Fleet Patching and Provisioning Server

Port for the Oracle Fleet Patching and Provisioning server.

Oracle Fleet Patching and Provisioning Server

Port for the Oracle Fleet Patching and Provisioning server.

Oracle Data Guard

Shares the Oracle Net Listener port and is configured during installation. To reconfigure this port, use Oracle Net Configuration Assistant (NETCA) to reconfigure the listener.

1521 (same value as the listener)

modifiable manually to any available port

Oracle Event Manager (EVM)

Generates events for Oracle Clusterware. The port number is assigned automatically during installation. You cannot view or modify it afterward.

Oracle Grid Interprocess Communication (GIPCD)

A support daemon that enables Redundant Interconnect Usage.

Oracle Grid Naming Service (GNSD)

The Oracle Grid Naming Service daemon performs name resolution for the cluster.

Oracle Grid Naming Service (GNSD)

The Oracle Grid Naming Service daemon performs name resolution for the cluster.

Oracle HA Services daemon (OHASD)

The Oracle High Availability Services (OHAS) daemon starts the Oracle Clusterware stack.

Oracle Net Listener

Allows Oracle client connections to the database by using Oracle Net Services. You can configure this port during installation. To reconfigure this port, use NETCA.

Port number changes to the next available port.

Modifiable manually to any available port.

Oracle Notification Services (ONS)

Port for ONS, used to publish and subscribe service for communicating information about Fast Application Notification (FAN) events. The FAN notification process uses system events that Oracle Database publishes when cluster servers become unreachable or if network interfaces fail.

Use srvctl to modify ONS ports.

Oracle Real Application Clusters

The port number is assigned automatically during installation. You cannot view or modify it afterward.

Oracle XML DB (FTP)

The Oracle XML DB FTP port is used when applications need to access an Oracle database from an FTP listener. The port is configured during installation and you cannot view it afterward.

Refer to Oracle XML DB Developer’s Guide for information about changing this port number.

Oracle XML DB (HTTP)

The Oracle XML DB HTTP port is used if Web-based applications need to access an Oracle database from an HTTP listener. The port is configured during installation and you cannot view it afterward.

Refer to Oracle XML DB Developer’s Guide for information about changing this port number.

Oracle Trace File Analyzer (TFA)

The Oracle Trace File Analyzer (TFA) daemons in a cluster communicate securely over ports 5000 to 5005.

Red-Database-Security GmbH is specialized in Oracle Security

The following table contains Oracle default ports for different products like Oracle Database or Oracle Application Server.
Changing the default ports can help to stop simple attacks but not real portscans. In the world of Oracle it is very often not possible to change the default port because the port is hardcoded.

At least for the Oracle database (except iasdb) it’s is recommended to change the TNS listener port from 1521/1526 to something else.

F Managing Oracle Database Port Numbers

This appendix lists the default port numbers and describes how to change the assigned port after installation. This appendix contains the following topics:

F.1 About Managing Ports

During installation, Oracle Universal Installer (OUI) assigns port numbers to components from a set of default port numbers. Many Oracle Real Application Clusters (Oracle RAC) components and services use ports. As an administrator, it is important to know the port numbers used by these services, and to ensure that the same port number is not used by two services on your system.

Most port numbers are assigned during installation. Every component and service has an allotted port range, which is the set of port numbers Oracle RAC attempts to use when assigning a port. Oracle RAC starts with the lowest number in the range and performs the following:

Is the port used by another Oracle Database installation on the system?

The installation can be either active or inactive at the time; Oracle Database can still detect if the port is used.

Is the port used by a process that is currently running?

This could be any process on the host, including processes other than Oracle Database processes.

If the answer to any of the preceding questions is yes, then Oracle RAC moves to the next highest port in the allotted port range and continues checking until it finds a free port.

F.2 Viewing Port Numbers and Access URLS

In most cases, the Oracle Database component’s port number is listed in the tool used to configure the port. In addition, ports for some Oracle Database applications are listed in the portlist.ini file. This file is located in the directory %ORACLE_HOME %\install .

If you change a port number after installation, then it is not updated in the portlist.ini file, so you can rely on this file only immediately after installation. To find or change a port number, use the methods described in this appendix.

F.3 Port Numbers and Protocols of Oracle Components

Table F-1 lists the port numbers and protocols used by components that are configured during the installation. By default, the first port in the range is assigned to the component, if it is available.

Table F-1 Ports Used in Oracle Components

The port number is assigned automatically during installation. You cannot view or modify it afterward.

Cluster Synchronization Service daemon (CSSD)

The Cluster Synchronization Service (CSS) daemon uses a fixed port for node restart advisory messages.

This port is used on all interfaces that have broadcast capability. Broadcast occurs only when a node eviction restart is imminent.

Oracle Data Guard

Shares the Oracle Net listener port and is configured during installation. To reconfigure this port, use Oracle Net Configuration Assistant (NETCA) to reconfigure the listener.

1521 (same value as the listener)

Oracle Connection Manager

Listening port for Oracle client connections to Oracle Connection Manager. You can configure Oracle Connection Manager after installation using NETCA.

Cluster Ready Services daemon (CRSD)

Oracle Clusterware Cluster Ready Services (CRS) daemon internode connection. The port number is assigned automatically during installation. You cannot view or modify it afterward.

Oracle Cluster Registry

The port number is assigned automatically during installation. You cannot view or modify it afterward.

Oracle EM Database Control — HTTP

HTTP port for Oracle Enterprise Manager Database Control. The port is configured during installation. Section F.5, «Changing the Oracle Enterprise Manager Database Control Ports» explains how to modify this port number.

Oracle EM Database Control — Java RMI

Java Remote Method Invocation (RMI) port for Oracle Enterprise Manager Database Control. The port is configured during installation. Section F.5, «Changing the Oracle Enterprise Manager Database Control Ports» explains how to modify this port number.

Oracle EM Database Control — JMS

Oracle Java Message Service (JMS) port for Oracle Enterprise Manager Database Control. The port is configured during installation. Section F.5, «Changing the Oracle Enterprise Manager Database Control Ports» explains how to modify this port number.

Oracle Event Manager (EVM)

Generates events for Oracle Clusterware. The port number is assigned automatically during installation. You cannot view or modify it afterward.

Oracle HA Services daemon (OHASD)

The Oracle High Availability Services (OHAS) daemon starts the Oracle Clusterware stack.

Oracle Management Agent

HTTP port for Oracle Management Agent, which is part of Oracle Enterprise Manager. The port is configured during installation.

Oracle Net Listener

Allows Oracle clients to connect to the database by using Oracle Net Services. You can configure this port during installation. To reconfigure this port, use NETCA.

Oracle Notification Services (ONS)

Port for ONS, used for the publish and subscribe service for communicating information about Fast Application Notification (FAN) events. The FAN notification process uses system events that Oracle Database publishes when cluster servers become unreachable or if network interfaces fail.

Use srvctl to modify ONS ports.

Oracle Real Application Clusters

The port number is assigned automatically during installation. You cannot view or modify it afterward.

Oracle Services for Microsoft Transaction Server

The port number for Microsoft Transaction Server is configured automatically by Oracle Universal Installer (OUI) the first time you install the software on a particular server. If you install the software in multiple Oracle homes on the same server, then OUI uses the same port number for all installations.

In most cases, you do not have to reconfigure the port number. Section F.7, «Changing the Oracle Services for Microsoft Transaction Server Port» explains how to change this port number.

Oracle XML DB — HTTP

The Oracle XML DB HTTP port is used if web-based applications must access an Oracle database from an HTTP listener. The port is configured during installation, and you cannot view it afterward.

Oracle XML DB — FTP

The Oracle XML DB FTP port is used when applications must access an Oracle database from an FTP listener. The port is configured during installation, and you cannot view it afterward.

F.4 Changing the Oracle Management Agent Port

To find the current setting for the Management Agent port, search for EMD_URL in the file %ORACLE_HOME%\ host_sid \ sysman \ config \ emd.properties , where host_sid is a string that contains the local host name and the SID for the Oracle RAC database.

To change the Management Agent HTTP port, use the emca -reconfig ports command, as shown in this example:

F.5 Changing the Oracle Enterprise Manager Database Control Ports

To find the current HTTP, RMI, and JMS port settings, search in the following files, where host_sid is a string that contains the local host name and the SID for the Oracle RAC database:

HTTP port : Search for REPOSITORY_URL in the %ORACLE_HOME%\ host_sid \ sysman \ config \ emd.properties file

RMI port : Search for the port attribute in the rmi-server tag in the file %ORACLE_HOME%\ oc4j \ j2ee \ OC4J_DBConsole_ host_sid \ config \ rmi .xml file

JMS port : Search for the port attribute in the jms-server tag in the %ORACLE_HOME%\ oc4j \ j2ee \ OC4J_DBConsole_ host_sid \ config \ jms .xml file

To change the Oracle Enterprise Manager Database Control ports, use the emca -reconfig ports command:

In the previous example, option specifies one or more of the following ports and setting is the new port value:

Option Description Example
DBCONTROL_HTTP_PORT Sets the HTTP port emca -reconfig ports -DBCONTROL_HTTP_PORT 1820
RMI_PORT Sets the RMI port emca -reconfig ports -RMI_PORT 5520
JMS_PORT Sets the JMS port emca -reconfig ports -JMS_PORT 5521

You can specify multiple port settings in one line, for example:

F.6 Changing the Oracle XML DB Ports

By default, the FTP and HTTP (including HTTPS) ports for Oracle XML DB are set to 0, which disables FTP or HTTP access to Oracle XML DB. To change the FTP and HTTP ports for Oracle XML DB, you must run the catxdbdbca.sql script, which in a default installation is located in %ORACLE_HOME%\rdbms\admin .

To change the Oracle XML DB ports:

Check that the Oracle listener is running. In the Windows Services Control Manager, ensure that the Oracle listener service (for example, OracleOraDb11g_home1TNSListener ) is set to Started.

Log in to SQL*Plus as the SYS or XDB user using the SYSDBA privilege. For example, to log in to SQL*Plus as SYS :

Run the catxdbdbca.sql script.

For example, assuming your Oracle home is located in the C:\app\oracle\product\11.2.0\db_1 directory, to use 2200 for the FTP port and 8200 for the HTTP port, you would enter the following SQL statement:

Oracle Database Administrator’s Guide for information about connecting to the database using SQL*Plus

F.7 Changing the Oracle Services for Microsoft Transaction Server Port

In most cases, you are not required to reconfigure the port number for the Oracle Services for Microsoft Transaction Server. If you must change the port number, then you can use the Registry Editor to edit its value in the HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\OracleMTSRecoveryService\Protid_0 Windows Registry key to any available port within the range 1024 to 65535.

During installation, Oracle Universal Installer takes the value for the port from the key, if it exists. Otherwise, a free port ranging from 49152 to 65535 is chosen automatically.

SQL*Net (a.k.a Oracle TNS) and firewalls…

Most vendor’s firewalls have a SQL ALG that handles SQL*Net traffic. They listen on TCP port 1521. SQL*Net is based on Oracle’s TNS protocol. The specification for this protocol is proprietary and inaccessible, but you can figure it out by reading Oracle’s docs and looking at the Wireshark dissector source code.

Essentially TNS was specified in such a way that the session on port 1521 was a “control” session of sorts. The Oracle listener process listens on this port. Once connected to this port the client requests an Oracle “service.” If the listener knows of such a service, it would send a “redirect” message back to the client with the IP and port of the process providing that service. That other process is either a dedicated server process or a “dispatcher” process that arbitrates requests to a shared server process. This second TCP connection was commonly referred to as the “data session” or “data connection.” On the firewall the ALG inspects traffic in the “control” session looking for “HOST=” and “PORT=” in order to perform NAT properly and to open pinholes. That’s all the ALG does.

However, the terms “control” and “data” are somewhat misleading. Oracle TNS isn’t like FTP. Its not really a control session. A TNS connection is just a TNS connection. There isn’t a separate port or protocol messaging for control vs data. In fact, in most cases once the redirection occurs the original connection to 1521 should be closed according to the documentation.

The default behavior has changed in more recent versions of Oracle, however. When the secondary process (dispatcher process or dedicated server process) resides on the same host as the listener process, a redirect does not occur. Instead, internal to the server, the socket handle of the connection to port 1521 is passed to the secondary process. This means there is no second TCP connection. Subsequent SQL queries and the result sets are passed over this connection. Oracle refers to this method as “bequeathing the connection” or “direct hand-off.” Many Oracle deployments are built in this fashion now.

This poses two problems for the ALGs: (1) The firewalls must inspect the packets in the “control” session looking for IPs and ports. If a large amount of data is transiting the firewall over port 1521 this could impact the CPU of the firewall. (2) The programmer’s of the ALGs tuned down the buffers of the control session (why would you need large buffers for a control session?). This negatively impacts the performance of the Oracle Session.

Cisco tunes the buffers down to 16k (this is the equivalent of the SDU paramenter in Oracle) while Juniper tunes it down to 2k. The impact is not good on an SRX therefore. Juniper did “fix” this by increasing the window in 10.4R1, but it looks like its back to being 2k in 10.4R4. Even with the the larger buffer though, if you are using a newer version of Oracle that behaves this way by default and there are a lot of sessions then why impact the CPU unnecessarily? It has to inspect those packets looking for IPs and ports. If Oracle isn’t redirecting then there is no point to this.

As it happens, both Cisco and Juniper recommend bypassing the SQL ALG when using newer versions of Oracle that behave this way. You then would only enable or disable the ALG as required by policy on a per IP/port basis.

In Checkpoint firewalls, there are two ALGs for SQL*Net: “sqlnet1” and “sqlnet2.” sqlnet1 should be used for non-redirected sessions and sqlnet2 should be used for redirected sessions. The implication is that non-redirected sessions evaluated against sqlnet2 could negatively impact the CPU of the firewall.

For Cisco firewalls you can disable the SQL*Net ALG globally and then enable it as needed per policy using policy-maps. For Juniper SRXs, it appears that you must *disable* the ALG per policy as required using a custom application configuration. It may be possible to disable it globally and then enable it per policy as with Cisco, but I believe if you disable the ALG globally on the SRX then the ALG can’t be used. Honestly, I haven’t verified this yet.

SQL*Net Version 2 TNSFrames, Redirect, and Data packets will be scanned for ports to open and addresses to NAT, if preceded by a REDIRECT TNS frame type with a zero data length for the payload.

SQL*Net Version 1 is assumed for all other cases. TNSFrame types (Connect, Accept, Refuse, Resend, Marker, Redirect, and Data) and all packets will be scanned for ports and addresses.

Note:Disable SQL*Net inspection when SQL data transfer occurs on the same port as the SQL control TCP port 1521. The security appliance acts as a proxy when SQL*Net inspection is enabled and reduces the client window size from 65000 to about 16000 causing data transfer issues.

In general TCP port 1521 is the default port to trigger the SQL ALG and is a default port assigned to SQL. If there is an Oracle application which uses the SQL port 1521 for both the Control and Data channel, then TCP port 1521 being this the signalling channel for or SQLNET ALG, each packet is sent to the CPU. Depending on the number of packets hitting the firewall we can expect the firewall to experience high CPU.

When you are sure that all SQL applications are single threaded and using only port TCP 1521 for both the Control and Data channel, then you should consider turning off SQL ALG. Otherwise, you can consider having the DBA’s to change the port for such applications to something other than 1521.

The SQL ALG is recommended when Oracle applications are multi-threaded and where they open a high range of TCP ports dynamically for data channels and TCP port 1521 is only used for the Control connection.

There is an internal note in Juniper PR524444 that indicates, essentially, that Oracle sessions that are not redirected can bypass the ALG as it is not needed. This PR was opened because of the ALG’s impact on the performance of the Oracle sessions.

About Ethan Banks

Co-founder of Packet Pushers Interactive. Writer, podcaster, and speaker covering enterprise IT. Deep nerdening for hands-on professionals. Find out more at ethancbanks.com/about.

Comments

Wow I used to do a lot of TNS network protocol analysis in the late 90s and some of my papers on this are located here on my site. Just email me for them

Mostly I was able to get more information about TNS from oracle directly when escalating an issue. plus there is a good book called Oracle Networking from Oracle Press. dated but good.

Ora 15xxs etc full table scans et. al. Most of the problems I analyzed were not network related but SQL related. Poor SQl programming, invalid use of cursors, LOV processing etc over wan links made the application appear slow to users but it was never the network. Agilent at the time had the best TNS decodes going. 2 and 3 tier architectures analysis and table normalization, wow you bring back some memories.

“The default behavior has changed in more recent versions of Oracle, however.” Any chance you could be more specific on when you saw this default behavior occur? Which version of Oracle or a date range? We are currently troubleshooting this exact issue on some SRX5800s and your article has been a big help! Thank you!

Your Article was good help troubleshooting our Oracle issue on SRX240, issue was with big query (29K) applicaton freezed but not with small query or just -1 record from the big query also worked , port was used 1521. by disabling ALG resolved the issue.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *