search
HomeDatabaseMysql Tutorial监听器日志文件(listener.log)到底记录什么

分析监听日志文件 这一章节描述了监听日志文件中记录了什么内容。该章节包含以下主题: bull; 监听器日志审计跟踪信息 bull; 监

分析监听日志文件

这一章节描述了监听日志文件中记录了什么内容。该章节包含以下主题:

• 监听器日志审计跟踪信息
• 监听器服务注册事件信息
• 监听器直接Hand-Off信息
• 监听器订阅ONS节点关闭事件信息
• 监听器Oracle集群通知信息

监听器日志审计跟踪信息

监听器日志文件包含了审计跟踪信息,您可以用来收集和分析网络使用情况;还包括以下信息:

  • 客户端的连接请求
  • 监听器控制工具发出的RELOAD,START,STOP,, STATUS或者 SERVICES命令
  • 您可以使用审计跟踪信息来查看趋势和用户活动。具体的,首先将信息存储到一个表里,然后整理成报告的格式。为了将数据导入到表中,可以使用导入实用程序,如SQL* Loader。

    监听器日志审计跟踪信息的格式

    审计跟踪信息遵照以下格式:

    Timestamp * Connect Data [* Protocol Info] * Event [* SID | Service] * Return Code

    审计跟踪信息的特性如下:

    例16-4显示了一个发出reload命令请求的日志文件片段。

    例 16-4 重新加载监听器命令的监听器日志事件

    14-MAY-2009 00:29:54 *
     
    (connect_data=(cid=(program=)(host=sales-server)(user=jdoe))(command=reload)

    (arguments=64)(service=listener)(version=135290880))

    * reload * 0

    例16-5显示了一个连接请求成功的日志文件片段。

    例 16-5 连接请求成功的监听器日志事件

    14-MAY-2009 15:28:58 *
     
    (connect_data=(service_name=sales.us.example.com)(cid=(program=)(host=sales-server)

    (user=jdoe)))

    * (address=(protocol=tcp)(host=192.168.2.35)(port=41349)) * establish

    * sales.us.example.com * 0
    例16-6显示了销售服务器主机执行STATUS命令成功的日志文件片段。紧接着是由IP地址为192.168.2.35的客户端发出的连接请求尝试失败的信息。该连接请求导致了一个ORA-12525报错:“TNS:listener has not received client's request in time allowed error message”。当客户端在由listener.ora文件的INBOUND_CONNECT_TIMEOUT_listener_name参数指定的时间内无法完成连接时,,就会报ORA-12525错误。这个客户端可能在对监听器进行DOS攻击。
    例 16-6 连接请求失败的监听器日志事件

    03-MAY-2009 16:41:57 *
     
    (CONNECT_DATA=(CID=(PROGRAM=)(HOST=sales-server)(USER=jdoe))(COMMAND=status)

    (ARGUMENTS=64)(SERVICE=LISTENER)(VERSION=153092352)) * status * 0

    03-MAY-2009 16:42:35 * *

    (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.35)(PORT=53208)) * establish *

    * 12525

    TNS-12525: TNS:listener has not received client

    监听器服务注册事件信息

    监听器记录了服务注册事件信息。在服务注册期间,PMON进程向监听器提供以下信息:

    表16-14中列出的注册服务相关的事件,均记录在listener.log中。

    表 16-14 服务注册事件日志信息

    事件

    描述

    service_register

    监听器接收到一个实例的注册信息

    service_update

    监听器接收到特定实例的更新服务信息,例如调度程序或者实例负载信息等

    service_died

    监听器服务注册信息的格式

    服务注册事件日志信息格式如下:

  • Timestamp * Event * Instance Name * Return Code
  • 服务注册字段的特性如下: 

    l  每个字段由星号(*)分隔

    l  对于一个实例而言,在一行中出现多次是正常的

    l  注册成功返回代码零,这意味着客户端可以连接到该实例

    l  注册失败会产生一个可以映射到错误消息的代码

    16-7显示了服务注册事件的日志文件片段。在一次成功的service_register事件之后,监听器能够接收客户端请求;但是在service_died事件发生后,监听器将无法将收到客户端的请求。

    16-7 服务注册事件的监听器日志

     

    监听器直接Hand-Off信息

    监听器记录了发给调度程序的直接Hand-Off信息。这些信息被格式化如下:

    Timestamp * Presentation * Handoff  * Error Code

    直接Hand-Off信息的特性如下:

    l  每个字段由星号(*)分隔

    l  成功的连接或命令返回代码零

    l  失败生成一个可以映射到错误消息的代码

    16-8显示了日志文件中的一个直接Hand-Off信息。

    16-8 直接Hand-Off信息的监听器日志

  • 0
  • 监听器订阅ONS节点关闭事件信息

    如果ONS配置文件可用,监听器将订阅数据库启动期间Oracle通知服务(ONS)节点的关闭事件。当监听器接收到来自ONS的节点关闭事件后, 该订阅会使监听器删除受影响的服务。对于该事件通知,监听器使用异步订阅。

    如果订阅未完成,每次执行STATUS命令时就会在监听器日志文件中记录如下的警告信息;例如,如果ONS守护程序在主机上未运行。

  • WARNING: Subscription for node down event still pending
  • 监听器Oracle集群通知信息

    如果安装了所需的Oracle集群件(以下日志消息中提到的CRS)库,并且主机上的Oracle Clusterware已启动,那么在启动或者关闭过程中,Oracle监听器将向Oracle集群件通知监听器状态。在通知成功后,监听器会在日志中记录该事件。如果通知失败,将不会记录日志。

    Statement
    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
    Explain the InnoDB Buffer Pool and its importance for performance.Explain the InnoDB Buffer Pool and its importance for performance.Apr 19, 2025 am 12:24 AM

    InnoDBBufferPool reduces disk I/O by caching data and indexing pages, improving database performance. Its working principle includes: 1. Data reading: Read data from BufferPool; 2. Data writing: After modifying the data, write to BufferPool and refresh it to disk regularly; 3. Cache management: Use the LRU algorithm to manage cache pages; 4. Reading mechanism: Load adjacent data pages in advance. By sizing the BufferPool and using multiple instances, database performance can be optimized.

    MySQL vs. Other Programming Languages: A ComparisonMySQL vs. Other Programming Languages: A ComparisonApr 19, 2025 am 12:22 AM

    Compared with other programming languages, MySQL is mainly used to store and manage data, while other languages ​​such as Python, Java, and C are used for logical processing and application development. MySQL is known for its high performance, scalability and cross-platform support, suitable for data management needs, while other languages ​​have advantages in their respective fields such as data analytics, enterprise applications, and system programming.

    Learning MySQL: A Step-by-Step Guide for New UsersLearning MySQL: A Step-by-Step Guide for New UsersApr 19, 2025 am 12:19 AM

    MySQL is worth learning because it is a powerful open source database management system suitable for data storage, management and analysis. 1) MySQL is a relational database that uses SQL to operate data and is suitable for structured data management. 2) The SQL language is the key to interacting with MySQL and supports CRUD operations. 3) The working principle of MySQL includes client/server architecture, storage engine and query optimizer. 4) Basic usage includes creating databases and tables, and advanced usage involves joining tables using JOIN. 5) Common errors include syntax errors and permission issues, and debugging skills include checking syntax and using EXPLAIN commands. 6) Performance optimization involves the use of indexes, optimization of SQL statements and regular maintenance of databases.

    MySQL: Essential Skills for Beginners to MasterMySQL: Essential Skills for Beginners to MasterApr 18, 2025 am 12:24 AM

    MySQL is suitable for beginners to learn database skills. 1. Install MySQL server and client tools. 2. Understand basic SQL queries, such as SELECT. 3. Master data operations: create tables, insert, update, and delete data. 4. Learn advanced skills: subquery and window functions. 5. Debugging and optimization: Check syntax, use indexes, avoid SELECT*, and use LIMIT.

    MySQL: Structured Data and Relational DatabasesMySQL: Structured Data and Relational DatabasesApr 18, 2025 am 12:22 AM

    MySQL efficiently manages structured data through table structure and SQL query, and implements inter-table relationships through foreign keys. 1. Define the data format and type when creating a table. 2. Use foreign keys to establish relationships between tables. 3. Improve performance through indexing and query optimization. 4. Regularly backup and monitor databases to ensure data security and performance optimization.

    MySQL: Key Features and Capabilities ExplainedMySQL: Key Features and Capabilities ExplainedApr 18, 2025 am 12:17 AM

    MySQL is an open source relational database management system that is widely used in Web development. Its key features include: 1. Supports multiple storage engines, such as InnoDB and MyISAM, suitable for different scenarios; 2. Provides master-slave replication functions to facilitate load balancing and data backup; 3. Improve query efficiency through query optimization and index use.

    The Purpose of SQL: Interacting with MySQL DatabasesThe Purpose of SQL: Interacting with MySQL DatabasesApr 18, 2025 am 12:12 AM

    SQL is used to interact with MySQL database to realize data addition, deletion, modification, inspection and database design. 1) SQL performs data operations through SELECT, INSERT, UPDATE, DELETE statements; 2) Use CREATE, ALTER, DROP statements for database design and management; 3) Complex queries and data analysis are implemented through SQL to improve business decision-making efficiency.

    MySQL for Beginners: Getting Started with Database ManagementMySQL for Beginners: Getting Started with Database ManagementApr 18, 2025 am 12:10 AM

    The basic operations of MySQL include creating databases, tables, and using SQL to perform CRUD operations on data. 1. Create a database: CREATEDATABASEmy_first_db; 2. Create a table: CREATETABLEbooks(idINTAUTO_INCREMENTPRIMARYKEY, titleVARCHAR(100)NOTNULL, authorVARCHAR(100)NOTNULL, published_yearINT); 3. Insert data: INSERTINTObooks(title, author, published_year)VA

    See all articles

    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

    MantisBT

    MantisBT

    Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

    mPDF

    mPDF

    mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

    Dreamweaver CS6

    Dreamweaver CS6

    Visual web development tools

    DVWA

    DVWA

    Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

    ZendStudio 13.5.1 Mac

    ZendStudio 13.5.1 Mac

    Powerful PHP integrated development environment