V$LOGMNR_CONTENTS确定唯一行

V$LOGMNR_CONTENTS确定唯一行

Select
 SCN,start_scn,commit_scn,xid,rs_id,ssn,csf,
 timestamp "Time Stamp",
 
 sql_redo "SQL Redo",session#
 
From V$LOGMNR_CONTENTS t where session#=863 and serial#=3 
Order by t.scn,t.rs_id,t.ssn

在这里插入图片描述

1、rs_id,ssn确定唯一行,Order by t.scn,t.rs_id,t.ssn基本可以确定sql在redo里的执行顺序

2、csf是sql_redo过长(超过4000字节)其值就为1,从第一个csf=1到最后一个cdf=0代表完整的一行。
备注:rs_id:XX1.XX2.XX3

xx1:16进制的归档日志ID
xx2:当前行的block id
xx3:16进制的当前行block id的偏移量
ssn:SQL sequence number

在这里插入图片描述

在这里插入图片描述

附oracle doc

RS_ID  	VARCHAR2(32)	
Record set ID. The tuple (RS_ID, SSN) together uniquely identifies a logical row change. This will usually mean one row from V$LOGMNR_CONTENTS, 
but could be more than one row if a single SQL statement for either the Redo or Undo would be too large to fit within the respective columns SQL_UNDO or SQL_REDO. 
RS_ID uniquely identifies the redo record that generated the row.

SSN	NUMBER	SQL sequence number. Used in conjunction with RS_ID, this uniquely identifies a logical row change, shown as one or more rows from the V$LOGMNR_CONTENTS view.

CSF	NUMBER	Continuation SQL flag. Possible values are:
0 - Indicates SQL_REDO and SQL_UNDO is contained within the same row

1 - Indicates that either SQL_REDO or SQL_UNDO is greater than 4000 bytes in size and is continued in the next row returned by the view
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值