Restoring database
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 7 of 7

Thread: Restoring database

  1. #1
    Join Date
    Jan 2001
    Posts
    138

    Restoring database

    When restoring database from a cold backup, do we need to restore redo logs in addition to the datafiles?

    Our Dev database wouldn't open due to corrupted redo log after a server crash. We are restoring from the weekend's cold backup. Do we need to restore the redo logs as well to bring up the database in consistent mode?

  2. #2
    Join Date
    Feb 2000
    Location
    Washington DC
    Posts
    1,843
    You can open db with reset logs option which lets you bypass logs recovery, Unless you need tansactions that are part of online logs.
    Reddy,Sam

  3. #3
    Join Date
    Aug 2002
    Location
    Bangalore, India
    Posts
    405
    Originally posted by sreddy
    You can open db with reset logs option which lets you bypass logs recovery, Unless you need tansactions that are part of online logs.
    In case clean shutdown, all the transactions in the online redo logs are flushed to datafiles.
    -nagarjuna

  4. #4
    Join Date
    May 2002
    Location
    California, USA
    Posts
    175

    Re: Restoring database

    Originally posted by pcotten
    When restoring database from a cold backup, do we need to restore redo logs in addition to the datafiles?

    Our Dev database wouldn't open due to corrupted redo log after a server crash. We are restoring from the weekend's cold backup. Do we need to restore the redo logs as well to bring up the database in consistent mode?
    Since you are restoring from a cold backup set, then you have to restore all the files from the backup set, including the redo logs. You cannot use your current redo logs - first they are corrupted as you said, and second they have SCN much advanced than the datafile headers SNC in the cold backup set control files.

    Cold backup - takes all Oracle files and restores all of then as well. Simple rule to remember.


    HTH,

    clio_usa - OCP 8/8i/9i DBA

  5. #5
    Join Date
    Apr 2002
    Location
    France
    Posts
    118

    Re: Re: Restoring database

    You do not needto restore your redo logs ( though that won't hurt if you restore them).

    If your backup was done properly - I mean following an immediate or normal shutdown - then just run the following commands and Oracle will recreate the redologs :
    alter database recover database until cancel;
    Cancel;
    alter database open resetlogs;

    ( as said by Nagarjuna, all the transactions in the online redo logs are flushed to datafiles, so they can be recreated empty )
    If there is no solution, it is because there is no problem - Shadok -

  6. #6
    Join Date
    Feb 2003
    Posts
    40
    "Since you are restoring from a cold backup set, then you have to restore all the files from the backup set, including the redo logs
    .....
    Cold backup - takes all Oracle files and restores all of then as well. Simple rule to remember."



    Why so ? It all depends on whether database is in archivelog/noarchivelog mode
    isn't it ?
    K.Chithra
    Oracle DBA

  7. #7
    Join Date
    Aug 2002
    Location
    Atlanta
    Posts
    1,187

    Re: Re: Restoring database

    Originally posted by clio_usa
    Since you are restoring from a cold backup set, then you have to restore all the files from the backup set, including the redo logs. You cannot use your current redo logs - first they are corrupted as you said, and second they have SCN much advanced than the datafile headers SNC in the cold backup set control files.

    Cold backup - takes all Oracle files and restores all of then as well. Simple rule to remember.


    HTH,

    clio_usa - OCP 8/8i/9i DBA
    Ah like a breath of fresh air to start the morning with so many best practices being beat to a pulp like a developer pinata.

    Another RTFM to the rescue!
    http://download-west.oracle.com/docs...gy.htm#1004641

    Avoiding the Backup of Online Redo Logs
    Although it may seem that you should back up online redo logs along with the datafiles and control file, this technique is dangerous. You should not back up online redo logs for the following reasons:

    The best method for protecting the online logs against media failure is by multiplexing them, that is, having multiple log members in each group, on different disks and disk controllers.
    If your database is in ARCHIVELOG mode, then the archiver is already archiving the filled redo logs.
    If your database is in NOARCHIVELOG mode, then the only type of backups that you should perform are closed, consistent, whole database backups. The files in this type of backup are all consistent and do not need recovery, so the online logs are not needed.
    You may accidentally restore backups of online redo logs while not intending to, thereby corrupting the database.
    A number of situations are possible in which restoring the online logs cause significant problems to the database. The following sections describe scenarios that illustrate how restoring backed up online logs severely compromises recovery.
    I'm stmontgo and I approve of this message

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