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

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

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)

How to check tablespace size of oracle How to check tablespace size of oracle Apr 11, 2025 pm 08:15 PM

To query the Oracle tablespace size, follow the following steps: Determine the tablespace name by running the query: SELECT tablespace_name FROM dba_tablespaces; Query the tablespace size by running the query: SELECT sum(bytes) AS total_size, sum(bytes_free) AS available_space, sum(bytes) - sum(bytes_free) AS used_space FROM dba_data_files WHERE tablespace_

How to create a table in oracle How to create a table in oracle Apr 11, 2025 pm 08:00 PM

Creating an Oracle table involves the following steps: Use the CREATE TABLE syntax to specify table names, column names, data types, constraints, and default values. The table name should be concise and descriptive, and should not exceed 30 characters. The column name should be descriptive, and the data type specifies the data type stored in the column. The NOT NULL constraint ensures that null values ​​are not allowed in the column, and the DEFAULT clause specifies the default values ​​for the column. PRIMARY KEY Constraints to identify the unique record of the table. FOREIGN KEY constraint specifies that the column in the table refers to the primary key in another table. See the creation of the sample table students, which contains primary keys, unique constraints, and default values.

How to import oracle database How to import oracle database Apr 11, 2025 pm 08:06 PM

Data import method: 1. Use the SQLLoader utility: prepare data files, create control files, and run SQLLoader; 2. Use the IMP/EXP tool: export data, import data. Tip: 1. Recommended SQL*Loader for big data sets; 2. The target table should exist and the column definition matches; 3. After importing, data integrity needs to be verified.

How to view instance name of oracle How to view instance name of oracle Apr 11, 2025 pm 08:18 PM

There are three ways to view instance names in Oracle: use the "sqlplus" and "select instance_name from v$instance;" commands on the command line. Use the "show instance_name;" command in SQL*Plus. Check environment variables (ORACLE_SID on Linux) through the operating system's Task Manager, Oracle Enterprise Manager, or through the operating system.

How to uninstall Oracle installation failed How to uninstall Oracle installation failed Apr 11, 2025 pm 08:24 PM

Uninstall method for Oracle installation failure: Close Oracle service, delete Oracle program files and registry keys, uninstall Oracle environment variables, and restart the computer. If the uninstall fails, you can uninstall manually using the Oracle Universal Uninstall Tool.

How to encrypt oracle view How to encrypt oracle view Apr 11, 2025 pm 08:30 PM

Oracle View Encryption allows you to encrypt data in the view, thereby enhancing the security of sensitive information. The steps include: 1) creating the master encryption key (MEk); 2) creating an encrypted view, specifying the view and MEk to be encrypted; 3) authorizing users to access the encrypted view. How encrypted views work: When a user querys for an encrypted view, Oracle uses MEk to decrypt data, ensuring that only authorized users can access readable data.

How to re-query oracle How to re-query oracle Apr 11, 2025 pm 07:33 PM

Oracle provides multiple deduplication query methods: The DISTINCT keyword returns a unique value for each column. The GROUP BY clause groups the results and returns a non-repetitive value for each group. The UNIQUE keyword is used to create an index containing only unique rows, and querying the index will automatically deduplicate. The ROW_NUMBER() function assigns unique numbers and filters out results that contain only line 1. The MIN() or MAX() function returns non-repetitive values ​​of a numeric column. The INTERSECT operator returns the common values ​​of the two result sets (no duplicates).

How to read the oracle awr report How to read the oracle awr report Apr 11, 2025 pm 09:45 PM

An AWR report is a report that displays database performance and activity snapshots. The interpretation steps include: identifying the date and time of the activity snapshot. View an overview of activities and resource consumption. Analyze session activities to find session types, resource consumption, and waiting events. Find potential performance bottlenecks such as slow SQL statements, resource contention, and I/O issues. View waiting events, identify and resolve them for performance. Analyze latch and memory usage patterns to identify memory issues that are causing performance issues.

See all articles