oracle回滾溯源
session1
SQL> select to_number(substrb(dbms_session.unique_session_id, 1, 4), 'xxxx') sid, 2 to_number(substrb(dbms_session.unique_session_id, 5, 4), 'xxxx') audsid 3 from dual; SID AUDSID ---------- ---------- 29 923 SQL> SQL> delete from t1; delete from t1 * ERROR at line 1: ORA-00028: your session has been killed ORA-00028: your session has been killed
session2
SQL> alter system kill session '29,923' immediate; alter system kill session '29,923' immediate * ERROR at line 1: ORA-00031: session marked for kill
session3:
8 RECOVERING 24503 10854 13649 06-DEC-21
session4:
8 15 5502 RECOVERING 10854 24503 46 08000F007E150000 0
session5:
SQL> select substr(username,1,10) username,sid,serial#,osuser,segment_name,used_ublk 2 from v$transaction,dba_rollback_segs,v$session 3 where SADDR=SES_ADDR and XIDUSN=SEGMENT_ID 4 order by used_ublk; USERNAME SID SERIAL# OSUSER SEGMENT_NAME USED_UBLK -------------------- ---------- ---------- ------------------------------ ------------------------------ ---------- TEST123 25 2163 oracle _SYSSMU2_349999951$ 872 SQL> col segment_name for a30 SQL> col start_time for a30 SQL> col program for a30 SQL> col sql_text for a50 SQL> col username for a20 SQL> select r.segment_name 2 , t.used_ublk 3 , t.start_time 4 , se.username 5 , se.sid 6 , se.program 7 , s.sql_text 8 from dba_rollback_segs r, v$transaction t, v$session se, v$sql s 9 where t.xidusn = r.segment_id 10 and t.addr = se.taddr 11 and se.sql_address = s.address 12 and se.sql_hash_value = s.hash_value 13 order by t.start_time; SEGMENT_NAME USED_UBLK START_TIME USERNAME SID PROGRAM SQL_TEXT ------------------------------ ---------- ------------------------------ -------------------- ---------- ------------------------------ ---------------- _SYSSMU2_349999951$ 872 12/06/21 14:08:10 TEST123 25 sqlplus@yikuer (TNS V1-V3) delete from t1
參考文件:
How to Check the session and active SQL that consume the Rollback segments. (Doc ID 2625058.1)
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/23825935/viewspace-2922975/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle 資料回滾Oracle
- 【UNDO】Oracle系統回滾段說明Oracle
- 利用oracle的日誌挖掘實現回滾Oracle
- Oracle查詢回滾大事務所需時間Oracle
- 關於ORACLE大型事務回滾的幾個點Oracle
- 引數fast_start_parallel_rollback調整oracle回滾的速度ASTParallelOracle
- 入門Kubernetes - 滾動升級/回滾
- Kubernetes:更新與回滾
- Spring Boot 事物回滾Spring Boot
- 回滾與撤銷(一)
- Kubernetes:Pod 升級、回滾
- Oracle vs PostgreSQL,研發注意事項(3)- 事務回滾之UPDATE操作解析OracleSQL
- 深入UNDO回滾段,檢視爭用以及回滾段使用量的估算
- 談談 Git 程式碼回滾Git
- [20181222]如何找出回滾操作.txt
- Spring的事物回滾問題Spring
- 回滾莫隊學習筆記筆記
- [20140516]取出回滾段資訊.txt
- Oracle閃回技術 為Oracle閃回配置資料庫Oracle資料庫
- 實踐資料回滾解決方案
- spring boot 顯示處理事務回滾Spring Boot
- Git回滾程式碼到某個commitGitMIT
- sqlserver遇到回滾事務的操作策略SQLServer
- IDEA程式碼不想提交了,如何回滾Idea
- git遠端分支回滾到指定版本Git
- 關於事務回滾註解@Transactional
- 【RECO_ORACLE】Oracle閃回PDB的方法Oracle
- BZOJ4241: 歷史研究(回滾莫隊)
- Spring Data JPA中事務回滾意外RollbackExceptionSpringException
- MySQL死鎖案例一(回滾導致死鎖)MySql
- 拉鍊表的建立、查詢和回滾
- 淺入Kubernetes(12):Deployment 的升級、回滾
- MySQL實現事務的提交和回滾MySql
- 不能回滾的Redis事務還能用嗎Redis
- Win10系統怎麼設定回滾時間 win10系統設定回滾時間的方法Win10
- oracle打補丁回顧Oracle
- Oracle資料庫閃回Oracle資料庫
- 1.2.11. 任務11: 回滾到其它主機