WEB开发网
开发学院数据库Oracle RAC+ASM在单机上恢复的过程 阅读

RAC+ASM在单机上恢复的过程

 2008-12-18 13:07:14 来源:WEB开发网   
核心提示:网上也有类似的例子,但不尽详细,RAC+ASM在单机上恢复的过程,也没多花心思解释流程及原因,可能对初试者不太解惑,备份脚本一样,只是中午12点的备份,有感于此,故认真整理了恢复步骤即操作流程

网上也有类似的例子,但不尽详细,也没多花心思解释流程及原因,可能对初试者不太解惑。有感于此,故认真整理了恢复步骤即操作流程,望有助于同行朋友。 

环境:正式环境是IBM4+IBM5(RAC),测试环境是IBM1,两环境的OS,ORACLE等软件一样。

都是 ORACLE10203, AIX(5300-07), 备份操作放在IBM4上执行。

一 背景介绍:

1 RAC环境的备份策略

每天作两次备份,0点和12点,备份脚本一样,只是中午12点的备份,输出的msglog=backup_ccdb_inc_0_12_$today.log,以别于0点的操作。

IBM4 ->crontab -l
0 0 * * * /orabak/script/rmandbbackup.sh>/dev/null 2>&1
0 12 * * * /orabak/script/rmandbbackup_12.sh>/dev/null 2>&1
IBM4 ->more /orabak/script/rmandbbackup.sh
export ORACLE_HOME=/oracle/product/10.2.0/db_1
export ORACLE_SID=ccdb1
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
today=`date +%Y%m%d`
weekday=`date +%w`
backuppath=/orabak
$ORACLE_HOME/bin/rman cmdfile=$backuppath/script/backup_ccdb_inc_0.script msglog=$backuppath/rmanbacktrace/backup_ccdb_inc_0_$today.log
if test $? -ne 0; then
touch $backuppath/rmanbacktrace/"ccdb incremental level 0 backup failed! Date: $today"
$ORACLE_HOME/bin/sqlplus -S "/ as sysdba" @$backuppath/script/insertsms.sql
fi;
IBM4 ->more $backuppath/script/backup_ccdb_inc_0.script
/script/backup_ccdb_inc_0.script: No such file or directory
IBM4 ->more /orabak/script/backup_ccdb_inc_0.script
connect target /
connect catalog rman/xxxxxxxx@bi
run
{
allocate channel d1 type disk maxpiecesize 4000m ;
backup as compressed backupset incremental level = 0 database
format '/orabak/databackup/db_%d_%s_%p_%T'
plus archivelog skip inaccessible delete all input
format '/orabak/logbackup/log_%d_%s_%p_%T';
sql 'alter system archive log current';
release channel d1;
}
run
{ crosscheck backup;
delete noprompt expired backup;
delete noprompt obsolete recovery window of 7 days;
}
exit;
IBM4 ->

1 2 3 4 5 6  下一页

Tags:RAC ASM 单机

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接