[20181122]bbed人為修改事務提交標誌.txt
[20181122]bbed人為修改事務提交標誌.txt
--//做一個bbed人為修改事務提交標誌的測試,感覺這東西要經常練習,不做有點生疏.
1.環境:
SCOTT@book> @ver1
PORT_STRING VERSION BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx 11.2.0.4.0 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
create table deptx as select * from dept;
SCOTT@book> select rowid,deptx.* from deptx where rownum=1;
ROWID DEPTNO DNAME LOC
------------------ ---------- -------------- -------------
AAAWFdAAEAAAAIzAAA 10 ACCOUNTING NEW YORK
SCOTT@book> @ rowid AAAWFdAAEAAAAIzAAA
OBJECT FILE BLOCK ROW ROWID_DBA DBA TEXT
---------- ---------- ---------- ---------- -------------------- -------------------- ----------------------------------------
90461 4 563 0 0x1000233 4,563 alter system dump datafile 4 block 563 ;
2.測試:
--//session 1:
SCOTT@book> update deptx set dname=lower(dname) where deptno=10;
1 row updated.
--//session 2:
SCOTT@book> alter system flush buffer_cache;
System altered.
3.bbed人為修改事務提交標誌:
BBED> set dba 4,563
DBA 0x01000233 (16777779 4,563)
BBED> x /rncc *kdbr[0]
rowdata[66] @8162
-----------
flag@8162: 0x2c (KDRHFL, KDRHFF, KDRHFH)
lock@8163: 0x02
cols@8164: 3
col 0[2] @8165: 10
col 1[10] @8168: accounting
col 2[8] @8179: NEW YORK
--//使用事務槽2.從0開始編號.
BBED> p ktbbh.ktbbhitl[1]
struct ktbbhitl[1], 24 bytes @68
struct ktbitxid, 8 bytes @68
ub2 kxidusn @68 0x000a
ub2 kxidslt @70 0x001c
ub4 kxidsqn @72 0x000051d4
struct ktbituba, 8 bytes @76
ub4 kubadba @76 0x00c00117
ub2 kubaseq @80 0x0f93
ub1 kubarec @82 0x24
ub2 ktbitflg @84 0x0001 (NONE)
union _ktbitun, 2 bytes @86
sb2 _ktbitfsc @86 0
ub2 _ktbitwrp @86 0x0000
ub4 ktbitbas @88 0x00000000
BBED> assign ktbbh.ktbbhitl[1].ktbitflg=0x8000
Warning: contents of previous BIFILE will be lost. Proceed? (Y/N) y
ub2 ktbitflg @84 0x8000 (KTBFCOM)
BBED> assign offset 8163=0x00
ub1 rowdata[0] @8163 0x00
BBED> x /rncc *kdbr[0]
rowdata[66] @8162
-----------
flag@8162: 0x2c (KDRHFL, KDRHFF, KDRHFH)
lock@8163: 0x00
cols@8164: 3
col 0[2] @8165: 10
col 1[10] @8168: accounting
col 2[8] @8179: NEW YORK
BBED> sum apply ;
Check value for File 4, Block 563:
current = 0xb7ca, required = 0xb7ca
3.開啟新的會話:
--//session 2:
SCOTT@book> select rowid,deptx.* from deptx where rownum=1;
ROWID DEPTNO DNAME LOC
------------------ ---------- -------------- -------------
AAAWFdAAEAAAAIzAAA 10 accounting NEW YORK
--//可以發現dname變成小寫.看見沒有提交的事務.
--//回到session 1:
SCOTT@book> rollback;
Rollback complete.
SCOTT@book> select rowid,deptx.* from deptx where rownum=1;
ROWID DEPTNO DNAME LOC
------------------ ---------- -------------- -------------
AAAWFdAAEAAAAIzAAA 10 ACCOUNTING NEW YORK
--//不過rollback,有回來了.
--//回到session 2:
SCOTT@book> select rowid,deptx.* from deptx where rownum=1;
ROWID DEPTNO DNAME LOC
------------------ ---------- -------------- -------------
AAAWFdAAEAAAAIzAAA 10 ACCOUNTING NEW YORK
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2221174/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- [20181204]bbed修改問題.txt
- [20190104]bbed手動修改資料.txt
- [20180604]在記憶體修改資料(bbed).txt記憶體
- MySQL:begin後事務為什麼不提交MySql
- OceanBase 原始碼解讀(八):事務日誌的提交和回放原始碼
- [20181122]18c sqlplus set linesize.txtSQL
- [20181122]模擬ORA-08103錯誤.txt
- 事務單獨提交和
- MySQL事務兩段式提交MySql
- Spring中的事務提交事件Spring事件
- vitess兩階段提交事務Vite
- [20231008]bbed探究lob段.txt
- [20210920]bbed的assign命令.txt
- [20220223]bbed ktbbh.ktbbhict.txt
- [20210304]bbed的assign命令.txt
- [20180619]bbed verify問題.txt
- 為DbContextScope新增資料庫事務提交完成事件Context資料庫事件
- MySQL 事務日誌MySql
- [20210906]bbed讀取資料塊(bbed-wrap.sh).txt
- bbed修改undo段狀態
- 【BBED】使用BBED修改資料檔案SCN,使該檔案從offline轉變為online
- MySQl事務建立,開始以及提交MySql
- [20230224]bbed設定偏移技巧.txt
- [20210901]cygwin下使用bbed.txt
- [20210223]bbed itl ktbitflg 2.txt
- [20210303]bbed使用小問題.txt
- [20190104]bbed手工插入資料.txt
- [20181227]bbed的使用問題.txt
- Elasticsearch 的事務日誌Elasticsearch
- [20210318]bbed讀取資料塊.txt
- [20210311]如何建立bbed安裝包.txt
- [20180628]顯示bbed x命令格式.txt
- mysql因為事務日誌問題無法啟動MySql
- git 修改提交作者及提交日期Git
- @Transactional註解管理事務和手動提交事務
- 分散式:分散式事務(CAP、兩階段提交、三階段提交)分散式
- [20210604]如何看到遞迴事務.txt遞迴
- 分散式事務(二)之三階段提交分散式