background_dump_dest 参数

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/xxzhaobb/article/details/86004374

今天在12C下运行巡检脚本的时候,发现无法找到alert.log .

查看了下脚本,发现脚本上使用到background_dump_dest这个值。看了下,在11g和12c上面,这个值是不一样的。

SQL> select * from v$version where rownum=1;

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

SQL> show parameter background_dump_dest

NAME				     TYPE	 VALUE
------------------------------------ ----------- ------------------------------
background_dump_dest		     string	 /u01/app/oracle/diag/rdbms/rac/rac1/trace
SQL> 

SQL> select * from v$version where rownum=1;

BANNER
--------------------------------------------------------------------------------
    CON_ID
----------
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production 	 0


SQL> show parameter background_dump_dest

NAME				     TYPE	 VALUE
------------------------------------ ----------- ------------------------------
background_dump_dest		     string	 /u01/app/oracle/product/12.1.0/db_1/rdbms/log
SQL> 

随后,查了下MOS 2000386.1。 BACKGROUND_DUMP_DEST Parameter In 12.1.0.2 Database 。里面有说明:

This parameter was important in previous releases as it holds the trace files generated by a database instance.

Begining with 11g there were some changes and the ADR (Automatic Diagnostic Repository) concept was introduced. 
Please refer to:
Note 422893.1 - 11g Understanding Automatic Diagnostic Repository.

If the ORACLE_BASE variable is set during instalation, then the default value of DIAGNOSTIC_DEST is equal to the value of the ORACLE_BASE variable. If the value of the ORACLE_BASE variable is not set, then the default value of DIAGNOSTIC_DEST is set to $ORACLE_HOME/log.

The previously used value of BACKGROUND_DUMP_DEST=<diagnostic_dest>/product_type/product_id/instance_id/trace
However, starting with 12.1.0.2 version, this is no longer the case. Instead, it points to $ORACLE_HOME/rdbms/log. 
This behaviour is expected according to unpublished
Bug 17991901 - BACKGROUND_DUMP_DEST INIT PARAMETER VALUE IS INCORRECT IN 12.1.0.2.0 DB
which was closed with status 'Not a Bug'.

所以,如果要取值,可以从v$diag_info里面取值。或者修改background_dump_dest参数,我这里采取的是后者。

END

猜你喜欢

转载自blog.csdn.net/xxzhaobb/article/details/86004374