• 博客访问: 2178748
  • 博文数量: 1587
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-17 14:52
个人简介

暂无介绍

文章分类

全部博文(1587)

文章存档

2012年(27)

2011年(37)

2009年(6)

2008年(194)

2007年(448)

2006年(640)

2005年(235)

我的朋友

分类: Linux

2012-03-22 12:27:15

Using and Disabling the Automatic Diagnostic Repository (ADR) with Oracle Net for 11g [ID 454927.1]

修改时间 08-OCT-2010 类型 HOWTO 状态 PUBLISHED

In this Document
Goal
Solution


Applies to:

Oracle Net Services - Version: 11.1.0.6.0 to 11.2.0.1 - Release: 11.1 to 11.2
Linux x86
Microsoft Windows (32-bit)
MS Windows
Intel Based Server LINUX

Checked for relevance on 19-MAR-2010.

Goal

Using and Disabling the Automatic Diagnostic Repository (ADR) with Oracle Net. Includes instructions for using the adrci executable included in the 11g installation.

Solution

Client Trace Files

Viewing Method 1

adrci
adrci> show base -product client
adrci> set base
adrci> show tracefile
adrci> show trace
Note: Windows will need a double backslash (\\) when setting the base if the base contains spaces in the path


Viewing Method 2 (Linux)

cd ~
cd oradiag_username
cd clients
cd user_username
cd host*
cd trace

-or-

adrci exec='show base -product client' | awk '{print $4}' > /tmp/dir.txt;export A=`sed -e 's/"//g' /tmp/dir.txt`;cd $A/diag/clients/u*/h*/trace


Followed by ls -ltr to sort the directory listing by date.

Viewing Method 2 (Windows)

cd %systemdrive%\Documents and Settings\%username%\oracle\oradiag_%username%\diag\clients\user_%username%\host*\trace


Server Trace Files

Viewing Method 1

adrci
adrci> show tracefile
adrci> show trace


Viewing Method 2 (Linux)

Server traces are in the format of _ora_.trc

cd $ORACLE_BASE/diag/rdbms/instance_name/$ORACLE_SID/trace

e.g., /u01/app/oracle/product/diag/rdbms/v11/V11/trace


Viewing Method 2 (Windows) List of server traces:


Server traces are in the format of _ora_.trc

set /p sid="What instance name was traced? " & cd %systemdrive%\oracle\product\diag\rdbms\%sid%\%sid%\trace



Listener Trace Files

Viewing Method 1

adrci
adrci> show tracefile
adrci> show trace

Viewing Method 2 (Linux)
Listener traces are in the format of ora__.trc

cd /diag/tnslsnr///trace

ls -ltr to sort by time and date

Viewing Method 2 (Windows)
Listener traces are in the format of ora__.trc

cd %systemdrive%\oracle\product\diag\diagtool\%computername%\listener\trace

dir /od *.trc to sort by time and date


LSNRCTL traces

Viewing Method 1

adrci
adrci> show base -product client
adrci> set base
adrci> show tracefile
adrci> show trace
Note: Windows will need a double backslash (\\) when setting the base if the base contains spaces in the path

Viewing Method 2 (Linux)

cd $HOME/oradiag_oracle/diag/lsnrctl/$HOSTNAME/$HOSTNAME/trace


ls -ltr *.trc to sort by time and date


Viewing Method 2 (Windows)

cd %systemdrive%\Documents and Settings\%username%\Oracle\oradiag_%username%\diag\tnslsnr\%computername%\%computername%\trace

dir /od *.trc to sort by time and date


Listener and CMAN Log Files

Logs are in XML format and must be made readable with adrci.

Viewing Method 1

adrci
adrci> show alert
[pick a number corresponding to a log file]

Use vi commands and :w to write the file

Since Windows does not use vi, you must copy notepad.exe or wordpad.exe to a location in the PATH that has no spaces and rename to vi.exe. The adrci "set editor" command can be used, but there are parsing bugs that makes this an unreliable option.


CMAN Trace Files

Because cman trace files are no longer named cmadmin.trc, cmgw0.trc, etc, it is not practical to use ADRCI to view cman trace files. Manual directory navigation is more suitable.


Viewing Method 1 (Linux)

cd diagnostic_base/diag/netcman///trace


Viewing Method 1 (Windows)

cd %oracle_base%\diag\netcman\%computername%\%cman%\trace

Sort directory listings by time/date (ls -ltr or dir /od)
If you have "n" number of CMAN gateways configured then the last (n + 2) traces in the directory output are what is needed.
Out of these last (n + 2) traces, the 1st will be the cmadmin trace, the 2nd will be the cman tnslsnr trace, and the remaining will be gateway traces.


sqlnet.log


Viewing Method 1

adrci

adrci>show base -product client

adrci> set base <above output>
adrci> show alert
[pick a number corresponding to a log file]

Note: Windows will need a double backslash (\\) when setting the base if the base contains spaces in the path


Use vi commands and :w to write the file

Since Windows does not use vi, you must copy notepad.exe or wordpad.exe to a location in the PATH that has no spaces and rename to vi.exe. The adrci "set editor" command can be used, but there are parsing bugs that makes this an unreliable option.



trcasst
No ADR created tracefile can be read by trcasst. Please see below on how to disable ADR.

Note that trcasst will read ADR trace files beginning in 11gR2. See unpublished BUG7828959 for more information. The Net Administrator's Guide will be corrected to include this information.



Tnsping Tracing

Tnsping traces are not effected by ADR being set or not. Set tnsping_trace_level as usual.


Reverting Back to Old-Style. Tracing and Logging:
Set DIAG_ADR_ENABLED=off in the following locations, after doing so, set a trace_level accordingly:

revert to client/server tracing/logging: set parameter DIAG_ADR_ENABLED=off in the client or server sqlnet.ora files


revert to listener tracing/logging: set parameter DIAG_ADR_ENABLED_listenerName=off in the listener.ora file


revert to cman tracing/logging:
Linux and Windows: add (DIAG_ADR_ENABLED=off) inside the parameter_list

阅读(1475) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~
评论热议
请登录后评论。

登录 注册