Table of Contents
What is oracle monitoring
Home Database Oracle What is oracle monitoring

What is oracle monitoring

May 26, 2022 am 10:29 AM
oracle

Oracle monitoring is a server-side process that is responsible for monitoring requests from clients and can establish data links between the client computer and the database computer. After receiving the request, Oracle monitoring derives a server process to provide services. Database configuration provides both private and shared modes.

What is oracle monitoring

The operating environment of this tutorial: Windows 10 system, Oracle 11g version, Dell G3 computer.

What is oracle monitoring

Oracle monitoring is a server-side process responsible for monitoring requests from clients

The listener does not need to reside on the database host, that is, You can register the instance to the monitor on the remote host

The monitor is Oracle's own software or component

Local connections do not need to monitor, but remote connections must

oracle After listening to the request sent by the user process, a server process is derived to provide services. The server process has two modes according to the configuration of the database: proprietary mode and shared mode

Private mode: each client process There is a separate server process to establish a session to provide services. Most of more than 99% of databases are in this mode

Shared mode: There is a dispatcher called dispatch, which monitors and puts requests into the request queue. Dispatch will continuously query the request queue. When a request is found, it will transfer the request to the server process, and then provide services through the server process. After processing, it will feed back to the response queue. Dispatch will then forward the response queue to the user process. Similar to eating in a restaurant, the server process is equivalent to the chef, and dispatch is equivalent to the waiter. The waiter accepts the request and forwards it to the corresponding idle chef to provide service. Wherever the chef puts the dishes prepared, the waiter then serves them to the customer; this model is not used. After multiple

dbca databases are built, there will usually be a default monitor. There is no need to configure it. The default service port of the monitor is 1521.

Generally, one monitor is enough for a database, but if the concurrency is too large, it may be necessary. Configure multiple monitors. The non-default monitor port number is greater than 1024. The service name and port number between different monitors cannot be the same.

How to distinguish different libraries from monitors, so you need to register the instance as a service and register it to In listen,

Registration is to add the instances running on the host to the listener, so that the listener knows which instances are on the host

Configuration method

Dynamic registration

There are two types of service registration, one is dynamic registration, which actively and automatically registers the instance into the listen through the pmon process

Listening and instance In the startup sequence, when the monitor starts first, there is no problem. If it starts after the monitor, you can manually alter system register to register it, or leave it alone, pmon will register it after a while.

Generally, the default monitor is dynamic registration

No need for listener.ora file

The service status has the words status READY (library is in mount or open state)

pmon provides the instance name, service name, and service to the listener The type and address of the handler

The registered service names are db_name.db_domain, db_nameXDB.db_domain

If you want pmon to register to a non-default listener, you must configure the local_listener parameter

What is oracle monitoring

Configuring listening can be configured through netca graphics or command configuration

What is oracle monitoring

The default listening name is LISTENER. The configuration is as above. In fact, there is no such listener.ora, the default listen can also run normally, so let's add a non-default dynamic listener on port 1522, named listener2

First add a listener to the netmgr graphic

What is oracle monitoring

Or edit listener.ora to add a listener.

What is oracle monitoring

Then modify tnsnames.ora to add a listener2 string to modify the local_listener parameter (that is, change the listener Copy the section in to tnsnames.ora)

What is oracle monitoring

Set the local_listener parameter and register it manually,

[oracle@study admin]$ sql
 
SQL*Plus: Release 11.2.0.1.0 Production on Thu Sep 19 17:07:41 2019
 
Copyright (c) 1982, 2009, Oracle.  All rights reserved.
 
 
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
 
17:07:42 SYS@study> show parameter local_list
 
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
local_listener                       string
17:08:19 SYS@study> alter system set local_listener='LISTENER2';
 
System altered.
 
Elapsed: 00:00:00.04
17:09:03 SYS@study> alter system register;
 
System altered.
 
Elapsed: 00:00:00.00
17:09:21 SYS@study> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@study admin]$ lsnrctl status listener2
 
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 19-SEP-2019 17:10:22
 
Copyright (c) 1991, 2009, Oracle.  All rights reserved.
 
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=study.localdomain)(PORT=1522)))
STATUS of the LISTENER
------------------------
Alias                     listener2
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                19-SEP-2019 16:38:16
Uptime                    0 days 0 hr. 32 min. 6 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/study/listener2/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=study.localdomain)(PORT=1522)))
Services Summary...
Service "study" has 1 instance(s).
  Instance "study", status READY, has 1 handler(s) for this service...
Service "studyXDB" has 1 instance(s).
  Instance "study", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@study admin]$
Copy after login

But in this case, the default is pmon It will not be registered in the default monitor, that is, it cannot be accessed from 1521. If you want 1521 and 1522 to provide services at the same time, you can delete the default monitor and change the configuration to

LISTENER2 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = study.localdomain)(PORT = 1522))
    (ADDRESS = (PROTOCOL = TCP)(HOST = study.localdomain)(PORT = 1521))
  )
Copy after login

Since dynamic monitoring depends on PMON, delete the monitor Configuration file, the default listening is still valid, and the monitoring is still listening to localhost:1521. The LOCAL_LISTENER parameter controls where the instance dynamically registers itself. The default value of the LOCAL_LISTENER parameter is (ADDRESS = (PROTOCOL=TCP)(HOST=hostname)(PORT= 1521)), PMON still actively registers instances to listen. This is the registration method by default after dbca database is created.

It can be seen that dynamic monitoring requires that the monitoring and local_listener parameter configurations are consistent, and they are all empty by default. The configuration is the default monitoring. If it is not the default, just display and configure these two places

tnsnames

.ora在动态监听中不是必须的,只是为了配置个本地的字符串方便local_listener的配置命令而已,直接配置如下形式也ok

alter system set local_listener='(ADDRESS=(PROTOCOL=TCP)(HOST=study.localdomain)(PORT=1521))';      
等同于alter system set local_listener='';
Copy after login

配置注册到多个监听,可以如下

alter system set local_listener='(ADDRESS=(PROTOCOL=TCP)(HOST=study.localdomain)(PORT=1521))','(ADDRESS=(PROTOCOL=TCP)(HOST=study.localdomain)(PORT=1522))';
Copy after login

或者先在tnsnames.ora中配置多个地址的字符串

What is oracle monitoring

再设置alter systemset local_listener='LISTENER2';

在共享服务器模式下,可以配置listener的一个参数叫做dispatchers,把这个分派器注册到一个非默认监听

ALTER SYSTEM SET DISPATCHERS=”(PROTOCOL=tcp)(LISTENER=lsnr2)”;
Copy after login

What is oracle monitoring

select service_id,name from vactiveservices可以查出,前面2个服务是注册到监听的,后面2个是Oracle有两个内部的服务,SYSBACKGROUND是后台进程使用的,SYS$USERS提供给没有指定服务的用户会话使用

What is oracle monitoring

service_names是服务名,如果为空,会把db_name.db_domain 注册到监听

推荐教程:《Oracle视频教程

The above is the detailed content of What is oracle monitoring. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What to do if the oracle can't be opened What to do if the oracle can't be opened Apr 11, 2025 pm 10:06 PM

Solutions to Oracle cannot be opened include: 1. Start the database service; 2. Start the listener; 3. Check port conflicts; 4. Set environment variables correctly; 5. Make sure the firewall or antivirus software does not block the connection; 6. Check whether the server is closed; 7. Use RMAN to recover corrupt files; 8. Check whether the TNS service name is correct; 9. Check network connection; 10. Reinstall Oracle software.

How to solve the problem of closing oracle cursor How to solve the problem of closing oracle cursor Apr 11, 2025 pm 10:18 PM

The method to solve the Oracle cursor closure problem includes: explicitly closing the cursor using the CLOSE statement. Declare the cursor in the FOR UPDATE clause so that it automatically closes after the scope is ended. Declare the cursor in the USING clause so that it automatically closes when the associated PL/SQL variable is closed. Use exception handling to ensure that the cursor is closed in any exception situation. Use the connection pool to automatically close the cursor. Disable automatic submission and delay cursor closing.

How to create cursors in oracle loop How to create cursors in oracle loop Apr 12, 2025 am 06:18 AM

In Oracle, the FOR LOOP loop can create cursors dynamically. The steps are: 1. Define the cursor type; 2. Create the loop; 3. Create the cursor dynamically; 4. Execute the cursor; 5. Close the cursor. Example: A cursor can be created cycle-by-circuit to display the names and salaries of the top 10 employees.

How to stop oracle database How to stop oracle database Apr 12, 2025 am 06:12 AM

To stop an Oracle database, perform the following steps: 1. Connect to the database; 2. Shutdown immediately; 3. Shutdown abort completely.

What steps are required to configure CentOS in HDFS What steps are required to configure CentOS in HDFS Apr 14, 2025 pm 06:42 PM

Building a Hadoop Distributed File System (HDFS) on a CentOS system requires multiple steps. This article provides a brief configuration guide. 1. Prepare to install JDK in the early stage: Install JavaDevelopmentKit (JDK) on all nodes, and the version must be compatible with Hadoop. The installation package can be downloaded from the Oracle official website. Environment variable configuration: Edit /etc/profile file, set Java and Hadoop environment variables, so that the system can find the installation path of JDK and Hadoop. 2. Security configuration: SSH password-free login to generate SSH key: Use the ssh-keygen command on each node

Oracle's Role in the Business World Oracle's Role in the Business World Apr 23, 2025 am 12:01 AM

Oracle is not only a database company, but also a leader in cloud computing and ERP systems. 1. Oracle provides comprehensive solutions from database to cloud services and ERP systems. 2. OracleCloud challenges AWS and Azure, providing IaaS, PaaS and SaaS services. 3. Oracle's ERP systems such as E-BusinessSuite and FusionApplications help enterprises optimize operations.

What to do if the oracle log is full What to do if the oracle log is full Apr 12, 2025 am 06:09 AM

When Oracle log files are full, the following solutions can be adopted: 1) Clean old log files; 2) Increase the log file size; 3) Increase the log file group; 4) Set up automatic log management; 5) Reinitialize the database. Before implementing any solution, it is recommended to back up the database to prevent data loss.

How to create oracle dynamic sql How to create oracle dynamic sql Apr 12, 2025 am 06:06 AM

SQL statements can be created and executed based on runtime input by using Oracle's dynamic SQL. The steps include: preparing an empty string variable to store dynamically generated SQL statements. Use the EXECUTE IMMEDIATE or PREPARE statement to compile and execute dynamic SQL statements. Use bind variable to pass user input or other dynamic values ​​to dynamic SQL. Use EXECUTE IMMEDIATE or EXECUTE to execute dynamic SQL statements.

See all articles