设为首页 加入收藏

TOP

dataguard主库检测脚本(一)
2014-11-24 00:59:48 来源: 作者: 【 】 浏览:31
Tags:dataguard 检测 脚本

Scriptto Collect Data Guard Primary Site Diagnostic Information for Version 10g andabove (Including RAC). (文档ID 1577401.1)

oracle mos 提供了一个不错的dg 检测脚本,基本囊括了所有 主库 dg的检测项:

如下报表:


TIME
14-MAR-2014 13:53:18

Database 1
In the following output the DATABASE_ROLE should be PRIMARY as that is what this script is intended to be run on.
PLATFORM_ID should match the PLATFORM_ID of the standby(s) or conform to the supported options in
Note: 413484.1 Data Guard Support for Heterogeneous Primary and Physical Standbys in Same Data Guard Configuration
Note: 1085687.1 Data Guard Support for Heterogeneous Primary and Logical Standbys in Same Data Guard Configuration
OPEN_MODE should be READ WRITE.
LOG_MODE should be ARCHIVELOG.
FLASHBACK can be YES (recommended) or NO.
If PROTECTION_LEVEL is different from PROTECTION_MODE then for some reason the mode listed in PROTECTION_MODE experienced a need to downgrade.
Once the error condition has been corrected the PROTECTION_LEVEL should match the PROTECTION_MODE after the next log switch.

ROLE NAME DB_UNIQUE_NAME PLATFORM_ID OPEN_MODE LOG_MODE FLASHBACK_ON PROTECTION_MODE PROTECTION_LEVEL
PRIMARY ORA11G ora11g 13 READ WRITE ARCHIVELOG NO MAXIMUM PERFORMANCE MAXIMUM PERFORMANCE

Database 2
FORCE_LOGGING is not mandatory but is recommended.
REMOTE_ARCHIVE should be ENABLE.
SUPPLEMENTAL_LOG_DATA_PK and SUPPLEMENTAL_LOG_DATA_UI must be enabled if the standby associated with this primary is a logical standby.
During normal operations it is acceptable for SWITCHOVER_STATUS to be SESSIONS ACTIVE or TO STANDBY.
DG_BROKER can be ENABLED (recommended) or DISABLED.

FORCE_LOGGING REMOTE_ARCHIVE SUPPLEMENTAL_LOG_DATA_PK SUPPLEMENTAL_LOG_DATA_UI SWITCHOVER_STATUS DATAGUARD_BROKER
YES ENABLED NO NO TO STANDBY DISABLED

Database 3
The following query gives us information about catpatch. From this we can tell if the catalog version doesn't match the image version it was started with.

VERSION MODIFIED STATUS
11.2.0.1.0 15-AUG-2009 00:50:10 VALID

Threads
Check how many threads are enabled and started for this database. If the number of instances below does not match then not all instances are up.

THREAD# INSTANCE STATUS
1 ora11g OPEN

Instances
The number of instances returned below is the number currently running. If it does not match the number returned in Threads above then not all instances are up.
VERSION should match the version from CATPROC above.
ARCHIVER can be (STOPPED | STARTED | FAILED). FAILED means that the archiver failed to archive a log last time, but will try again within 5 minutes.
LOG_SWITCH_WAIT the ARCHIVE LOG/CLEAR LOG/CHECKPOINT event log switching is waiting for.
Note that if ALTER SYSTEM SWITCH LOGFILE is hung, but there is room in the current online redo log, then the value is NULL.

THREAD# INSTANCE_NAME HOST_NAME VERSION ARCHIVER LOG_SWITCH_WAIT
1 ora11g localhost.localdomain 11.2.0.1.0 STARTED

Log Switches
Check how often logs are switching. Log switches should not regularly be occuring in < 20 mins.
Excessive log switching is a performance overhead. Whilst rapid log switching is not in itself a Data Guard issue it can affect Data guard. It may also indicate a problem with log shipping.
Use redo log size = 4GB or redo log size >= peak redo rate x 20 minutes.

LOG_SWITCHES_UNDER_20_MINS LOG_SWITCHES_OVER_20_M
首页 上一页 1 2 3 下一页 尾页 1/3/3
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇网上UnusedIndexScript脚本的问题 下一篇通过Loadtable命令将数据文件加载..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: