Archivelog Mode Questions

From: Bill Jonnard <bjonnard_at_ix.netcom.com>
Date: 1996/06/18
Message-ID: <4q5o2t$2ee_at_sjx-ixn5.ix.netcom.com>#1/1


I am attempting to minimize my exposure to possible data loss, and want to enable Archivelog mode. I've followed Oracle's instructions on how to backup/restore a database, but I am encountering a problem that has me baflled. Here's the situation:

I'll shutdown my database, and backup the necessary control files, redo logs, and data files as Oracle describes. I'll then startup the database, and as I run a set of sample transactions, I can see that a number of archive logs are being written. So far, so good.

After 15 or 20 log files have been written, I will then shutdown the database, and attempt to restore my baseline backup and successively apply the archive logs, just as I would do if I had really had a disk crash. Everything works fine, but when I try to apply the archive logs, Oracle will always want one more archive log file than I have.

In other words, if I have accumulated 20 archive logs, Oracle will apply them one by one without any problems, but will always end up asking for file #21. As I stated above, I only had 20 to start with. The maddening result of this is that instead of seeing a "Recovery Successfully completed" type of message, I get an error message telling me that I need one more (nonexistent) archive log file. Does anyone have an idea as to why this is happening and how I can avoid it?

Aside from this issue, I also have a general question related to running a database in Archivelog mode. Specifically, in my system, certain operations that are considered to be a "single transaction" might actually consist of updates to records in 4 different tables, and inserts into 2 others. If archive log "N" is filled by the first 3 updates, then the 4th update and the 2 inserts will have to be written to archive log "N+1". Ordinarily this would not matter, but if my last usable archive log file was "N", meaning that I cannot recovery anything from the "N+1" log, then my data will be out of sync at the end of my restoration effort.

Obviously I can understand that I will lose whatever's in an unusable file, but is there some way to determine which transactions have been stored within an archive file? Oracle mentions that one of the recovery options is to restore up to a certain System Change Number, but I cannot find a way to determine exactly what SQL statement corresponds to a particular System Change Number. Does anyone know? -- Bill, aka bjonnard_at_ix.netcom.com Received on Tue Jun 18 1996 - 00:00:00 CEST

Original text of this message