Recovery with a single transaction log

In this case, we assume that there is a single transaction log file, which has existed since the database was created. Also, we assume previous backups of the database file have been made and are available, for example on tape.

To recover the database

1.Make a copy of the database and log file.

2.Restore the database (.db ) file, not the log file, from tape into a temporary directory.

3.Start the database using the existing transaction log and the -aoption, to apply the transactions and bring the database file up to date.

4.Start the database in your normal way. Any new activity will be appended to the current transaction log.

Media failure

X

 

on the

 

 

database file

 

 

Transaction log

Database file

 

(intact)

(corrupt)

Restore

 

￿

backed up

 

database file

 

Transaction log

Old database

 

(intact)

file (intact)

Start

 

Database file

database

 

with

 

transaction

 

log

Transaction log

 

(intact)

(restored)

254

Page 272
Image 272
Sybase DC38133-01-0902-01 manual Recovery with a single transaction log, To recover the database, 254