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

Static and dynamic registration of Oracle snooping

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

Share

Shulou(Shulou.com)06/01 Report--

Static registration: by parsing listene.ora files

Dynamic registration: dynamic registration by the PMON process to listening

In the absence of a listener.ora configuration file, if snooping is started, the snooping is dynamically registered. Listeners created with graphical netca are also registered dynamically by default.

1. Static registration

Listener.ora file, monitoring configuration file, static registration to read the file, dynamic registration, unnecessary

You can create it with the netca tool, or you can edit it manually. The contents of a typical listener.ora file:

LISTENER_PHAMR =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP) (HOST = phamrdb1-vip) (PORT = 1521))

)

SID_LIST_LISTENER_PHALR =

(SID_LIST =

(SID_DESC =

(GLOBAL_DBNAME = phalr)

(ORACLE_HOME = / oracle/product/11.2.0)

(SID_NAME = phalr)

)

)

Two modules of listener.ora file:

LISTENER module: basic configuration information such as listening name, connection protocol, listening host, listening port, etc.

SID_LIST_LISTENER module: configure the static registration feature of monitoring, including database service name, ORACLE_HOME, instance name and so on.

Note: SID_NAME, which is the database instance name, is case-sensitive in Linux environments.

GLOBAL_DBNAME is the name of the database service, which can be omitted, consistent with SID_NAME by default, or inconsistent.

ORACLE_HOME, which is consistent with the $ORACLE_HOME environment variable by default. Windows, this parameter is not valid and is taken from the registry.

Static registration, listener does not know the specific status of the instance, so the listener starts to view the instance information, its status information is displayed as UNKNOWN. For example:

Oracle@phamrdb1: / home/oracle > lsnrctl status LISTENER_PHAMR

LSNRCTL for Linux: Version 11.2.0.4.0-Production on 17-NOV-2016 17:17:37

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

Connecting to (DESCRIPTION= (ADDRESS= (PROTOCOL=TCP) (HOST=phamrdb1-vip) (PORT=1521)

STATUS of the LISTENER

-

Alias LISTENER_PHAMR

Version TNSLSNR for Linux: Version 11.2.0.4.0-Production

Start Date 01-OCT-2016 14:12:51

Uptime 47 days 3 hr. 4 min. 45 sec

Trace Level off

Security ON: Local OS Authentication

SNMP OFF

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

Listener Log File / oracle/diag/tnslsnr/phamrdb1/listener_phamr/alert/log.xml

Listening Endpoints Summary...

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

Services Summary...

Service "phamr" has 1 instance (s). Service name in monitoring statu

Instance "phamr", status UNKNOWN, has 1 handler (s) for this service... Instance name in monitoring statu

The command completed successfully

2, dynamic registration

In a dynamic registration listening environment, the listener.ora file may not include the instance information of the current database, so this file is not necessary.

When the instance is started, the database instance information is dynamically registered with the monitor by the Oracle PMON process.

When the Oracle instance is closed, the PMON process automatically removes the current instance information from the listener again.

Therefore, to achieve dynamic registration, the instance of the database must be at least in the nomount state

Listening for instance status during dynamic registration: from the instance status when the PMON process is dynamically registered, there are generally three states: READY, BLOCKED and RESTRICED

READY: indicates that the database instance is already in mount or open state and can accept client connections

BLOCKED: indicates that the database instance is still in nomount state or the instance type is ASM instance, and client connections are not accepted. If the client connects at this time,

The database will report an ora-12528 error.

RESTRICED: indicates that the database is in RESTRICED mode and does not accept remote client connections with ordinary permissions. If the client connects to the database at this time, it will report

Ora-12526 error

Oracle@fsdata: / oracle/product/11.2.0/network/admin > lsnrctl status

LSNRCTL for Linux: Version 11.2.0.4.0-Production on 17-NOV-2016 16:01:43

Copyright (c) 1991, 2013, 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 17-NOV-2016 15:57:23

Uptime 0 days 0 hr. 4 min. 19 sec

Trace Level off

Security ON: Local OS Authentication

SNMP OFF

Listener Log File / oracle/diag/tnslsnr/fsdata/listener/alert/log.xml

Listening Endpoints Summary...

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

Services Summary...

Service "FSDATA" has 1 instance (s).

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

Service "FSDATAXDB" has 1 instance (s).

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

The command completed successfully

Oracle@fsdata: / oracle/product/11.2.0/network/admin > lsnrctl status

LSNRCTL for Linux: Version 11.2.0.4.0-Production on 17-NOV-2016 15:58:47

Copyright (c) 1991, 2013, 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 17-NOV-2016 15:57:23

Uptime 0 days 0 hr. 1 min. 23 sec

Trace Level off

Security ON: Local OS Authentication

SNMP OFF

Listener Log File / oracle/diag/tnslsnr/fsdata/listener/alert/log.xml

Listening Endpoints Summary...

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

Services Summary...

Service "FSDATA" has 1 instance (s).

Instance "FSDATA", status BLOCKED, has 1 handler (s) for this service...

The command completed successfully

Instances can be registered dynamically and statically, and the status is displayed as READY and UNKNOWN, respectively.

Oracle@fsdata: / oracle/product/11.2.0/network/admin > lsnrctl status

LSNRCTL for Linux: Version 11.2.0.4.0-Production on 17-NOV-2016 17:50:14

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

Connecting to (DESCRIPTION= (ADDRESS= (PROTOCOL=TCP) (HOST=fsdata) (PORT=1521)

STATUS of the LISTENER

-

Alias LISTENER

Version TNSLSNR for Linux: Version 11.2.0.4.0-Production

Start Date 17-NOV-2016 15:57:23

Uptime 0 days 1 hr. 52 min. 50 sec

Trace Level off

Security ON: Local OS Authentication

SNMP OFF

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

Listener Log File / oracle/diag/tnslsnr/fsdata/listener/alert/log.xml

Listening Endpoints Summary...

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

Services Summary...

Service "FSDATA" has 2 instance (s).

Instance "FSDATA", status UNKNOWN, has 1 handler (s) for this service...

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

Service "FSDATAXDB" has 1 instance (s).

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

The command completed successfully

3. Common commands for monitoring

Lsnrctl start [listener_name]

Lsnrctl stop [listener_name]

Lsnrctl status [listener_name]

Lsnrctl service [listener_name]

Lsnrctl reload [listener_name]

4. Alias for monitoring

The default name for monitoring is LISTENER, and aliases can be configured.

Oracle@fsdata: / dump > ps-ef | grep tnslsnr | grep-v grep

Oracle 29598 1 0 15:57? 00:00:00 / oracle/product/11.2.0/bin/tnslsnr LISTENER-inherit

Oracle@phamrdb1: / home/oracle > ps-ef | grep tnslsnr | grep-v grep

Oracle 38300 1 0 Oct01? 06:21:54 / oracle/product/11.2.0/bin/tnslsnr LISTENER_PHAMR-inherit

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