最近安装个11g rac,准备学习下。
想看一下log日志,找了半天才找到,原来11g的alert log 做了变动,从 Oracle 11g 开始,oracle以xml和文本两种格式提供Alert 日志。
日志位置由Automatic Diagnostic Repository (ADR) 决定,并提供ADRCI Command-Line Utility 命令行工具
可以通过新的初始化参数 DIAGNOSTIC_DEST 控制 ADR BASE 的位置,注:一个存放数据库诊断日志、跟踪文件的目录,称作ADR base,对应初始化参数DIAGNOSTIC_DEST,如果设置了ORACLE_BASE环境变量, DIAGNOSTIC_DEST等于ORACLE_BASE,如果没有设置ORACLE_BASE,则等与ORACLE_HOME/log
SQL> show parameter dia
NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ diagnostic_dest string /u01/app/oracle
SQL> select * from v$diag_info;
INST_ID NAME VALUE ---------- ------------------------- ------------------------------------------------------------------------------------------ 2 Diag Enabled TRUE 2 ADR Base /u01/app/oracle 2 ADR Home /u01/app/oracle/diag/rdbms/sykdb/sykdb2 2 Diag Trace /u01/app/oracle/diag/rdbms/sykdb/sykdb2/trace 2 Diag Alert /u01/app/oracle/diag/rdbms/sykdb/sykdb2/alert 2 Diag Incident /u01/app/oracle/diag/rdbms/sykdb/sykdb2/incident 2 Diag Cdump /u01/app/oracle/diag/rdbms/sykdb/sykdb2/cdump 2 Health Monitor /u01/app/oracle/diag/rdbms/sykdb/sykdb2/hm 2 Default Trace File /u01/app/oracle/diag/rdbms/sykdb/sykdb2/trace/sykdb2_ora_10081.trc 2 Active Problem Count 0 2 Active Incident Count 0
11 rows selected.
SQL>
命令行工具adrci
[oracle@syk1 ~]$ adrci
ADRCI: Release 11.2.0.1.0 - Production on Wed May 2 16:33:23 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
ADR base = "/u01/app/oracle" adrci> help