晚上,突然后收到DG gap的报错。

分析发现,DG数据库收到了归档日志,但却在应用的时候出现了如下的报错。

看报错,应该是undo数据块损坏了。
由于数据库是DG数据库,我们就直接将主机包括数据库都重启了下,排除了逻辑错误。
重启后依然有这个报错。
我们选择的解决方案是用Primary的dbf去替代standby的dbf,操作如下:
1.close standby DB instance
--DB:standbyDB--
alter database recovery managed standby database cancel;
shutdown immediate;
2,change instance dbf name to old
--DB:standbyDB--
............check DB and host............
pwd
cd /oradata/awmsdb/
ls -lh
mv undotbs01.dbf undotbs01_old.dbf
3,change primary DB to hot backup
--DB:primaryDB--
alter tablespace UNDOTBS1 begin backup;
4,copy the dbf file from primary to standby
--DB:primaryDB--
cd /oradata/awmsdb/
ls -lh
scp undotbs01.dbf oracle@10.86.111.111:/oradata/awmsdb/
5,startup standbyDB instance to mount and startup MRP
--DB:standbyDB--
startup nomount;
alter database mount;
alter database recover managed standby database disconnect from session;
-----check...............
6,close primary DB hot backup
--DB:primaryDB--
alter tablespace UNDOTBS1 end backup;
7, delete the old broken datafile a few days later
--DB:standbyDB--
pwd
ls -lh
rm undotbs01_old.dbf
最后修改时间:2025-09-30 10:58:52
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




