【TRACE】如何設定或動態跟蹤Oracle net偵聽器
APPLIES TO:
Oracle Net Services - Version 11.2.0.1 to 19.5.0.0.0 [Release 11.2 to 19]
Oracle Database - Enterprise Edition - Version 12.2.0.1 to 12.2.0.1 [Release 12.2]
Information in this document applies to any platform.
GOAL
This document is intended to clarify that from 11.2 onwards, there is no need to first set any tracing parameters under listener.ora or reload the listener to activate listener tracing with timestamps.
Listener tracing can be enabled dynamically through 'set trc_level' command in lsnrctl utility. Independent if ADR is or not enabled, the trace is created with timestamps.
Limitation
~~~~~~~~
Please note that if the
is set to ON for the Listener, then this cannot be done. This parameter needs to be set to OFF or commented out for Dynamic commands to work.
SOLUTION
If your listener name is not using the default name of "listener", then run the command " set current_listener <listener name>" in lsnrctl utility , before any other command is used.
Current Listener is LISTENER_TEST
1. To enable SQL*Net listener tracing dynamically run 'set trc_level 16' command in lsnrctl utility:
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=<hostname.domain>)(PORT=1529)))
LISTENER_TEST parameter "trc_level" set to support
The command completed successfully
If ADR is enabled for the listener , the trace is generated under $ORACLE_BASE/diag/tnslsnr/<hostname>/listener/trace on UNIX or $ORACLE_BASE\diag\tnslsnr\<hostname>\listener\trace on Windows. Default trace name is ora_xxxx_xxxxxxxxx.trc
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=<hostname.domain>)(PORT=1529)))
LISTENER_TEST parameter "trc_file" set to ora_17351_47472935529200.trc
The command completed successfully
If ADR is disabled for the listener , the trace is generated under $ORACLE_HOME/network/trace on UNIX or $ORACLE_HOME\network\trace on Windows. Default trace name is <listener_name>.trc
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=<hostname.domain>)(PORT=1529)))
LISTENER_TEST parameter "trc_file" set to listener_test.trc
The command completed successfully
2. To disable SQL*Net listener tracing dynamically run 'set trc_level 0' command in lsnrctl utility:
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=<hostname.domain>)(PORT=1529)))
LISTENER_TEST parameter "trc_level" set to off
The command completed successfully
Limitation
As mentioned above, if you have the
set to ON for the Listener in the listener.ora file, then you cannot issue any dynamic commands against this listener.
For example:
ADMIN_RESTRICTIONS_<listenername> = ON
The error that will be thrown is:
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=<hostname.domain>)(PORT=1529)))
TNS-12508: TNS:listener could not resolve the COMMAND given
This parameter would need to be set to OFF or commented out, for Dynamic commands to work:
ADMIN_RESTRICTIONS_<listenername> = OFF
Now this will work:
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=<hostname.domain>)(PORT=1529)))
LISTENER parameter "trc_level" set to support
The command completed successfully
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29487349/viewspace-2856260/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 監聽器控制程式lsnrctl跟蹤trace file
- 【TRACE】Oracle跟蹤事件Oracle事件
- 聊聊跟蹤監聽器動態註冊(Dynamic Register)方法
- 用oracle trace 來跟蹤sessionOracleSession
- sp_trace_setfilter sqlserver篩選跟蹤或跟蹤過濾FilterSQLServer
- Oracle跟蹤檔案trace檔案Oracle
- 用oracle trace 來跟蹤session 活動OracleSession
- Golang 大殺器之跟蹤剖析 traceGolang
- ORACLE 10046 設定跟蹤事件後無跟蹤檔案Oracle事件
- SQL 的跟蹤方法traceSQL
- [Q]如果設定自動跟蹤 zt
- oracle11g或oracle10g如何生成errorstack型別的跟蹤檔案trace file系列四OracleError型別
- oracle偵聽無法啟動Oracle
- 頁面滾動偵聽器
- Oracle SQL 跟蹤 --- dbms_system.set_sql_trace_in_sessionOracleSQLSession
- 路由跟蹤工具0trace路由
- 跟蹤 sql 的trace檔案SQL
- sql_trace跟蹤工具(轉)SQL
- 設定Event事件來追蹤Trace事件
- 【MySQL】如何對SQL語句進行跟蹤(trace)?MySql
- 動態跟蹤分析VB程式
- Oracle中如何跟蹤SQL或資料庫操作 [final]OracleSQL資料庫
- Oracle執行語句跟蹤 使用sql trace實現語句追蹤OracleSQL
- sql_trace 和 events 跟蹤事件SQL事件
- 跟蹤session 與 trace檔案分析Session
- 跟蹤SESSION 與 trace 檔案解析Session
- 設定 oracle event traceOracle
- 例項動態註冊跟蹤
- sqlnet跟蹤SQL
- 設定跟蹤事件不起作用。事件
- oracle Database Event trace 設定OracleDatabase
- Oracle 跟蹤/告警/監聽日誌的清理指令碼Oracle指令碼
- 跟蹤SQL - SQL Trace 及 10046 事件SQL事件
- 設定 Oracle 監聽器密碼(LISTENER)Oracle密碼
- 【方法整理】Oracle 獲取trace跟蹤檔名的幾種常用方式Oracle
- ass109.awk 分析Oracle 的跟蹤檔案(trace file)Oracle
- oracle監聽器的靜態和動態註冊Oracle
- ORACLE動態監聽與靜態監聽Oracle