Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to listen to a modified port for a single instance of oracle

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

Editor to share with you how to monitor and modify the port of a single instance of oracle, I believe most people do not know much about it, so share this article for your reference. I hope you will learn a lot after reading this article. Let's learn about it together.

Key points of Oracle configuration for single host, multiple instances and multiple listeners

1. A server host with multiple instances. For example, TSDB/ORCL; needs to be configured with multiple listeners.

two。 Different LISTENER ports need to be specified

3.pmon will only dynamically register listeners with port equal to 1521, while pmon cannot dynamically register listener on other ports. If you want pmon to register listener dynamically, you need to set the local_listener parameter.

[oracle@12c01 admin] $cat listener.ora

ANDYCDB =

(DESCRIPTION_LIST =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP) (HOST = 12c01) (PORT = 1521))

(ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1521))

)

)

ANDYCDB_TEST =

(DESCRIPTION_LIST =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP) (HOST = 12c01) (PORT = 1522))

)

)

[oracle@12c01 admin] $cat tnsnames.ora

# tnsnames.ora Network Configuration File: / home/oracle/app/oracle/product/12.2.0/dbhome_1/network/admin/tnsnames.ora

# Generated by Oracle configuration tools.

ANDYCDB =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP) (HOST = 12c01) (PORT = 1521))

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = andycdb)

)

)

LISTENER_ANDYCDB =

(ADDRESS = (PROTOCOL = TCP) (HOST = 12c01) (PORT = 1521))

PDB01 =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP) (HOST = 12c01) (PORT = 1521))

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = pdb01)

)

)

LISTENER_PDB01 =

(ADDRESS = (PROTOCOL = TCP) (HOST = 12c01) (PORT = 1521)

LISTENER_TEST =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP) (HOST = 12c01) (PORT = 1522))

)

#

Lsnrctl operation:

LSNRCTL > set current_listener ANDYCDB_TEST

Current Listener is ANDYCDB_TEST

LSNRCTL > start

Starting / home/oracle/app/oracle/product/12.2.0/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 12.2.0.1.0-Production

System parameter file is / home/oracle/app/oracle/product/12.2.0/dbhome_1/network/admin/listener.ora

Log messages written to / home/oracle/app/oracle/diag/tnslsnr/12c01/andycdb_test/alert/log.xml

Listening on: (DESCRIPTION= (ADDRESS= (PROTOCOL=tcp) (HOST=12c01) (PORT=1522)

Connecting to (DESCRIPTION= (ADDRESS= (PROTOCOL=TCP) (HOST=12c01) (PORT=1522)

STATUS of the LISTENER

-

Alias ANDYCDB_TEST

Version TNSLSNR for Linux: Version 12.2.0.1.0-Production

Start Date 10-APR-2018 21:59:17

Uptime 0 days 0 hr. 0 min. 0 sec

Trace Level off

Security ON: Local OS Authentication

SNMP OFF

Listener Parameter File / home/oracle/app/oracle/product/12.2.0/dbhome_1/network/admin/listener.ora

Listener Log File / home/oracle/app/oracle/diag/tnslsnr/12c01/andycdb_test/alert/log.xml

Listening Endpoints Summary...

(DESCRIPTION= (ADDRESS= (PROTOCOL=tcp) (HOST=12c01) (PORT=1522))

The listener supports no services

The command completed successfully

LSNRCTL > status

Connecting to (DESCRIPTION= (ADDRESS= (PROTOCOL=TCP) (HOST=12c01) (PORT=1522)

STATUS of the LISTENER

-

Alias ANDYCDB_TEST

Version TNSLSNR for Linux: Version 12.2.0.1.0-Production

Start Date 10-APR-2018 21:59:17

Uptime 0 days 0 hr. 1 min. 26 sec

Trace Level off

Security ON: Local OS Authentication

SNMP OFF

Listener Parameter File / home/oracle/app/oracle/product/12.2.0/dbhome_1/network/admin/listener.ora

Listener Log File / home/oracle/app/oracle/diag/tnslsnr/12c01/andycdb_test/alert/log.xml

Listening Endpoints Summary...

(DESCRIPTION= (ADDRESS= (PROTOCOL=tcp) (HOST=12c01) (PORT=1522))

The listener supports no services

The command completed successfully

-- set a listening port

SQL > alter system set local_listener=' (ADDRESS = (PROTOCOL = TCP) (HOST = 12c01) (PORT = 1522)'

System altered.

[oracle@12c01 admin] $lsnrctl status andycdb_test

LSNRCTL for Linux: Version 12.2.0.1.0-Production on 10-APR-2018 22:38:32

Copyright (c) 1991, 2016, Oracle. All rights reserved.

Connecting to (DESCRIPTION= (ADDRESS= (PROTOCOL=TCP) (HOST=12c01) (PORT=1522)

STATUS of the LISTENER

-

Alias ANDYCDB_TEST

Version TNSLSNR for Linux: Version 12.2.0.1.0-Production

Start Date 10-APR-2018 21:59:17

Uptime 0 days 0 hr. 39 min. 16 sec

Trace Level off

Security ON: Local OS Authentication

SNMP OFF

Listener Parameter File / home/oracle/app/oracle/product/12.2.0/dbhome_1/network/admin/listener.ora

Listener Log File / home/oracle/app/oracle/diag/tnslsnr/12c01/andycdb_test/alert/log.xml

Listening Endpoints Summary...

(DESCRIPTION= (ADDRESS= (PROTOCOL=tcp) (HOST=12c01) (PORT=1522))

Services Summary...

Service "4f44590eb7b74390e0531018db0a1976" has 1 instance (s).

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

Service "andycdb" has 1 instance (s).

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

Service "andycdbXDB" has 1 instance (s).

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

Service "pdb01" has 1 instance (s).

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

The command completed successfully

-- set multiple listening ports

SQL > alter system set local_listener=' (ADDRESS= (PROTOCOL= TCP) (HOST=12c01) (PORT= 1522)), (DESCRIPTION= (ADDRESS= (PROTOCOL=tcp) (HOST=12c01) (PORT=1521)'

System altered.

The above is all the contents of the article "how a single instance of oracle listens to modify a port". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report