阿里云-云小站(无限量代金券发放中)
【腾讯云】云服务器、云数据库、COS、CDN、短信等热卖云产品特惠抢购

Oracle 12.2 RAC : Transaction recovery: lock conflict caught and ignored 解决方法

109次阅读
没有评论

共计 1597 个字符,预计需要花费 4 分钟才能阅读完成。

节点一 alert 日志:

PDB(17):Transaction recovery: lock conflict caught and ignored

PDB(17):Transaction recovery: lock conflict caught and ignored

PDB(17):Transaction recovery: lock conflict caught and ignored

节点二:alert 日志

PDB(17):minact-scn: useg scan erroring out with error e:12751

PDB(17):minact-scn: useg scan erroring out with error e:12751

PDB(17):minact-scn: useg scan erroring out with error e:12751

起因:

分区表 表级 nologging,分批四千万数据并行插入,全表共 6 亿多数据,导致死锁,查询

select ‘alter system kill session ‘||chr(39)||t2.sid||’,’||t2.serial#||chr(39)||’;’
from v$locked_object t1,v$session t2
where t1.session_id=t2.sid order by t2.logon_time;

alter system kill session ‘4843,29019’;

全部是同一个会话,竟有 3000 多条记录,

后采用杀会话的方式没能释放,又用 kill -9 杀掉进程。随后,alert 日志出现以上告警。

然后各种查资料 … 网上有说要 dump 数据快,技术有限,还好是压力测试用的,等着慢慢恢复,停止此表数据的插入。

 1. 查看恢复时使用的回滚段

select b.name useg, b.inst# instid, b.status$ status, a.ktuxeusn
xid_usn, a.ktuxeslt xid_slot, a.ktuxesqn xid_seq, a.ktuxesiz undoblocks,
a.ktuxesta txstatus
from x$ktuxe a, undo$ b
where a.ktuxecfl like ‘%DEAD%’
and a.ktuxeusn = b.us#;

USEG                  INSTID    STATUS    XID_USN  XID_SLOT    XID_SEQ UNDOBLOCKS TXSTATUS
—————————— ———- ———- ———- ———- ———- ———- —————-
_SYSSMU30_2947991045$            1      3        30    10    50494    3572115 ACTIVE

2. 查看恢复进度

select ktuxeusn USN, ktuxeslt Slot, ktuxesqn Seq, ktuxesta State, ktuxesiz Undo from x$ktuxe
  where ktuxesta <> ‘INACTIVE’
  and ktuxecfl like ‘%DEAD%’
  order by ktuxesiz asc;

      USN    SLOT        SEQ STATE            UNDO
———- ———- ———- —————- ———-
    30      10      50494 ACTIVE          2815649

等着慢慢恢复,一分钟约一万 block 的速度,6 个小时 3572115blocks。第二天观察 UNDO 恢复正常了,告警也随之消失。

更多 Oracle 相关信息见 Oracle 专题页面 https://www.linuxidc.com/topicnews.aspx?tid=12

正文完
星哥说事-微信公众号
post-qrcode
 0
星锅
版权声明:本站原创文章,由 星锅 于2022-01-22发表,共计1597字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。
阿里云-最新活动爆款每日限量供应
评论(没有评论)
验证码
【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中