Oracle 11g的日志文件(有点变化)
从Oracle 11g开始,Oracle以XML与传统的文本两种格式提供Alert日志。
新的日志位置由Automatic Diagnostic Repository (ADR)决定。可以通过新的初始化参数DIAGNOSTIC_DEST控制ADR BASE的位置。如果没有设定这个初始化参数的位置,而设置ORACLE_BASE环境变量的话,那么,如果没有设定ORACLE_BASE ,则ORACLE_HOME/log即为DIAGNOSTIC_DEST。
Alert Log 文件父目录的位置在:
ADR_BASE/diag/product_type{eg:rdbms}}/product_id{eg:11g}/instance_id
这个目录下有alert/trace/bdump之类的子目录。就是Log的具体位置了。alert下是XML文件:
可在v$diag_info视图中用如下命令查到:
select * from v$diag_info where name ='Diag Alert';
select * from v$diag_info where name ='Diag Trace';
select * from v$diag_info;
如:
SQL> select value from v$diag_info where name='Diag Alert';
VALUE
--------------------------------------------------------------------------------
/u01/oracle/app/diag/rdbms/orcl/orcl/alert
SQL> select value from v$diag_info where name='Diag Trace';
VALUE
--------------------------------------------------------------------------------
/u01/oracle/app/diag/rdbms/orcl/orcl/trace
SQL> select value from v$parameter where name='background_dump_dest';
VALUE
--------------------------------------------------------------------------------
/u01/oracle/app/diag/rdbms/orcl/orcl/trace
SQL> show parameter DIAGNOSTIC_DEST;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
diagnostic_dest string /u01/oracle/app
Oracle 10g & 9i 及其之前版本 Alert log位置:
在Oracle 10g 和9i及其以前的版本中 alert log 位于 $ORACLE_BASE/admin/$ORACLE_SID/bdump 下
如下所示:
$ sqlplus /nolog
SQL*Plus: Release 9.2.0.6.0 - Production on Tue Sep 21 10:08:32 2010
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL> conn /as sysdba;
Connected.
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
PL/SQL Release 9.2.0.6.0 - Production
CORE 9.2.0.6.0 Production
TNS for Solaris: Version 9.2.0.6.0 - Production
NLSRTL Version 9.2.0.6.0 - Production
SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.6.0 - Production
$ cd $ORACLE_BASE/admin/$ORACLE_SID/bdump
$ pwd
/oracle/admin/fwdev/bdump
$ ls
alert_fwdev.hist alert_fwdev.log fwdev_lgwr_1279.trc fwdev_lgwr_1699.trc fwdev_lgwr_28075.trc
fwdev_lgwr_1009.trc fwdev_lgwr_13178.trc fwdev_lgwr_1745.trc fwdev_lgwr_3576.trc
$ ls -al *.log
-rw-r--r-- 1 oracle dba 0 Sep 21 08:30 alert_fwdev.log
$
该贴被jiacyi编辑于2015-5-28 15:14:35