RMAN故障诊断脚本集
RMAN故障诊断脚本集说明事项:该脚本用于提供RMAN的信息收集该脚本在RMAN中执行,如果使用了RMAN CataLog,则需要使用RMAN连接到
RMAN故障诊断脚本集
说明事项:
该脚本用于提供RMAN的信息收集
该脚本在RMAN中执行,,如果使用了RMAN CataLog,则需要使用RMAN连接到资料库CataLog.
该脚本将生成一个脚本文件 rman_diagnostics.out (default location is /tmp)
对于Unix环境,建议设置NLS_DATE_FORMAT环境变量,例如:
$ export NLS_DATE_FORMAT='DD MON YYYY HH24:MI:SS'
2) Run the following in RMAN:
--对于数据文件数量较少的DB
a) for databases with a small number of datafiles and/or backup retention policy
spool log to '/tmp/rman_diag_long.out';
set echo on
show all;
list incarnation of database;
report schema;
list backup summary;
list backup of database completed after 'sysdate - 40';
list copy of database completed after 'sysdate - 40';
list backup of archivelog all completed after 'sysdate - 40';
list archivelog all completed after 'sysdate - 40';
list backup of controlfile completed after 'sysdate - 40';
list copy of controlfile completed after 'sysdate - 40';
list backup of datafile 1;
list copy of datafile 1;
spool log off;
--对于数据文件数量较多的DB,可单独收集查看某一数据文件的信息。
b) for databases with a large number of datafiles/backup retention policy, lets narrow this down to datafile 1:
spool log to '/tmp/rman_diag_short.out';
show all;
list incarnation of database;
report schema;
list backup summary;
list backup of datafile 1;
list copy of datafile 1;
spool log off;
推荐阅读:
RMAN 配置归档日志删除策略
Oracle基础教程之通过RMAN复制数据库
RMAN备份策略制定参考内容
RMAN备份学习笔记
Oracle数据库备份加密 RMAN加密