Home / Free sexting chat room / Update trigger in oracle on updating a column

Update trigger in oracle on updating a column

It is also important to dump the log file from another session to maintain clarity.So, in the following script, we will perform a checkpoint, switch log file from session #1.Further, these redo records are applied to the data blocks and undo blocks taking the blocks to next version.

From Session #1, we switch log again from session #1.CHANGE #1 specifies how to Update Row Piece (URP): Update the column 0 to value of ’52 69 79 61 6a’ which is ‘Riyaj’ in the data block with Data Block Address (DBA) 0x0100113d associated with the object 77534.REDO RECORD - Thread:1 RBA: 0x000071.00000002.0010 LEN: 0x021c VLD: 0x0d SCN: 0x0000.0032b4c9 SUBSCN: 1 11/03/2010 CHANGE #1 TYP:2 CLS:1 AFN:4 DBA:0x0100113d OBJ:77534 SCN:0x0000.0032b40b SEQ:2 OP:11.5 ENC:0 RBL:0 KTB Redo op: 0x11 ver: 0x01 .. tabn: 0 slot: 0(0x0) flag: 0x2c lock: 1 ckix: 0 ncol: 1 nnew: 1 size: 0 Vector content: col 0: [ 5] 52 69 79 61 6a Change Vectors 2 and 3 are irrelevant for our discussion, we will ignore it.CHANGE #4 TYP:0 CLS:18 AFN:3 DBA:0x00c00694 OBJ:4294967295 SCN:0x0000.0032b4a6 SEQ:1 OP:5.1 ENC:0 RBL:0 ...Undo type: Regular undo Begin trans Last buffer split: No ...REDO records and change vectors If a row is modified by a SQL statement, Oracle Database generates redo records describing that change.Generated redo records are applied to the database blocks taking the blocks to next version.Test case #1: Updating column to the same value ============ Session #1: alter system checkpoint; alter system switch logfile; Session #2: update updtest set v1='Riyaj'; commit; Session #1: alter system switch logfile; Essentially, Last redo log file has the redo records generated by executing the update statement.We need to dump the redo log file to see contents of the log file.So, undo records are created in the undo block and these undo records describe how to rollback the SQL changes.Redo records are generated describing the changes to those undo blocks too.

261 comments

Leave a Reply

Your email address will not be published. Required fields are marked *

*