what files need to be included in cold backup?
DBAsupport.com Forums - Powered by vBulletin
Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: what files need to be included in cold backup?

  1. #1
    Join Date
    Jun 2000
    Posts
    55
    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

  2. #2
    Join Date
    Feb 2000
    Location
    Washington DC
    Posts
    1,843

    all files associated with the database

    Datafiles
    Control Files
    Log files


    Run the follwing query:

    <font face=courier>
    select rtrim(name) from v$datafile
    union
    select rtrim(member) from v$logfile
    union
    select rtrim(name) from v$controlfile
    /
    </font>

  3. #3
    Join Date
    May 2000
    Location
    ATLANTA, GA, USA
    Posts
    3,136
    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]

  4. #4
    Join Date
    Oct 2000
    Location
    Dallas:TX:USA
    Posts
    407
    you may also want to keep a copy of the Parameter file (initSID.ora) and the password file (if one exists)

    - Rajeev

  5. #5
    Join Date
    Jun 2000
    Posts
    55

    What does Oracle do when it open the database?

    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

  6. #6
    Join Date
    Jun 2000
    Posts
    417
    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.

  7. #7
    Join Date
    Feb 2000
    Location
    Washington DC
    Posts
    1,843
    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.

  8. #8
    Join Date
    Jun 2000
    Posts
    55

    Does Oracle archive online redo logs when you shut down the database?

    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

  9. #9
    Join Date
    Oct 2000
    Location
    Dallas:TX:USA
    Posts
    407
    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

  10. #10
    Join Date
    Jun 2000
    Posts
    417
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width