Oracle 12c RAC 日志体系结构的变化
在11g中,日志文件目录还是存在上述的目录结构,但是里面什么内容都没有。 因为从12c开始,RAC 的日志结构发生了改变。
12c 中RAC 分两种类型:
1.standard cluster
Name of alert log : alert.log
location of alert log: $ORACLE_BASE/diag/crs/host01/crs/trace
2. flex cluster
Name of alert log : alert<hostname>.log
location of alert log: $ORACLE_HOME/log/host01
[grid@seven ~]$ crsctl query crs activeversionOracle Clusterware active version on the cluster is [12.2.0.1.0][grid@seven ~]$ adrci
ADRCI: Release 12.2.0.1.0 - Production on Wed Apr 10 03:06:29 2019
Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.
ADR base = "/u01/app/grid"
adrci> show home
ADR Homes:
diag/rdbms/_mgmtdb/-MGMTDB
diag/asm/+asm/+ASM1
diag/crs/seven/crs
diag/clients/user_grid/host_434436326_107
diag/tnslsnr/seven/asmnet1lsnr_asm
diag/tnslsnr/seven/listener_scan1
diag/tnslsnr/seven/listener
adrci>
grid_base下的日志:
[root@seven grid]# pwd
/u01/app/grid
[root@seven grid]# ls
admin audit cfgtoollogs checkpoints crsdata diag diagsnap log seven tfa
[root@seven grid]# tree log
log
└── diag
└── asmcmd
└── user_grid
└── seven
├── alert
│ └── alert.log
└── trace
6 directories, 1 file
[root@seven grid]#
grid_home下的日志:
[root@seven grid]# pwd
/u01/app/12.2.0/grid
[root@seven grid]# tree log
log
├── crs
├── diag
│ ├── adrci_dir.mif
│ ├── asmcmd
│ │ └── user_grid
│ │ └── seven
│ │ ├── alert
│ │ │ └── alert.log
│ │ └── trace
│ ├── asmtool
│ └── clients
└── seven
├── acfs
│ ├── replication
│ ├── replicationroot
│ ├── resources
│ └── security
├── admin
├── afd
├── alertseven.log
├── chad
├── client
│ ├── GIPC_7165.log
│ ├── gpnp_10637.log
│ └── gpnp_9852.log
├── crflogd
├── crfmond
├── crsd
├── cssd
├── ctssd
├── diskmon
├── evmd
├── gipcd
├── gnsd
├── gpnpd
├── mdnsd
├── ohasd
├── racg
│ ├── racgeut
│ ├── racgevtf
│ └── racgmain
├── srvm
└── xag
37 directories, 36 files
[root@seven grid]#
Oracle 从11g 引入了ADR (AutomaticDiagnostic Repository) ,ADR 是一个基于文件的资料档案库,用于存放数据库诊断数据(如跟踪、意外事件转储和程序包、预警日志、健康状况监视器报告、核心转储等)。
从11g R1 开始,数据库、自动存储管理(ASM)、集群就绪服务(CRS) 和其它Oracle 产品或组件将所有诊断数据都存储在ADR 中。每种产品的每个实例都将诊断数据存储在自己的ADR 主目录下。
这个12c中新的目录结构,就是ADR的目录结构。 根据12c中的改变,可以看出,Oracle 已经采用ADR来管理各种日志。
Starting with 12.1.0.2 Oracle Grid Infrastructure has adapted the Automatic Diagnostic Repository (ADR) based management of diagnostic information. As a result of this adaptation, all diagnostic information has been moved under the ADR folder tree. This applies to the host alert log as well as to ASM alert logs and other logs as well as traces.




