[转帖]当logfile被删除后_MySQL, Oracle及数据库讨论区_Weblogic技术|Tuxedo技术|中间件技术|Oracle论坛|JAVA论坛|Linux/Unix技术|hadoop论坛_联动北方技术论坛  
网站首页 | 关于我们 | 服务中心 | 经验交流 | 公司荣誉 | 成功案例 | 合作伙伴 | 联系我们 |
联动北方-国内领先的云技术服务提供商
»  游客             当前位置:  论坛首页 »  自由讨论区 »  MySQL, Oracle及数据库讨论区 »
总帖数
1
每页帖数
101/1页1
返回列表
0
发起投票  发起投票 发新帖子
查看: 3775 | 回复: 0   主题: [转帖]当logfile被删除后        下一篇 
kim
注册用户
等级:中校
经验:1729
发帖:222
精华:0
注册:2011-7-21
状态:离线
发送短消息息给kim 加好友    发送短消息息给kim 发消息
发表于: IP:您无权察看 2011-8-2 9:23:30 | [全部帖] [楼主帖] 楼主

数据库的logfile被rm删除,每个logfile group仅有一个logfile member,当该logfile变为current时发现问题。

数据库仍然可以正常运行,但是LNS进程报错称找不到被删除的logfile。我们使用lgwr async模式传输redo到远端physical standby,physical standby无法得到被删除的logfile。

从pfiles中可以看出,因为lgwr进程每时每刻都获得所有logfile的文件句柄,所以虽然该logfile被删除,lgwr还是可以正常读写该logfile,数据库还是可以正常的运行。

但是lns进程只是获得当前的文件句柄,所以当切换到被删除的logfile时,lns进程不能访问该文件。

XFAN primary$> ps -ef |grep lns1|grep XFAN
oracle 17579 1 0 03:02:06 ? 0:01 ora_lns1_XFAN
XFAN primary$> pfiles 17579 | grep redo
/oracle/SCRATCH/data03/XFAN/redo/.redo2.log::cdev:vxfs: — LNS process only hold redo2.log’s handler
XFAN primary$> ps -ef |grep lgwr|grep XFAN
oracle 16377 1 0 02:44:54 ? 0:01 ora_lgwr_XFAN
XFAN primary$> pfiles 16377 |grep redo
/oracle/SCRATCH/data03/XFAN/redo/.redo1.log::cdev:vxfs:
/oracle/SCRATCH/data03/XFAN/redo/.redo2.log::cdev:vxfs:
/oracle/SCRATCH/data03/XFAN/redo/.redo3.log::cdev:vxfs:
/oracle/SCRATCH/data03/XFAN/redo/.redo4.log::cdev:vxfs: — LGWR process hold all redo log files’ handler


首先做的是在primary数据库上清除该logfile,过程如下:

1. 切换到好的logfile group

alter system switch logfile;


2. checkpoint,使该logfile的状态从active变为inactive

alter system checkpoint;


3. 清除该logfile,因为不能被归档,所以要加上unarchived

alter database clear unarchived logfile group x;


因为中间少了一个archive log,所以physical standby不能继续recover。

使用incremental backup来修复该physical standby,大约花费6个小时。如果重新build standby,大约需要花费一个星期。




赞(0)    操作        顶端 
总帖数
1
每页帖数
101/1页1
返回列表
发新帖子
请输入验证码: 点击刷新验证码
您需要登录后才可以回帖 登录 | 注册
技术讨论