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
- ORACLE 前滾和回滾Oracle
- ORACLE回滾段Oracle
- Oracle 資料回滾Oracle
- ORACLE回滾段(1)Oracle
- ORACLE回滾段(2)Oracle
- ORACLE回滾段(轉)Oracle
- ORACLE回滾段管理Oracle
- ORACLE 回滾段詳解Oracle
- Oracle提交和回滾處理Oracle
- Oracle的回滾段介紹Oracle
- ORACLE 死事務的回滾Oracle
- 回滾操作、回滾段的理解
- Oracle例項恢復——說說前滾和回滾Oracle
- Oracle 回滾(ROLLBACK)和撤銷(UNDO)Oracle
- oracle檢視回滾的事務Oracle
- oracle回滾段 undo 表空間Oracle
- ORACLE技術專題-- 回滾段Oracle
- 【UNDO】Oracle系統回滾段說明Oracle
- Oracle - 回滾表空間 Undo 的整理Oracle
- 利用oracle的日誌挖掘實現回滾Oracle
- Oracle查詢回滾大事務所需時間Oracle
- Oracle基礎 03 回滾表空間 undoOracle
- oracle 11g 回滾段的測試Oracle
- 關於oracle例項恢復的前滾和回滾的理解Oracle
- Oracle Database 10g新特性-回滾監視OracleDatabase
- zt_Oracle事務rollback回滾時間估算Oracle
- Mac回滾iTunes版本Mac
- MONGODB 回滾失敗MongoDB
- 關於ORACLE大型事務回滾的幾個點Oracle
- SQL code----檢視回滾段名稱及大小 回滾段的管理SQL
- oracle 12c 新特性 Temporary UNDO 臨時回滾段Oracle
- 《深入解析Oracle》第八章,回滾與撤銷Oracle
- Spring Boot 事物回滾Spring Boot
- java 事務提交/回滾Java
- 入門Kubernetes - 滾動升級/回滾
- 關於前滾(roll forward)和回滾(roll back)Forward
- 鎖表時KILL SESSION及回滾段監控(回滾時間評估)Session