Restoring to new server from cold backup
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 10 of 10

Thread: Restoring to new server from cold backup

Hybrid View

  1. #1
    Join Date
    Oct 2006
    Posts
    18

    Thumbs down Restoring to new server from cold backup

    I want to restore database to new oracle server from cold backup . As I understand I need to restore copy of init.ora, control files, redo logs to new server under exactly same stucture as old one. Do I need to copy archived logs too.

  2. #2
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,333
    no

  3. #3
    Join Date
    Oct 2006
    Posts
    18
    may be very dumb question but I am going to ask anyway....
    when database is shutdown,all transactions are written to datafiles then why is it necessary to copy redo log files, aren't data files sufficiant to open database on new server?

  4. #4
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,333
    you dont NEED to, but it asves you havign to recreate them with open resetlogs - its just less typing

  5. #5
    Join Date
    Oct 2006
    Posts
    18
    Thanks. So essentially steps I need to follow are
    1.shutdown database on old server and take copy of init.ora, contolfiles, datafiles and redo log files to new server in the same directory strucure.
    2. On new server set up oracle sid same as old one
    startup instance using copied init.ora file
    3. mount and open database.

  6. #6
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,333
    yep,

    make sure the bdump udump directories exist as well
    have an oratab entry (if you use it) password file etc ..

  7. #7
    Join Date
    Oct 2006
    Posts
    18
    Tried it, When tried to open it by giving
    Alter database open command , it prompted to use restlogs option. so did
    alter database open resetlogs ;
    Got error
    ORA-01194 File1 needs more recovery to be consistent
    ORA-01110 Data File1:'/usr2/oracle/product/10g/oradata/.../system01.dbf'

  8. #8
    Join Date
    May 2005
    Location
    Boracay
    Posts
    681
    thats the most common error u can get if all the files are not in sync,
    maybe u haven't shut it down cleanly. or u can startup mount
    and recover database....and copy the archive logs it asked for you
    Behind The Success And Failure Of A Man Is A Woman

  9. #9
    Join Date
    Nov 2006
    Location
    Sofia
    Posts
    630
    Have you coppied the redo logs as well? If so, try
    alter database open ( without resetlogs)
    If not, try
    Recover database until cancel
    and enter CANCEL immediately when asked
    (if not asked at all do not worry about that)
    When that's finished, go for
    alter database open resetlogs;

    I hope that works ( one never knows with that ;-))

  10. #10
    Join Date
    Feb 2004
    Location
    India
    Posts
    18
    I am writing all the steps required for database cloning.
    Source:



    Use alter system switch logfile;



    This will forcibly do database wide checkpoint ( which is also equivalent to shutdown normal).



    Alter database backup controlfile to trace resetlogs;



    Show parameter user_dump will give you the path where trace(.trc) file of control file is placed.



    The .trc will contain the create controlfile …. Statement

    Scoop out everything from it leaving the create contol file Reuse database ……. Statement

    Copy all the database files (including Init.ora file) (With database as shutdown normal) as mentioned in create controlfile statement from source to target destination.



    Target :

    Install Oracle10g software without creating the sample database.

    Since I used a new database name in the target server modify entries in init.ora like db_name as well as the directory structures as where you will place the control files , redo files and datafiles.



    Modify the .trc file for control file as CREATE CONTROLFILE REUSE SET DATABASE RESETLOGS ARCHIVELOG with all the new directory structures and save the file as ctrl.sql ( could be any name only extn should be .sql).



    Create an instance in target server using oradim utility for eg

    Oradim –new –sid -syspwd -startmode auto –pfile file=’ give the path for init.ora’



    After creating the instance say instance is Test and sys password is oracle log in as



    Sqlplus sys/oracle as sysdba

    SQL> startup nomount

    SQL> @c:\ ctrl.sql

    Control file created.

    SQL> Alter database open resetlogs;



    If any recovery is required use the following

    SQL>Recover Database using backup controlfile;

    apply the online redo log file which were current



    select group#, sequence#, status from V$log;



    GROUP# SEQUENCE# STATUS

    ---------- ---------- ----------------

    1 1 CURRENT <== this redo needs to be applied




    And then

    SQL> Alter database open resetlogs;

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