An in-depth analysis of the operation process of a transaction in the undo Series

Source: Internet
Author: User

At the beginning, we first use an experiment to introduce the transaction:

  1. Sys @ ORCL>SelectXid, xidusn, xidslot, xidsqn, ubablk, ubafilFromV $Transaction;
  2. No RowsSelected

The corresponding transaction information is not found. Use hr to initiate a transaction:

  1. Hr @ ORCL>Select*FromP;
  2. ID TEST
  3. ---------------
  4. 2 f
  5. 3g
  6. 1
  7. Hr @ ORCL>UpdatePSetTest ='W' WhereId = 1;
  8. 1 row updated.

View transaction information again:

  1. Sys @ ORCL>/
  2. XID XIDUSN XIDSLOT XIDSQN UBABLK UBAFIL
  3. ------------------------------------------------------------------
  4. 02000800E2010000 2 8 482 3339 2

View the rollback segments of the hr initiating firm:

  1. Sys @ ORCL>SelectXidusn, sid, usernameFromV $TransactionT, v $ session sWhereT. ses_addr = s. saddr;
  2. XIDUSN SID USERNAME
  3. --------------------------------------------------
  4. 2 141 HR
  5. 9 158 SCOTT

View the segment name of rollback segment 2:

  1. Sys @ ORCL>Select*FromV $ rollname;
  2. USNNAME
  3. ----------------------------------------
  4. 0 SYSTEM
  5. 1 _ SYSSMU1 $
  6. 2 _ SYSSMU2 $
  7. 3 _ SYSSMU3 $
  8. 4_syssmu4 $
  9. 5_syssmu5 $
  10. 6_syssmu6 $
  11. 7 _ SYSSMU7 $
  12. 8_syssmu8 $
  13. 9 _ SYSSMU9 $
  14. 10 _ SYSSMU10 $
  15. 11RowsSelected.

Then dump the segment header of the rollback segment No. 2 to the udump directory:

  1. Sys @ ORCL>SelectHeader_block, header_fileFromDba_segmentsWhereSegment_name ='_ SYSSMU2 $';
  2. HEADER_BLOCK HEADER_FILE
  3. -----------------------
  4. 41 2
  5. Sys @ ORCL>AlterSystem dump undo header'_ SYSSMU2 $';
  6. System altered.
  7. View the process ID of the server process in the current session:
  8. Sys @ ORCL>SelectSpidFromV $ processWhereAddrIn(SelectPaddrFromV $ sessionWhereSid = (SelectSidFromV $ mystatWhereRownum = 1 ));
  9. SPID
  10. ------------
  11. 5446
  • 1
  • 2
  • Next Page

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.