oracle dba 精通dataguard,goldengate,mview等技术,擅长于数据库管理,备份恢复,性能调优,熟悉mysql,sqlserver的数据库,了解存储,善于shell编程
分类: Oracle
2013-05-09 15:54:27
standby数据库出现坏块,除了重做standby之外,还可以选择恢复指定数据文件的方法,此种方法可执行性很强.对于数据量很大的库,可以极大地提高恢复的速度,节省大量的时间.
problem
standby数据库报类似如下的错误
Recovered data files to a consistent state at change 95056923420
Thu May 9 12:56:31 2013
Errors in file /oracle/admin/cemproc/bdump/cemproc_mrp0_862.trc:
ORA-12801: error signaled in parallel query server P001
ORA-10562: Error occurred while applying redo to data block (file# 1, block# 60986)
ORA-10564: tablespace SYSTEM
ORA-01110: data file 1: '/oracle/oradata/cemproc/system01.dbf'
ORA-10561: block type 'TRANSACTION MANAGED DATA BLOCK', data object# 573
solution
--在主上备份数据文件
RMAN> backup datafile 1 format '/oracle/rman/cemproc/%U';
--拷贝数据到备库所在机器
scp nbo9751d_1_1 192.168.1.:/oracle/rman/cemproc/
--在备库上注册备份文件
RMAN> catalog start with '/oracle/rman_nfs/cemproc/nbo9751d_1_1'
RMAN> list backup of datafile 1;
RMAN> restore datafile 1;
--重新启动standby
shutdown abort;
startup mount;
alter database recover managed standby database disconnect from session;
--观察发现standby 恢复进程正常
select process,status,pid,thread#,sequence#,block#,blocks from v$managed_standby;