Presentation is loading. Please wait.

Presentation is loading. Please wait.

Redo Logs and Recovery John Hibbard Senior Principal Instructor

Similar presentations


Presentation on theme: "Redo Logs and Recovery John Hibbard Senior Principal Instructor"— Presentation transcript:

1 Redo Logs and Recovery John Hibbard Senior Principal Instructor
Minneapolis MN Revised by Dr. Philip Cannata University of Texas, Austin, Texas

2 Redo Buffer Operation User #1 UPDATE emp SET sal = 10 WHERE id = 1234
When user enters… User #1 data file 2 undo file 3 data file 4 UPDATE emp SET sal = 10 WHERE id = 1234 XYZ Zack database buffer cache

3 Redo Buffer Operation User #1 UPDATE emp SET sal = 10 WHERE id = 1234
When user enters… User #1 data file 2 undo file 3 data file 4 UPDATE emp SET sal = 10 WHERE id = 1234 XYZ Zack The data block is retrieved from disk to the database buffer cache (unless it’s already there) database buffer cache

4 Redo Buffer Operation User #1 UPDATE emp SET sal = 10 WHERE id = 1234
When user enters… User #1 data file 2 undo file 3 data file 4 UPDATE emp SET sal = 10 WHERE id = 1234 XYZ Zack The data block is retrieved from disk to the database buffer cache (unless it’s already there) U1 The undo block is then retrieved from disk to the database buffer cache (unless it’s already there) database buffer cache

5 Redo Buffer Operation User #1 UPDATE emp SET sal = 10 WHERE id = 1234
When user enters… User #1 data file 2 undo file 3 data file 4 UPDATE emp SET sal = 10 WHERE id = 1234 XYZ Zack The data block is retrieved from disk to the database buffer cache (unless it’s already there) U1 The undo block is then retrieved from disk to the database buffer cache (unless it’s already there) 5 The undo data is created showing the ‘before image’ database buffer cache

6 Redo Buffer Operation Redo Buffer User #1
When user enters… Redo Buffer User #1 data file 2 undo file 3 data file 4 Tran File Block Row Column Value id UPDATE emp SET sal = 10 WHERE id = 1234 XYZ Zack T The data block is retrieved from disk to the database buffer cache (unless it’s already there) U1 The udo block is then retrieved from disk to the database buffer cache (unless it’s already there) 5 The undo data is created showing the ‘before image’ And an entry recording this change is made in the REDO buffer database buffer cache

7 Redo Buffer Operation Redo Buffer User #1
When user enters… Redo Buffer User #1 data file 2 undo file 3 data file 4 Tran File Block Row Column Value id UPDATE emp SET sal = 10 WHERE id = 1234 XYZ Zack T Information is also recorded identifying the location of the data segment being changed. U1 5 database buffer cache

8 Redo Buffer Operation Redo Buffer User #1
When user enters… Redo Buffer User #1 data file 2 undo file 3 data file 4 Tran File Block Row Column Value id UPDATE emp SET sal = 10 WHERE id = 1234 XYZ Zack T Then the data block is changed... x 10 U1 5 database buffer cache

9 Redo Buffer Operation Redo Buffer User #1
When user enters… Redo Buffer User #1 data file 2 undo file 3 data file 4 Tran File Block Row Column Value id UPDATE emp SET sal = 10 WHERE id = 1234 XYZ Zack T T Then the data block is changed... x 10 And an entry recording this change is made in the REDO buffer U1 5 database buffer cache

10 Redo Buffer Operation Redo Buffer User #1
When user enters… Redo Buffer User #1 data file 2 undo file 3 data file 4 Tran File Block Row Column Value id UPDATE emp SET sal = 10 WHERE id = 1234 XYZ Zack T T Then the data block is changed... x 10 And an entry recording this change is made in the REDO buffer U1 5 database buffer cache

11 Redo Buffer Operation Keypoint Redo Buffer
data file 2 undo file 3 data file 4 Tran File Block Row Column Value id XYZ Zack T Keypoint T Transaction identifier Column address Value of the column that changed Only the very basic data is stored in the redo. The main redo items are:

12 Redo Buffer Operation Redo Buffer This continues for all changes
When user enters… Redo Buffer User #1 data file 2 undo file 3 data file 4 Tran File Block Row Column Value id UPDATE emp SET sal = 10 WHERE id = 1234 XYZ Zack T T This continues for all changes x 10 User # 2 U1 UPDATE prod SET large_col... WHERE id = XYZ 5 database buffer cache

13 Redo Buffer Operation Redo Buffer User #1
When user enters… Redo Buffer User #1 data file 2 undo file 3 data file 4 Tran File Block Row Column Value id UPDATE emp SET sal = 10 WHERE id = 1234 XYZ Zack T T This continues for all changes x 10 User # 2 U1 UPDATE prod SET large_col... WHERE id = XYZ 5 XYZ Zack database buffer cache

14 Redo Buffer Operation Redo Buffer User #1
When user enters… Redo Buffer User #1 data file 2 undo file 3 data file 4 Tran File Block Row Column Value id UPDATE emp SET sal = 10 WHERE id = 1234 XYZ Zack T T T Zack This continues for all changes x 10 User # 2 U1 UPDATE prod SET large_col... WHERE id = XYZ 5 U2 XYZ Zack Zack database buffer cache

15 Redo Buffer Operation Redo Buffer xx User #1
When user enters… Redo Buffer User #1 data file 2 undo file 3 data file 4 Tran File Block Row Column Value id UPDATE emp SET sal = 10 WHERE id = 1234 XYZ Zack T T T Zack This continues for all changes T &&& x 10 User # 2 U1 UPDATE prod SET large_col... WHERE id = XYZ 5 U2 XYZ xx &&&& Zack Zack database buffer cache

16 Redo Buffer Operation Redo Buffer xx User #1
When user enters… Redo Buffer User #1 data file 2 undo file 3 data file 4 Tran File Block Row Column Value id UPDATE emp SET sal = 10 WHERE id = 1234 XYZ Zack T T T Zack This continues for all changes T &&&& x 20 x 10 T User # 2 U1 T UPDATE prod SET large_col... WHERE id = XYZ 5 10 User #1 U2 XYZ UPDATE emp SET sal = 20 WHERE id =1234 xx &&&& Zack Zack database buffer cache

17 Redo Buffer Operation Redo Buffer xx User #1 commit;
Then a user commits data file 2 undo file 3 data file 4 Tran File Block Row Column Value id User #1 XYZ Zack T T commit; T Zack file:block file:block T &&&& x 20 x 10 2:123 T U1 T 5 3:12 10 U2 XYZ 3:65 xx &&&& 4:89 Zack Zack database buffer cache

18 Redo Buffer Operation Redo Buffer xx User #1 commit;
Then a user commits data file 2 undo file 3 data file 4 Tran File Block Row Column Value id User #1 XYZ Zack T T commit; T Zack And an entry recording the commit is made in the REDO buffer T &&&& x 20 x 10 T U1 T 5 10 T1 commit SCN time stamp U2 XYZ xx &&&& Zack Zack database buffer cache

19 Redo Buffer Operation Redo Buffer xx User #1 commit;
Then a user commits data file 2 undo file 3 data file 4 Tran File Block Row Column Value id User #1 XYZ Zack T T commit; T Zack And an entry recording the commit is made in the REDO buffer T &&&& x 20 x 10 T U1 This entry consists of: T 5 a “code” to indicate this is a commit (as opposed to a rollback or checkpoint) a timestamp the current SCN 10 T1 commit SCN time stamp U2 XYZ xx &&&& Zack Zack database buffer cache

20 Thought you’d never ask!!!
Redo Buffer Operation What is an SCN? Thought you’d never ask!!!

21 System Change Number SCN is the System Change Number
sequentially assigned by LGWR to indicate the “time” of a commit, rollback or checkpoint

22 System Change Number SCN is the System Change Number
sequentially assigned by LGWR to indicate the “time” of a commit, rollback or checkpoint For Example: 3256 this SCN was assigned to the last transaction that issued a commit

23 System Change Number SCN is the System Change Number
sequentially assigned by LGWR to indicate the “time” of a commit, rollback or checkpoint For Example: 3256 3257 this SCN was assigned to the last transaction that issued a commit

24 System Change Number SCN is the System Change Number
sequentially assigned by LGWR to indicate the “time” of a commit, rollback or checkpoint For Example: 3256 3257 3258 this SCN was assigned to the last transaction that issued a commit

25 System Change Number SCN is the System Change Number
sequentially assigned by LGWR to indicate the “time” of a commit, rollback or checkpoint For Example: 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 this SCN was assigned to the last transaction that issued a commit

26 System Change Number SCN is the System Change Number
sequentially assigned by LGWR to indicate the “time” of a commit, rollback or checkpoint For Example: 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 If one SCN is larger than another it means it was committed after the smaller was committed… and vice versa

27 Redo Buffer Operation Redo Buffer
The log data will now get written to the logfile by the log writer (LGWR). Redo Buffer T T T Zack T &&&& T T T1 commit SCN# time stamp LGWR LGWR writes when: Commit Buffer is 1/3 full Checkpoint 1 Meg of data in buffer DBWR writes 3 seconds Log 1 Log 2

28 Redo Buffer Operation Redo Buffer LGWR
T Zack T &&&& T T T1 commit SCN# time stamp LGWR Notice that even though it was only transaction T1 that committed the data for T87 also was written even though it is not committed. Log 1 Log 2

29 Redo Buffer Operation Redo Buffer
While this data is being written to the log file other data can continue to be placed in the redo buffer until the buffer is full. T T T Zack T &&&& T T T1 commit SCN# time stamp LGWR T &&&& T #### T T T2 commit SCN# time stamp Log 1 Log 2

30 Redo Buffer Operation Redo Buffer
While this data is being written to the log file other data can continue to be placed in the redo buffer until the buffer is full. Notice the two commits. T T T Zack T &&&& T T T1 commit SCN# time stamp LGWR T &&&& T #### T T T2 commit SCN# time stamp T T T3 commit SCN# time stamp Log 1 Log 2

31 Redo Buffer Operation Redo Buffer
While this data is being written to the log file other data can continue to be placed in the redo buffer until the buffer is full T T T Zack T &&&& T T T1 commit SCN# time stamp LGWR T &&&& T #### T T T2 commit SCN# time stamp T T T3 commit SCN# time stamp Since LGWR is busy the two commits are “piggybacked” LGWR will write both at the same time and will use the same SCN for both Log 1 Log 2

32 Redo Buffer Operation Redo Buffer
When LGWR finishes writing the group of log records the user is notified that their data has been committed. LGWR then begins writing the next group of log records. T T T Zack T &&&& T T T1 commit SCN# time stamp LGWR T &&&& T #### T T T2 commit SCN# time stamp T T T3 commit SCN# time stamp Log 1 Log 2

33 Redo Buffer Operation Redo Buffer LGWR Log 1 Log 2 T1 3 12 - - 5
T Zack T &&&& T T T1 commit SCN# time stamp T &&&& T #### T T T2 commit SCN# time stamp T T T3 commit SCN# time stamp LGWR Log 1 Log 2

34 Redo Buffer Operation Redo Buffer
Additional data continues to be added to the redo buffer overwriting the previously written data T T T Zack T &&&& T T T1 commit SCN# time stamp T &&&& T #### T T T2 commit SCN# time stamp T T T3 commit SCN# time stamp LGWR T #### T T T T T T T Log 1 Log 2

35 Redo Buffer Operation Redo Buffer
Additional data continues to be added to the redo buffer overwriting the previously written data T T T T T T T T T &&&& T #### T T T2 commit SCN# time stamp T T T3 commit SCN# time stamp LGWR T #### T T T T T T T Log 1 Log 2

36 OUCH! Redo Buffer Operation Redo Buffer
The REDO BUFFER just filled up! T T T T T T T T T &&&& T #### T T T2 commit SCN# time stamp T T T3 commit SCN# time stamp LGWR T #### T T T T T T T Log 1 Log 2

37 Redo Buffer Operation All the users doing DML get this object on their screen for their efforts!

38 Redo Buffer Operation

39 REDO BUFFER needs to be larger
Redo Buffer Operation Redo Buffer Solution: REDO BUFFER needs to be larger T T T T T T T T T &&&& T #### T T T2 commit SCN# time stamp T T T3 commit SCN# time stamp LGWR T #### T T T T T T T Log 1 Log 2

40 NOW…. To revert back to our discussion about the physical redo logs

41 Redo Log Operation LGWR continues writing to the log until the log fills up. LGWR Log 1 Log 2

42 Redo Log Operation LGWR continues writing to the log until the log fills up. LGWR Log 1 Log 2

43 Redo Log Operation LGWR continues writing to the log until the log fills up. LGWR Log 1 Log 2

44 Redo Log Operation This is called a log switch.
LGWR continues writing to the log until the log fills up. LGWR then begins writing to the next redo log. This is called a log switch. LGWR Log 1 Log 2

45 Redo Log Operation For safety’s sake redo logs should always be mirrored. ALTER DATABASE ADD LOGFILE MEMBER log1b TO GROUP 1; ALTER DATABASE ADD LOGFILE MEMBER log2b TO GROUP 2; Note: this method is recommended instead of or in addition to using hardware mirroring Log 1 Log 2 a Log 1 Log 2 b

46 Redo Log Operation For safety’s sake redo logs should always be mirrored. ALTER DATABASE ADD LOGFILE MEMBER log1b TO GROUP 1; ALTER DATABASE ADD LOGFILE MEMBER log2b TO GROUP 2; Note: this method is recommended instead of or in addition to using hardware mirroring LGWR will then write to the multiple logs simultaneously LGWR Log 1 Log 2 a Log 1 Log 2 b

47 Database Recovery The Oracle recovery process has three parts performed in this order: Roll Forward: all changes made to data blocks that had not been written to the data files on disk are performed again by reapplying (redoing) the images originally recorded on the Redo Log. Open Database: users can begin normal operations Rollback: uncommitted transactions are rolled back using the undo log

48 Database Recovery Redo Log T1 3 12 - - 5 T1 2 123 41 6 10
data file 2 undo file 3 data file 4 Tran File Block Row Column Value id XYZ Zack T T T Zack When recovery begins the control file is accessed to determine which enty in the redo log is to be used to start the roll foward portion of recovery. T &&&& T T T1 commit SCN# time stamp T &&&& T #### T T T2 commit SCN# time stamp T T Control File database buffer cache

49 Database Recovery Redo Log T1 3 12 - - 5 T1 2 123 41 6 10
data file 2 undo file 3 data file 4 Tran File Block Row Column Value id XYZ Zack T T T Zack That entry in the Redo Log is accessed. T &&&& T The referenced block is retrieved from disk to the database buffer cache (unless it’s already there). It happens to be a roll back block. U1 T T1 commit SCN# time stamp T &&&& T #### T T T2 commit SCN# time stamp T T database buffer cache

50 Database Recovery Redo Log T1 3 12 - - 5 T1 2 123 41 6 10
data file 2 undo file 3 data file 4 Tran File Block Row Column Value id XYZ Zack T T T Zack That entry in the Redo Log is accessed. T &&&& T The referenced block is retrieved from disk to the database buffer cache (unless it’s already there). It happens to be a roll back block. U1 T 5 T1 commit SCN# time stamp T &&&& T #### T T T2 commit SCN# time stamp T T The roll back data is recreated showing the ‘before image’ database buffer cache

51 Database Recovery Redo Log T1 3 12 - - 5 Then… T1 2 123 41 6 10
data file 2 undo file 3 data file 4 Tran File Block Row Column Value id XYZ Zack T Then… T T Zack The data block is retrieved from disk to the database buffer cache (unless it’s already there) T &&&& T U1 T 5 T1 commit SCN# time stamp T &&&& T #### T T T2 commit SCN# time stamp T T database buffer cache

52 Database Recovery Redo Log T1 3 12 - - 5 Then… T1 2 123 41 6 10
data file 2 undo file 3 data file 4 Tran File Block Row Column Value id XYZ Zack T Then… T T Zack The data block is retrieved from disk to the database buffer cache (unless it’s already there) T &&&& T U1 T 5 Notice that the value in the data block is greater than the redo data! T1 commit SCN# time stamp T &&&& T #### T T T2 commit SCN# time stamp T T database buffer cache

53 Database Recovery Redo Log T1 3 12 - - 5 Then… T1 2 123 41 6 10
data file 2 undo file 3 data file 4 Tran File Block Row Column Value id XYZ Zack T Then… T T Zack The data block is retrieved from disk to the database buffer cache (unless it’s already there) x 10 T &&&& T U1 T 5 Notice that the value in the data block is greater than the redo data! T1 commit SCN# time stamp T &&&& T #### T T T2 commit SCN# time stamp T T The data is recreated showing the ‘after image’ database buffer cache

54 Database Recovery Redo Log T1 3 12 - - 5 T1 2 123 41 6 10
data file 2 undo file 3 data file 4 Tran File Block Row Column Value id XYZ Zack T T T Zack Then the next entry .... x 10 T &&&& T U1 T 5 T1 commit SCN# time stamp T &&&& T #### T T T2 commit SCN# time stamp T T U2 Zack database buffer cache

55 Database Recovery Redo Log xx T1 3 12 - - 5 T1 2 123 41 6 10
data file 2 undo file 3 data file 4 Tran File Block Row Column Value id XYZ Zack T T T Zack and the next x 10 T &&&& T XYZ U1 T xx &&&& Zack 5 T1 commit SCN# time stamp T &&&& T #### T T T2 commit SCN# time stamp T T U2 Zack database buffer cache

56 Database Recovery Redo Log xx T1 3 12 - - 5 T1 2 123 41 6 10
data file 2 undo file 3 data file 4 Tran File Block Row Column Value id XYZ Zack T T T Zack etc., x 10 T &&&& T XYZ U1 T xx &&&& Zack 5 10 T1 commit SCN# time stamp T &&&& T #### T T T2 commit SCN# time stamp T T U2 Zack database buffer cache

57 Database Recovery Redo Log xx
data file 2 undo file 3 data file 4 Tran File Block Row Column Value id XYZ Zack T T T Zack etc., etc., x 20 T &&&& T XYZ U1 T xx &&&& Zack 5 Notice that the value in the data block has now been restored to the value on disk. 10 T1 commit SCN# time stamp T &&&& T #### T T T2 commit SCN# time stamp T T U2 Zack database buffer cache

58 Database Recovery Redo Log xx C C
data file 2 undo file 3 data file 4 Tran File Block Row Column Value id XYZ Zack T T T Zack etc., etc., etc. x 20 T &&&& C T XYZ U1 The transaction has been “re-committed” T xx &&&& Zack 5 10 C T1 commit SCN# time stamp T &&&& T #### T T T2 commit SCN# time stamp T T U2 Zack database buffer cache

59 Database Recovery Keypoint Redo Log
Tran File Block Row Column Value T T T Zack T &&&& T T T1 commit SCN# time stamp T &&&& T #### T T T2 commit SCN# time stamp T T T3 commit SCN# time stamp T #### T T T T T T T T T T T T T T T data file 2 undo file 3 data file 4 XYZ Zack Keypoint After processing the remainder of the redo log.... x 20 C XYZ U1 xx &&&& Zack 5 the buffer cache and data files will have been rebuilt to appear as they were at the time of the crash. 10 C U2 Zack database buffer cache

60 Database Recovery Redo Log
Tran File Block Row Column Value T T T Zack T &&&& T T T1 commit SCN# time stamp T &&&& T #### T T T2 commit SCN# time stamp T T T3 commit SCN# time stamp T #### T T T T T T T T T T T T T T T data file 2 undo file 3 data file 4 XYZ Zack The database is then opened so the users can begin work..... x 20 C XYZ U1 xx &&&& Zack 5 10 C U2 Zack database buffer cache

61 Database Recovery Redo Log
Tran File Block Row Column Value T T T Zack T &&&& T T T1 commit SCN# time stamp T &&&& T #### T T T2 commit SCN# time stamp T T T3 commit SCN# time stamp T #### T T T T T T T T T T T T T T T data file 2 undo file 3 data file 4 then all uncommitted transactions will be rolled back. XYZ Zack The database is then opened so the users can begin work..... x 20 C XYZ U1 xx &&&& Zack 5 10 C U2 Zack database buffer cache

62 Database Recovery Beginning with 9i Redo Log
Tran File Block Row Column Value T T T Zack T &&&& T T T1 commit SCN# time stamp T &&&& T #### T T T2 commit SCN# time stamp T T T3 commit SCN# time stamp T #### T T T T T T T T T T T T T T T Beginning with 9i The method for performing the roll forward phase has been changed to improve performance. DBWn 3 / 12 2/123 3 / 65 4 / 89

63 Database Recovery Beginning with 9i Redo Log
Tran File Block Row Column Value T T T Zack T &&&& T T T1 commit SCN# time stamp T &&&& T #### T T T2 commit SCN# time stamp T T T3 commit SCN# time stamp T #### T T T T T T T T T T T T T T T Beginning with 9i An entry is placed in the redo log whenever DBWR writes data to disk . It identifies the blocks that were just written. DBWn 3 / 12 2/123 3 / 65 4 / 89

64 Database Recovery Beginning with 9i Redo Log
Tran File Block Row Column Value T T T Zack T &&&& T T T1 commit SCN# time stamp T &&&& T #### T T T2 commit SCN# time stamp T T T3 commit SCN# time stamp T #### T T T T T T T T T T T T T T T Beginning with 9i To improve performance during instance recovery the redo log is processed twice first to identify the entries that need to be processed second to process the selected entries DBWn 3 / 12 2/123 3 / 65 4 / 89

65 Identify the Entries First pass of redo data Redo Log
Tran File Block Row Column Value T T T Zack T &&&& T T T1 commit SCN# time stamp T &&&& T #### T T T2 commit SCN# time stamp T T T3 commit SCN# time stamp T #### T T T T T T T T T T T T T T T First pass of redo data Identify redo that needs to be processed No data blocks are read Very fast DBWn 3 / 12 2/123 3 / 65 4 / 89

66 Identify the Entries Copy the REDO....
Redo Log Tran File Block Row Column Value T T T Zack T &&&& T T T1 commit SCN# time stamp T &&&& T #### T T T2 commit SCN# time stamp T T T3 commit SCN# time stamp T #### T T T T T Zack T &&&& T T T1 commit SCN# time stamp T &&&& T #### T T T2 commit SCN# time stamp T T T3 commit SCN# time stamp T #### T T T T T T T T T T T T T T T DBWn 3 / 12 2/123 3 / 65 4 / 89 Copy the REDO....

67 Remove entries for those blocks already written....
Identify the Entries Redo Log Tran File Block Row Column Value T T T Zack T &&&& T T T1 commit SCN# time stamp T &&&& T #### T T T2 commit SCN# time stamp T T T3 commit SCN# time stamp T #### T T T T T Zack T &&&& T T T1 commit SCN# time stamp T &&&& T #### T T T2 commit SCN# time stamp T T T3 commit SCN# time stamp T #### T T T T T T T T T T T T T T T DBWn 3 / 12 2/123 3 / 65 4 / 89 Remove entries for those blocks already written....

68 Remove entries for those blocks already written....
Identify the Entries Redo Log Tran File Block Row Column Value T T T Zack T &&&& T T T1 commit SCN# time stamp T &&&& T #### T T T2 commit SCN# time stamp T T T3 commit SCN# time stamp T #### T T T T T Zack T &&&& T T T1 commit SCN# time stamp T &&&& T #### T T T2 commit SCN# time stamp T T T3 commit SCN# time stamp T #### T T T T T T T T T T T T T T T DBWn 3 / 12 2/123 3 / 65 4 / 89 Remove entries for those blocks already written....

69 Remove entries for those blocks already written....
Identify the Entries Redo Log Tran File Block Row Column Value T T T Zack T &&&& T T T1 commit SCN# time stamp T &&&& T #### T T T2 commit SCN# time stamp T T T3 commit SCN# time stamp T #### T T T T T Zack T &&&& T T T1 commit SCN# time stamp T &&&& T #### T T T2 commit SCN# time stamp T T T3 commit SCN# time stamp T #### T T T T T T T T T T T T T T T DBWn 3 / 12 2/123 3 / 65 4 / 89 Remove entries for those blocks already written....

70 Remove entries for those blocks already written....
Identify the Entries Redo Log Tran File Block Row Column Value T T T Zack T &&&& T T T1 commit SCN# time stamp T &&&& T #### T T T2 commit SCN# time stamp T T T3 commit SCN# time stamp T #### T T T T T Zack T &&&& T T T1 commit SCN# time stamp T &&&& T #### T T T2 commit SCN# time stamp T T T3 commit SCN# time stamp T #### T T T T T T T T T T T T T T T DBWn 3 / 12 2/123 3 / 65 4 / 89 Remove entries for those blocks already written....

71 Remove entries for those blocks already written....
Identify the Entries Redo Log Tran File Block Row Column Value T T T Zack T &&&& T T T1 commit SCN# time stamp T &&&& T #### T T T2 commit SCN# time stamp T T T3 commit SCN# time stamp T #### T T T T T Zack T &&&& T T T1 commit SCN# time stamp T &&&& T #### T T T2 commit SCN# time stamp T T T3 commit SCN# time stamp T #### T T T T T T T T T T T T T T T DBWn 3 / 12 2/123 3 / 65 4 / 89 Remove entries for those blocks already written....

72 Identify the Entries Finish the list.... Redo Log
Tran File Block Row Column Value T T T Zack T &&&& T T T1 commit SCN# time stamp T &&&& T #### T T T2 commit SCN# time stamp T T T3 commit SCN# time stamp T #### T T T T T Zack T &&&& T T T1 commit SCN# time stamp T &&&& T #### T T T2 commit SCN# time stamp T T T3 commit SCN# time stamp T #### T T T T T T T T T T T T T T T DBWn 3 / 12 2/123 3 / 65 4 / 89 Finish the list....

73 Identify the Entries Redo Log Tran File Block Row Column Value
T Zack T &&&& T T T1 commit SCN# time stamp T &&&& T #### T T T2 commit SCN# time stamp T T T3 commit SCN# time stamp T #### T T T T T Zack T &&&& T T T1 commit SCN# time stamp T &&&& T #### T T T2 commit SCN# time stamp T T T3 commit SCN# time stamp T #### T T T T T T T T T T T T T T T DBWn 3 / 12 2/123 3 / 65 4 / 89 T T T T T T T T T T T T T

74 Identify the Entries Redo Log Tran File Block Row Column Value
T Zack T &&&& T T T1 commit SCN# time stamp T &&&& T #### T T T2 commit SCN# time stamp T T T3 commit SCN# time stamp T #### T T T T T Zack T &&&& T T T1 commit SCN# time stamp T &&&& T #### T T T2 commit SCN# time stamp T T T3 commit SCN# time stamp T #### T T T T T T T T T T T T T T T DBWn 3 / 12 2/123 3 / 65 4 / 89 T T T T T T T T T T T T T

75 Second pass of redo data
Process the Entries Second pass of redo data Recover using these selected entries T T T Zack T &&&& T T T1 commit SCN# time stamp T &&&& T #### T T T2 commit SCN# time stamp T T T3 commit SCN# time stamp T #### T T T T T T T T T T T T T T T

76 This concludes the demonstration of
Redo Logs and Recovery

77


Download ppt "Redo Logs and Recovery John Hibbard Senior Principal Instructor"

Similar presentations


Ads by Google