Tman,
Also glad to hear that you were able to recover at least
something. Losing just 1 1/2 days of work is obviously better than losing 1 1/2 decades of work.
Now, to the function of ARCHIVELOGging: Ken's suggestions are excellent, as far as they go, but unfortunately, implementing these init<SID>.ora commands offers a
very false sense of security insofar as archiving is concerned. The best they will get you is to be "
automatically not archiving." By that I mean that "log_archive_start = true" turns on the Oracle background process, "ARCH", but that process simply provides "automatic archiving"
if your database is in ARCHIVELOG mode, which, if these parameter changes are all you do,
your database will not be in ARCHIVELOG mode !!!
Additionally, although the link that appears in Ken's post presents interactive alternatives to
some of the init<SID>.ora commands, as with those init<SID>.ora commands,
neither the interactive nor parameter-centric commands turn on ARCHIVELOG mode. And yet another false sense of security is that if you depend upon the interactive commands, none of them are permanent...they have effect, at most, during the life of the current instance, which means that the effects disappear if/when the instance goes down.
Now,
dbtoo's link suggestion,
is excellent and discloses all the features that you need to be in ARCHIVELOG mode, but given the impressions surrounding the init<SID>.ora commands, it is safest to be completely explicit about the commands you need to be in ARCHIVELOG mode:
First, the method to determine your ARCHIVELOG mode and status is to issue this command, either in SQL*Plus for Oracle 9i or Oracle 8i, or in "svrmgrl" if you are running Oracle 8i. If you have implemented, either via init<SID>.ora or interactively, the commands in Ken's post, then the results following the command below is what you would see:
Code:
[b]archive log list[/b]
Database log mode No Archive Mode
Automatic archival Enabled
Archive destination D:\Oracle\Ora92\RDBMS
Oldest online log sequence 217
Current log sequence 219
Notice that "Authomatic archival = Enabled"...thus giving the false sense of security. But, notice further that
"Database log mode = No Archive Mode", thus my earlier statement that you are "automatically NOT archiving". They only thing
running that has anything to do with archiving is the ARCH background process that is ready, willing, and able to automatically archive redo log files when they fill up, but sadly ARCH will never be called upon to archive anything since the database is in "No Archive Mode" !
This situation, is, sadly, the precarious (to devastating) situation of far too many Oracle databases worldwide...The DBA has the false sense of security that her/his database is in ARCHIVELOG mode simply because their parameter file contains the setting, "log_archive_start = true".
Now, on to a complete solution...
the only effective method to place your database into ARCHIVELOG mode is to effect the following commands:
Code:
1) [b]Bring down a running, NOARCHIVELOG database[/b]: shutdown immediate
2) [b]Bring the database up to MOUNT status[/b]: startup mount
3) [b]Issue the command to put the database into ARCHIVELOG mode[/b]: ALTER DATABASE ARCHIVELOG;
The above command, "ALTER DATABASE ARCHIVELOG;" is the key to putting your database into a more risk-free mode...there is no alternative command to do so.
You still should supply the init<SID>.ora commands that Ken recommends, especially "log_archive_start = true". Yes, your database can be in ARCHIVELOG mode and "log_archive_start = false". Such a situation is temporarily workable and it is very dangerous. This scenario means that Oracle will cause your on-line redo log files to switch to the next file in sequence, but Oracle will not be automatically archiving them...you must manually archive your full on-line redo log files with at least one of these commands that appeared in Ken's link:
Code:
alter system archive log all;
alter system archive log next;
If you do not manually enter one of these commands, then Oracle will hang at the point that it must do a log switch, but the on-line redo log file has not yet successfully archived. Again this scenario occurs when your database is in ARCHIVELOG mode, but "log_archive_start = false". If your parameter setting is "log_archive_start = true", then this means the automatically archiving ARCH background process is running to do all of the otherwise-manual work for you.
Another recommendation is that following your putting your database into ARCHIVELOG mode, you do a full, cold backup as soon as it is reasonable, so that you have a baseline, fall-back origin in case you must recover your database in the near future.
A couple of comments to Ken:
1) You are one of my most highly respected and helpful colleagues here on Tek-Tips. By no means do I mean or imply any disrespect by my bringing this issue up. I bring it up because the omission of "ALTER DATABASE ARCHIVELOG;" is such a potentially devastating error, I had to speak very directly.
2) Given the above scenario, I propose that you check the databases that you want to have in ARCHIVELOG mode (using the command "ARCHIVE LOG LIST") to confirm their actual archiving status.
Everyone, please accept this posting with the good wishes and respect with which I intend it. Malice toward none...Glad tidings to all.
Ken, let us know how the ARCHIVELOG assessment goes with your databases (as a possible warning to others, since Oracle spends far too little time and resources and documentation time explaining this nearly univerally misunderstood concept). Tman, let us know how the dust settles with all of this in your shop.
Regards,
Mufasa
(aka Dave of Sandy, Utah, USA)
Do you use Oracle and live or work in Utah, USA?
Then click here to join Utah Oracle Users Group on Tek-Tips.