Oracle跟蹤會話
1.客戶端跟蹤:
PERFORMING A CLIENT-SIDE SQL*NET TRACE
(1) Open the SQLNET.ORA file typically found in the following location:
ORACLE_BASE\ORACLE_HOME\Network\Admin (7.3.x, 8.1.x or later)
ORACLE_BASE\ORACLE_HOME\Net80\Admin (8.0.x)
(2) Add the following parameters at the end of the file:
#CLIENT-SIDE SQL*NET TRACE PARAMETERS
#====================================
TRACE_UNIQUE_CLIENT = ON
TRACE_LEVEL_CLIENT = 16
TRACE_DIRECTORY_CLIENT = C:\temp
TRACE_FILE_CLIENT = SQLNetTrace
TRACE_TIMESTAMP_CLIENT = ON
#TRACE_FILELEN_CLIENT = 2048
#TRACE_FILENO_CLIENT = 2
Parameters prefixed with a “#” are interpreted as comments and will not
affect tracing.
If you want to change the location where the trace file will be saved
modify the following two parameters:
(a) TRACE_DIRECTORY_CLIENT
Set this parameter to the folder where you want the trace file to be
saved.
WARNING: Do not end the path with a “\”. This is not necessary and may
prevent the trace file from being generated.
(b) TRACE_FILE_CLIENT
Set this parameter to the filename of the trace file that will be
created. The actual trace filename may contain additional information
appended to the end of the filename such as
SQLNetTrace_ _.trc
where is the application’s process id while it was running and
distinguishes different client connections established from the
same process id (or session) to the database. This occurs since the
parameter TRACE_UNIQUE_CLIENT is set to ON.
The parameter TRACE_LEVEL_CLIENT=16 ensures that maximum trace
information is logged.
NOTE: If you think the size of the trace file will exceed the free space
on the drive where TRACE_DIRECTORY_CLIENT is saving the file, then
uncomment the last two parameters which will have the following
affect:
(a) TRACE_FILELEN_CLIENT - will create trace files of the size
specified in kilobytes (KB)
(b) TRACE_FILENO_CLIENT - will write to multiple trace files up
to the maximum size specified by
TRACE_FILELEN_CLIENT and then cycle
through the files again overwriting
previously written trace information
The default values specified above for these two paramters will
cycle the trace output between two trace files with a maximum size
of 2MB each.
Once you have made the appropriate changes to the SQLNET.ORA file be
sure to SAVE the file.
NOTE: If the application you are tracing is running from inside a web
server environment, such as Microsoft’s Internet Information
Server (IIS), you will need to RESTART THE WEB SERVER at this
point in order for these changes to be seen by the web server.
This is due to the fact that web servers may cache the SQLNET.ORA
file.
(3) Immediately run the application that uses one of the programmatic
interfaces and generate the error.
(4) Immediately go back to the SQLNET.ORA file and turn tracing off by using
any of the following methods:
(a) Modify the following parameter:
TRACE_LEVEL_CLIENT = OFF
(b) Remove all the tracing parameters you added to this file or
(c) Comment all the tracing parameters out by placing the “#”
character before each one.
Save the changes to the SQLNET.ORA file.
(5) Retrieve the “.trc” file(s) from the location “C:\temp\SQLNetTrace\” or
wherever you have saved the file(s) based on what was specified in the
parameters TRACE_DIRECTORY_CLIENT and TRACE_FILE_CLIENT. If you did not
specify a location please check the location of the directory where the
application was run from or search your hard drive for all “.trc” files.
Check the size of the “.trc” file(s) and make sure they do not have a
size of 0 bytes but do have the current time and date. Zip the file up
and upload it to support.
2.伺服器跟蹤:
$lsnrctl
LSNRCTL> status
LSNRCTL> trace user
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/23135684/viewspace-665383/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 會話跟蹤技術會話
- web前端學習教程:Cookie會話跟蹤技術Web前端Cookie會話
- 使用dbms_monitor.session_trace_enable跟蹤一個會話Session會話
- HTML5入門教程 :Cookie會話跟蹤技術HTMLCookie會話
- Oracle資料庫跟蹤SQLOracle資料庫SQL
- oracle跟蹤常用內部事件號Oracle事件
- 轉:使用 Tkprof 分析 ORACLE 跟蹤檔案Oracle
- 在oracle中跟蹤會話執行語句的幾種方法Oracle會話
- [20190917]oracle跟蹤事件簡單寫法.txtOracle事件
- Oracle執行語句跟蹤 使用sql trace實現語句追蹤OracleSQL
- 四種會話追蹤技術會話
- ?ORACLE會話超時Oracle會話
- 如何收集Oracle程式中的SQL跟蹤資訊KUOracleSQL
- Oracle阻塞會話查詢Oracle會話
- 【LOG】Oracle資料庫清理日誌、跟蹤檔案利器Oracle資料庫
- sp_trace_setfilter sqlserver篩選跟蹤或跟蹤過濾FilterSQLServer
- 【TRACE】如何設定或動態跟蹤Oracle net偵聽器Oracle
- oracle的會話如何自殺?Oracle會話
- 主力跟蹤戰法
- 反跟蹤技術
- git的跟蹤分支和遠端跟蹤分支學習筆記Git筆記
- [20190402]跟蹤vmstat.txt
- Linux 跟蹤器之選Linux
- SQLServer進行SQL跟蹤SQLServer
- 跟蹤執行命令T
- 除錯跟蹤利器---strace除錯
- Oracle開始啟動Java版本許可證的跟蹤審查 - theregisterOracleJava
- 像跟蹤分散式服務呼叫那樣跟蹤 Go 函式呼叫鏈分散式Go函式
- Git跟蹤與提交檔案Git
- ATC系統跟蹤事項
- .gitignore忽略跟蹤指定檔案Git
- Zipkin — 微服務鏈路跟蹤.微服務
- APT組織跟蹤與溯源APT
- [20210603]如何跟蹤索引分裂.txt索引
- Sleuth服務跟蹤:整合 Logstash
- 模版匹配定位跟蹤原始碼原始碼
- oracle 會話(session)被鎖瞭解決方法Oracle會話Session
- Java原始碼跟蹤閱讀技巧Java原始碼
- PostgreSQL 跟蹤checkpointer出現死鎖SQL