Dynamic Registration of Non-1521 standard ports in Oracle

Source: Internet
Author: User
Dynamic Registration of dynamicregistry and static registration are important ways to establish connections between Oracle instances and listeners. From the current trend, the default listener + Dynamic Registration has become

Dynamic Registration of dynamic registry and static registration are important ways to establish a connection between Oracle instances and listeners. From the current trend, the default listener + Dynamic Registration has become

Dynamic Registration of dynamic registry and static registration are important ways to establish a connection between Oracle instances and listeners. From the current trend, the default listener + Dynamic Registration has become the default Oracle standard configuration. In some scenarios, you may need to modify the standard listening configuration and registration mode for security reasons. This article describes how to implement dynamic Registration of Non-port 1521.

1. Default listening and 1521 Port

The core configuration files of Oracle Net Service are listener. ora, tnsnames. ora, and sqlnet. ora. The listener. ora file is the configuration file for listener-related information. The content of listener personalized parameters is set in this file.

By default, the listener. ora file is not available in the $ ORACLE_HOME/network/admin directory.

[Oracle @ aaalife admin] $ ls-l

-Rw-r -----. 1 oracle oinstall 332 Aug 7 tnsnames. ora

In this case, Oracle will use the default port 1521 to support a listener program for the default configuration file. In addition, the program supports dynamic registration.

[Oracle @ aaalife admin] $ lsnrctl start

LSNRCTL for Linux: Version 11.2.0.4.0-Production on 07-SEP-2015 01:08:10

Copyright (c) 1991,201 3, Oracle. All rights reserved.

Starting/u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.4.0-Production

Log messages written to/u01/app/oracle/diag/tnslsnr/aaalife/listener/alert/log. xml

Listening on: (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = localhost) (PORT = 1521 )))

Connecting to (ADDRESS = (PROTOCOL = tcp) (HOST =) (PORT = 1521 ))

STATUS of the LISTENER

------------------------

Alias LISTENER

Version TNSLSNR for Linux: Version 11.2.0.4.0-Production

Start Date 07-SEP-2015 01:08:10

Uptime 0 days 0 hr. 0 min. 0 sec

Trace Level off

Security ON: Local OS Authentication

SNMP OFF

-- The path of the listener configuration file is not described here.

Listener Log File/u01/app/oracle/diag/tnslsnr/aaalife/listener/alert/log. xml

Listening Endpoints Summary...

(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = localhost) (PORT = 1521 )))

The listener supports no services

The command completed successfully

For an Oracle instance at the other end of the registration behavior, by default, the Oracle instance performs a dynamic registration action and registers the action to the listening program listening on port 1521.

[Oracle @ aaalife admin] $ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.4.0-Production on 07-SEP-2015 01:14:54

Copyright (c) 1991,201 3, Oracle. All rights reserved.

Connecting to (ADDRESS = (PROTOCOL = tcp) (HOST =) (PORT = 1521 ))

STATUS of the LISTENER

------------------------

Alias LISTENER

Version TNSLSNR for Linux: Version 11.2.0.4.0-Production

Start Date 07-SEP-2015 01:08:10

Uptime 0 days 0 hr. 6 min. 43 sec

Trace Level off

Security ON: Local OS Authentication

SNMP OFF

Listener Log File/u01/app/oracle/diag/tnslsnr/aaalife/listener/alert/log. xml

Listening Endpoints Summary...

(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = localhost) (PORT = 1521 )))

Services Summary...

Service "aaadb" has 1 instance (s ).

Instance "aaadb", status READY, has 1 handler (s) for this service...

Service "aaadbXDB" has 1 instance (s ).

Instance "aaadb", status READY, has 1 handler (s) for this service...

The command completed successfully

2. Non-Default port listener

In some security scenarios, we are required to modify the listening port to a non-1521 port to avoid scanning intrusion. In fact, this is of little significance to the attack scanning program, because hackers usually scan all ports for attacks.

To modify the port number, you must create a special listener. ora file for configuration. The following describes how to configure a non-standard listener program.

[Oracle @ aaalife admin] $ cat listener. ora

# Listener. ora Network Configuration File:/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener. ora

# Generated by Oracle configuration tools.

MY_LISTENER =

(DESCRIPTION_LIST =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP) (HOST = localhost) (PORT = 1531 ))

(ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1531 ))

)

)

ADR_BASE_LISTENER =/u01/app/oracle

The configuration file contains a listener on port 1531. View the listener information below.

[Oracle @ aaalife admin] $ lsnrctl start

LSNRCTL for Linux: Version 11.2.0.4.0-Production on 07-SEP-2015 01:27:53

Copyright (c) 1991,201 3, Oracle. All rights reserved.

Starting/u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.4.0-Production

System parameter file is/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener. ora

Log messages written to/u01/app/oracle/diag/tnslsnr/aaalife/listener/alert/log. xml

Listening on: (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = localhost) (PORT = 1521 )))

Connecting to (ADDRESS = (PROTOCOL = tcp) (HOST =) (PORT = 1521 ))

STATUS of the LISTENER

------------------------

Alias LISTENER

Version TNSLSNR for Linux: Version 11.2.0.4.0-Production

Start Date 07-SEP-2015 01:27:53

Uptime 0 days 0 hr. 0 min. 0 sec

Trace Level off

Security ON: Local OS Authentication

SNMP OFF

Listener Parameter File/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener. ora

Listener Log File/u01/app/oracle/diag/tnslsnr/aaalife/listener/alert/log. xml

Listening Endpoints Summary...

(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = localhost) (PORT = 1521 )))

The listener supports no services

The command completed successfully

Port 1521 listeners are displayed by default. At the same time, it is found that two listeners are running on the current server.

[Oracle @ aaalife admin] $ lsnrctl status listener

LSNRCTL for Linux: Version 11.2.0.4.0-Production on 07-SEP-2015 01:30:13

Copyright (c) 1991,201 3, Oracle. All rights reserved.

Connecting to (ADDRESS = (PROTOCOL = tcp) (HOST =) (PORT = 1521 ))

STATUS of the LISTENER

------------------------

Alias LISTENER

Version TNSLSNR for Linux: Version 11.2.0.4.0-Production

Start Date 07-SEP-2015 01:27:53

Uptime 0 days 0 hr. 2 min. 19 sec

Trace Level off

Security ON: Local OS Authentication

SNMP OFF

Listener Parameter File/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener. ora

Listener Log File/u01/app/oracle/diag/tnslsnr/aaalife/listener/alert/log. xml

Listening Endpoints Summary...

(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = localhost) (PORT = 1521 )))

Services Summary...

Service "aaadb" has 1 instance (s ).

Instance "aaadb", status READY, has 1 handler (s) for this service...

Service "aaadbXDB" has 1 instance (s ).

Instance "aaadb", status READY, has 1 handler (s) for this service...

The command completed successfully

[Oracle @ aaalife admin] $

[Oracle @ aaalife admin] $ lsnrctl status my_listener

LSNRCTL for Linux: Version 11.2.0.4.0-Production on 07-SEP-2015 01:30:29

Copyright (c) 1991,201 3, Oracle. All rights reserved.

Connecting to (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = localhost) (PORT = 1531 )))

STATUS of the LISTENER

------------------------

Alias LISTENER

Version TNSLSNR for Linux: Version 11.2.0.4.0-Production

Start Date 07-SEP-2015 01:17:52

Uptime 0 days 0 hr. 12 min. 37 sec

Trace Level off

Security ON: Local OS Authentication

SNMP OFF

Listener Parameter File/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener. ora

Listener Log File/u01/app/oracle/diag/tnslsnr/aaalife/listener/alert/log. xml

Listening Endpoints Summary...

(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = localhost) (PORT = 1531 )))

(DESCRIPTION = (ADDRESS = (PROTOCOL = ipc) (KEY = EXTPROC1531 )))

The listener supports no services

The command completed successfully

The above information shows several details:

Ü we configured a custom listener my_listener In the listener. ora file to listen to port 1531. However, the current default listener still exists and can run on port 1521. The my_listener listener runs on port 1531;

Ü the Dynamic Registration of Oracle instances is performed on the listener on port 1521, and port 1531 is not registered;

The problem of the default listener is well solved, as long as we keep only one listener. So, how can I have an Oracle instance register at Port 1531 instead of port 1521?

The solution is to use local_listener to configure parameters. By default, this parameter is null.

SQL> show parameter listener;

NAME TYPE VALUE

-----------------------------------------------------------------------------

Listener_networks string

Local_listener string

Remote_listener string

This parameter is used to specify the listener to which the Oracle instance registers. For non-standard port registration, you must modify the registration listening information parameters.

SQL> show parameter local

NAME TYPE VALUE

-----------------------------------------------------------------------------

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.