dbms transactions and rollback recovery n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
DBMS Transactions and Rollback Recovery PowerPoint Presentation
Download Presentation
DBMS Transactions and Rollback Recovery

Loading in 2 Seconds...

play fullscreen
1 / 8

DBMS Transactions and Rollback Recovery - PowerPoint PPT Presentation


  • 108 Views
  • Uploaded on

DBMS Transactions and Rollback Recovery. Helia / Martti Laiho. Application programs - Sessions (connections) - Transactions - SQL commands. Database Instance. Data Buffer (Buffer pool). DBMS Listener / Server Transaction Manager SQL Engine (parser) Security Manager

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'DBMS Transactions and Rollback Recovery' - zachery-holden


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
database instance

Application programs

- Sessions (connections)

- Transactions

- SQL commands

Database Instance

Data Buffer (Buffer pool)

DBMS

Listener / Server

Transaction Manager

SQL Engine (parser)

Security Manager

Query Optimizer

Concurrency Manager

(Lock Manager)

Recovery Manager

Relational Engine

Memory Manager

Control Buffers

Table pages

and

index pages

  • Connections
  • Transaction queueing
  • Locking List
  • etc

x

LRU

Checkpoint:

Log Buffer

x

read

write

before image / after image

Commit/Rollback:

write

Data file

Data file

File Manager

Disk Manager

Transaction

Log files

Helia / Martti Laiho, 1998-2003

processing a transaction
Processing a Transaction

(Rollback

Segments -

Oracle only)

User process:

Data buffer

Redo log buffer

after images

before images

Insert into table

Update table

Delete from table

Select ..

Commit / Rollback

undo

undo data

undo data

?

undo /redo data

undo / redo data

undo / redo data

commit / rollback

On Rollback

LGWR

OK ?

continue

Redo log files

marking checkpoint into transaction log
Marking Checkpoint into Transaction Log

tc

time

Begin

Commit

T1

T2

T3

T4

T5

Begin

Rollback

Begin

Begin

Commit

Begin

Write Checkpoint

record into the log

of the current

transactions

Write all after images

Into the database

Helia / Martti Laiho, 1998-2005

a soft crash
A Soft Crash

tf

tc

time

Commit

T1

T2

T3

T4

T5

Rollback

Commit

Checkpoint

record

System

Failure

“Soft Crash”

Helia / Martti Laiho, 1998-2005

rollback recovery using transaction log
Rollback recovery using transaction log

tf

tc

2. Find the last checkpoint record

time

Commit

T1

T2

T3

T4

T5

Rollback

Commit

Checkpoint

record

1. Start up

3. Add transactions

on undo list

From checkpoint

record

Rollback Recovery:

Undo list: T1, T2, T3 , T4, T5

Redo list: -

From the log after the checkpoint

Helia / Martti Laiho, 1998-2005

rollback recovery using transaction log1
Rollback recovery using transaction log

tf

tc

time

Commit

T1

T2

T3

T4

T5

Rollback

Commit

Checkpoint

record

Rollback Recovery

Undo list: T1, T2, T3, T4, T5

Redo list: T1, T4

4. Move committed transactions

to Redo list

3

Helia / Martti Laiho, 1998-2005

rollback recovery using transaction log2
Rollback recovery using transaction log

tc

tf

time

Commit

T1

T2

T3

T4

T5

redo

Rollback

undo

undo

Commit

redo

undo

Checkpoint

record

5. Rollback transactions of the Undo list

- writing the before images into the database

Redo transactions of the Redo list

- writing the after images into the database

6. Open the DBMS service to applications

5

Rollback Recovery

Undo list: T1, T2, T3, T4, T5

Redo list: T1, T4

Helia / Martti Laiho, 1998-2005