监听器日志文件(listener.log)到底记录什么
分析监听日志文件 这一章节描述了监听日志文件中记录了什么内容。该章节包含以下主题: bull; 监听器日志审计跟踪信息 bull; 监
分析监听日志文件
这一章节描述了监听日志文件中记录了什么内容。该章节包含以下主题:
• 监听器日志审计跟踪信息
• 监听器服务注册事件信息
• 监听器直接Hand-Off信息
• 监听器订阅ONS节点关闭事件信息
• 监听器Oracle集群通知信息
监听器日志审计跟踪信息
监听器日志文件包含了审计跟踪信息,您可以用来收集和分析网络使用情况;还包括以下信息:
您可以使用审计跟踪信息来查看趋势和用户活动。具体的,首先将信息存储到一个表里,然后整理成报告的格式。为了将数据导入到表中,可以使用导入实用程序,如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 *
TNS-12525: TNS:listener has not received client
监听器服务注册事件信息
监听器记录了服务注册事件信息。在服务注册期间,PMON进程向监听器提供以下信息:
表16-14中列出的注册服务相关的事件,均记录在listener.log中。
表 16-14 服务注册事件日志信息
事件
描述
service_register
监听器接收到一个实例的注册信息
service_update
监听器接收到特定实例的更新服务信息,例如调度程序或者实例负载信息等
service_died
监听器服务注册信息的格式
服务注册事件日志信息格式如下:
服务注册字段的特性如下:
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信息的监听器日志
如果ONS配置文件可用,监听器将订阅数据库启动期间Oracle通知服务(ONS)节点的关闭事件。当监听器接收到来自ONS的节点关闭事件后, 该订阅会使监听器删除受影响的服务。对于该事件通知,监听器使用异步订阅。
如果订阅未完成,每次执行STATUS命令时就会在监听器日志文件中记录如下的警告信息;例如,如果ONS守护程序在主机上未运行。
如果安装了所需的Oracle集群件(以下日志消息中提到的CRS)库,并且主机上的Oracle Clusterware已启动,那么在启动或者关闭过程中,Oracle监听器将向Oracle集群件通知监听器状态。在通知成功后,监听器会在日志中记录该事件。如果通知失败,将不会记录日志。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



InnoDB's full-text search capabilities are very powerful, which can significantly improve database query efficiency and ability to process large amounts of text data. 1) InnoDB implements full-text search through inverted indexing, supporting basic and advanced search queries. 2) Use MATCH and AGAINST keywords to search, support Boolean mode and phrase search. 3) Optimization methods include using word segmentation technology, periodic rebuilding of indexes and adjusting cache size to improve performance and accuracy.

The article discusses using MySQL's ALTER TABLE statement to modify tables, including adding/dropping columns, renaming tables/columns, and changing column data types.

Full table scanning may be faster in MySQL than using indexes. Specific cases include: 1) the data volume is small; 2) when the query returns a large amount of data; 3) when the index column is not highly selective; 4) when the complex query. By analyzing query plans, optimizing indexes, avoiding over-index and regularly maintaining tables, you can make the best choices in practical applications.

Yes, MySQL can be installed on Windows 7, and although Microsoft has stopped supporting Windows 7, MySQL is still compatible with it. However, the following points should be noted during the installation process: Download the MySQL installer for Windows. Select the appropriate version of MySQL (community or enterprise). Select the appropriate installation directory and character set during the installation process. Set the root user password and keep it properly. Connect to the database for testing. Note the compatibility and security issues on Windows 7, and it is recommended to upgrade to a supported operating system.

The difference between clustered index and non-clustered index is: 1. Clustered index stores data rows in the index structure, which is suitable for querying by primary key and range. 2. The non-clustered index stores index key values and pointers to data rows, and is suitable for non-primary key column queries.

Article discusses popular MySQL GUI tools like MySQL Workbench and phpMyAdmin, comparing their features and suitability for beginners and advanced users.[159 characters]

Article discusses strategies for handling large datasets in MySQL, including partitioning, sharding, indexing, and query optimization.

The article discusses dropping tables in MySQL using the DROP TABLE statement, emphasizing precautions and risks. It highlights that the action is irreversible without backups, detailing recovery methods and potential production environment hazards.
