Chapter 11. Administering SQL Remote for AdaptiveSer ver
Anywhere
Example Thisexample illustrates recovery using a mirrored transaction log.
Supposeyou have a consolidated database file named
consol.db
ina
directory
c:\dbdir
,and a transaction log file
c:\logdir\consol.log
whichis
mirroredto
d:\mirdir\consol.mlg
.
Torecover from media failure on the C drive
1. Backup the mirrored transaction log
d:\mirdir\consol.mlg
.
2. Replace the failed hardware and re-install all affected software.
3. Create a temporary directory to perform the recovery in (for example,
c:\recover
)
4. Restore the most recent backup of the database file,
consol.db
,to
c:\recover\consol.db
.
5. Copy the mirror transaction log,
d:\mirdir\consol.mlg
,to the recovery
directorywith a
.log
extension,giving
c:\recover\consol.log
.
6. Start the database using the following command line:
dbeng9 -a C:\RECOVER\CONSOL.DB
7. Shutdown the database server.
8. Backup the recovered database and transaction log from
c:\recover
.
9. Copy the files from
c:\recover
tothe appropriate production directories:
Copy
c:\recover\consol.db
to
c:\dbdir\consol.db
Copy
c:\recover\consol.log
to
c:\dbdir\consol.lOG
,and to
d:\mirdir\consol.mlg
.
10. Restart your system normally.
Recovery with multipletransaction logs
Ifyou have a set of transaction logs, the procedure is different. We assume
previousbackups of the database file have been made and are available, for
exampleon tape.
255