Hi all:
After you shut down the database cleanly and are ready for the cold backup, do you need to backup online redo log files and archive log files???
Qingbo
Printable View
Hi all:
After you shut down the database cleanly and are ready for the cold backup, do you need to backup online redo log files and archive log files???
Qingbo
Datafiles
Control Files
Log files
Run the follwing query:
select rtrim(name) from v$datafile
union
select rtrim(member) from v$logfile
union
select rtrim(name) from v$controlfile
/
Redo log files and archive files are not needed if you have shutdown the database in normal mode. Those 2 files are normally backed up as safety measure.
[Edited by tamilselvan on 01-17-2001 at 04:27 PM]
you may also want to keep a copy of the Parameter file (initSID.ora) and the password file (if one exists)
- Rajeev
Whether or not backing up online redo logs confuses me. RMAN itself doesn't backup online redo log files at all. However, suppose you have a clean shutdown and a clean cold backup (except redo logs) and now you are about to open your database, you find out that you lost all your redo logs, can you still open your database?
Qingbo
As long as you have all your datafiles and control files from a valid cold backup, you can open your database with the resetlogs if you don't have the log files. However since resetlogs is only valid after a recovery, you have to fake one.
svrmgrl> startup mount
svrmgrl> alter database recover until cancel; -- says statement processed
svrmgrl> alter database recover cancel; -- says recovery hasn't started
svrmgrl> alter database open resetlogs;
As long as it's a valid cold backup, and you don't need any data from online logs or archived logs, you won't lose anything.
You need all the files I mentioned in previous posting if your database is in no archive mode and shutdown properly.
You need archivelog files also, if your database is in archivelog mode,as your database checks for SCN sync when you open the dataabse. If your logs are not in sync you can't open the database in archivelog mode.
In such situations, you open the database resetting the logs and start archiving freshly which gives a begining SCN.
Haha, that brings me another question. Does Oracle automatically archive all your online redo logs when you issue shutdown normal or shutdown immediate?
If it does, then it is never never never necessary to back up online redo log files when you do cold backup.
Qingbo
Shutdown Normal -- ORacle waits for all transactions to finish.
Shutdown Immediate -- Oracle rollsback the current transactions.
So, in any case the database is in sync and Redo logs are not needed (to be backed up)
- Rajeev
No, you could fake it by issuing 'alter system switch logfile' as many times as you have groups (assuming nothing else is going on inside the database), but it doesn't do it automatically.
When you take a cold backup, all the data is commited into the data files and you don't need the data that is in the redo log files. This is why the redo log files aren't NECESSARY for a cold backup, but it's is common practice and easier just to group them with the cold backup.
However if you take a hot backup, and the database crashes sometime after, you need all the information from the archived redo log files associated with the backup, and the current online redo log files to recover fully.