This discussion is archived
1 2 Previous Next 18 Replies Latest reply: Sep 27, 2011 3:15 PM by jgarry RSS

how to restore cold backup and how to apply archive files

827207 Newbie
Currently Being Moderated
Hi,

I am having cold backup of the database and the archive log files of it.

Now, i have to restore this backup and archive log in another server.

Please provide me the steps to restore this backup and archive log from the Cold backup. It is 9i database server and window server.


Thanks in advance...

Mariappan
  • 1. Re: how to restore cold backup and how to apply archive files
    Fran Guru
    Currently Being Moderated
    Basically:
    -Restore all datafiles, controlfiles and archivelogs to expected locations.
    -startup mount
    -recover database using backup controlfile until cancel;
    -Apply your redologs and then CANCEL
    -alter database open resetlogs;
    -shutdown immediate;
    -startup

    More information:
    Restoring a cold backup of an ARCHIVELOG mode database [ID 1078917.1]

    Edited by: Fran on 26-sep-2011 9:14
  • 2. Re: how to restore cold backup and how to apply archive files
    Balazs Papp Expert
    Currently Being Moderated
    1. create pfile/spfile
    2. startup nomount
    3. RMAN: restore controlfile from '/backup/controlfilebackuppiece';
    4. alter database mount
    5. RMAN: catalog start with '/your/backup/location';
    6. RMAN: restore database;
    7. RMAN: recover database;
    8. alter database open resetlogs;
  • 3. Re: how to restore cold backup and how to apply archive files
    jgarry Guru
    Currently Being Moderated
    Please go to tahiti.oracle.com and select your version. Search for the word "restore." There you will find both all the options and examples.

    There are so many options it is difficult to know what you want to do. You need to understand how the software works. If you use rman, it is very simple, but you haven't told us which version of Oracle you are using exactly (9.2.0.5 is a version, 9i isn't), what commands you used to back up, and so on.

    And it all begs the question, if you are recovering with archived logs, why aren't you using hot backups?
  • 4. Re: how to restore cold backup and how to apply archive files
    827207 Newbie
    Currently Being Moderated
    Hi jgarry,

    My oracle version is 9.2.0.1. And no RMAN is used in my scenario.

    we didn't used any command to backup. We just have the files of datafile, pfile,control file and redo log file, listener.ora, tns.ora and the archive log file.

    So, how i can restore and recover this database to new server.

    This is first time i am doing this activity, So please give me clear step how to do it.
  • 5. Re: how to restore cold backup and how to apply archive files
    vk82 Explorer
    Currently Being Moderated
    1) Install the Software without creating starter database
    2) Modify pfile that point to location of all datafiles,control files and archive logs whose backup you have
    3) startup database in nomount mode with the pfile
    4) create spfile from pfile
    5) create database with the creation script
    6) make database mount
    7) recover database using backup controlfile until cancel;
    8) Apply your redologs and then CANCEL
    9) alter database open resetlogs;
    10) shutdown immediate;
    11) startup


    Regards,

    Vikas Kohli
  • 6. Re: how to restore cold backup and how to apply archive files
    827207 Newbie
    Currently Being Moderated
    Hi,

    Is the below step is correct, if anything is wrong please correct it:-

    RESTORE of DATABASE:-

    Copy the database files to the destination server.

    1)Edit the init.ora file to the actually location.
    2)Set oracle_sid= sidname
    3)Sqlplus /NOLOG
    4)Startup nomount pfile=’path of the inti.ora’.
    5)Take control file backup by “alter database backup controlfile to trace; “(Check udump directory for text based controlfile.)
    6)Open control file backup from udump file in text editor. And edit it.
    Copy the contained of the controlfile and paste it in CMD.
    Now new control files get created.
    7)Alter database open resetlog

    Now you have restored the database. Below are the steps to recovery it.

    8)Shutdown your Database
    9)Startup mount
    10)“Recover database” and select auto from the option.
    It will apply the archive log automatically.

    Please reply....
  • 7. Re: how to restore cold backup and how to apply archive files
    839439 Pro
    Currently Being Moderated
    Mariappan wrote:
    Hi,

    Is the below step is correct, if anything is wrong please correct it:-

    RESTORE of DATABASE:-

    Copy the database files to the destination server.

    1)Edit the init.ora file to the actually location.
    2)Set oracle_sid= sidname
    3)Sqlplus /NOLOG
    4)Startup nomount pfile=’path of the inti.ora’.
    5)Take control file backup by “alter database backup controlfile to trace; “(Check udump directory for text based controlfile.)
    6)Open control file backup from udump file in text editor. And edit it.
    Copy the contained of the controlfile and paste it in CMD.
    Now new control files get created.
    7)Alter database open resetlog
    Once you have open the database then why you are going for recovery process. There is no need of recovery .Now your database will work fine now.

    perform the above process let me know :)

    --neeraj                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
  • 8. Re: how to restore cold backup and how to apply archive files
    Think_dba Journeyer
    Currently Being Moderated
    Mariappan wrote:
    Hi,

    I am having cold backup of the database and the archive log files of it.

    Now, i have to restore this backup and archive log in another server.

    Please provide me the steps to restore this backup and archive log from the Cold backup. It is 9i database server and window server.


    Thanks in advance...

    Mariappan
    Yes, there is no need of recovery once u r done with cold backup.

    -vishwanath
  • 9. Re: how to restore cold backup and how to apply archive files
    827207 Newbie
    Currently Being Moderated
    Cold backup taken 2 days back.
    for that i have to apply the archive log file to bring the database till date.
  • 10. Re: how to restore cold backup and how to apply archive files
    839439 Pro
    Currently Being Moderated
    Mariappan wrote:
    Cold backup taken 2 days back.
    for that i have to apply the archive log file to bring the database till date.
    Here archivelog related info is not stored in the control file. Secondly you have already specify the resetlogs option which is used after the incomplete recovery. Once you specify the resetlogs ,you have advanced the incarnation value . So no need of any recovery and go through the oracle manual for more details .

    Let me know if you have nay doubt.


    --neeraj                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
  • 11. Re: how to restore cold backup and how to apply archive files
    827207 Newbie
    Currently Being Moderated
    Thanks Neeraj,

    But i am still confused, this is first time for me as i said previously.

    Can you please edit my steps give below and give me the correct step by step. So i can follow in my new database server.


    RESTORE of DATABASE:-

    Copy the database files to the destination server.

    1)Edit the init.ora file to the actually location.
    2)Set oracle_sid= sidname
    3)Sqlplus /NOLOG
    4)Startup nomount pfile=’path of the inti.ora’.
    5)Take control file backup by “alter database backup controlfile to trace; “(Check udump directory for text based controlfile.)
    6)Open control file backup from udump file in text editor. And edit it.
    Copy the contained of the controlfile and paste it in CMD.
    Now new control files get created.
    7)Alter database open resetlog

    Now you have restored the database. Below are the steps to recovery it.

    8)Shutdown your Database
    9)Startup mount
    10)“Recover database” and select auto from the option.
    It will apply the archive log automatically.

    Awaiting for you reply.....
  • 12. Re: how to restore cold backup and how to apply archive files
    839439 Pro
    Currently Being Moderated
    RESTORE of DATABASE:-
    Copy the database files to the destination server.

    1)Edit the init.ora file to the actually location.
    2)Set oracle_sid= sidname
    3)Sqlplus /NOLOG
    4)Startup nomount pfile=’path of the inti.ora’.
    5)Take control file backup by “alter database backup controlfile to trace; “(Check udump directory for text based controlfile.) ---->> from production database

    6)Open control file backup from udump file in text editor. And edit it. Copy the contained of the controlfile and paste it in CMD. Now new control files get created.

    7)Alter database open resetlogs

    Now your database will work fine. The below click will help you

    http://neeraj-dba.blogspot.com/2011/05/cold-clonning-using-controlfile-backup.html
    http://neeraj-dba.blogspot.com/2011/04/create-control-file-manually-when-and.html


    Hope this help you :)


    --neeraj                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
  • 13. Re: how to restore cold backup and how to apply archive files
    Hemant K Chitale Oracle ACE
    Currently Being Moderated
    Cold backup taken 2 days back.
    for that i have to apply the archive log file to bring the database till date.
    As Fran has advised you earlier, you must use
    RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL;
    The "Using Backup Controlfile" indicates to Oracle that there are potentially ArchiveLogs (which are not recorded in the controlfile) that have to be applied. The Recovery will generate an expected file name, based on log_archive_dest and log_archive_format, and prompt you for confirmation. If the file name is correct, you can confirm it, else enter the name of the first ArchiveLog that was generated after the Cold backup. After having applied this ArchiveLog, Oracle will prompt you to confirm the next ArchiveLog file name. It will continue prompting you (you can set AUTORECOVERY if you know that all the ArchiveLogs are of the expected filenames) until it comes to a point in time when the next "expected" ArchiveLog is not available. This is the point where you have applied the last available ArchiveLog.
    You will then CANCEL the recovery (the filename prompt allows you to enter "CANCEL") if you have used interactive prompts without AUTORECOVERY.

    If all the datafiles have been recovered to a consistent point in time, Oracle will return a message like "media recovery complete". If they are not yet consistent you will get a warning that some datafiles still need recovery.
    Assuming that your cold backup was a proper COLD Backup, and the ArchiveLogs are in the right sequence, you will have a consistent recovery.

    You will then have to
    ALTER DATABASE OPEN RESETLOGS;
    at which point Oracle will overwrite and/or create the Online Redo Logs and reset the Log Sequence to 1 (and create a new database incarnation).


    Note : If you restore the controlfile from a backup , you do NOT need to CREATE CONTROLFILE. There are risks if you make mistakes in manually running a CREATE CONTROLFILE.


    Hemant K Chitale
  • 14. Re: how to restore cold backup and how to apply archive files
    827207 Newbie
    Currently Being Moderated
    So hemant,

    You mean to say, no need to create the control file in new database server.

    I can use the old Control file in new database server. If yes, then please let me know the step to use the old control file in new DB server.

    Thanks in advance....
1 2 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points