3 Replies Latest reply: Jul 15, 2014 2:29 AM by Nip-Oracle RSS

    Restore backup of DB X to the same DB server to create DB Y

    Max

      11.2.0.4/Oracle Linux 6.5

      2-Node RAC DB

       

      We have a production DB called SNAMPRD. We have RMAN full backup (LEVEL 0) of this DB from Sunday early morning. We need to create a new DB called CLSNAM (means clone of SNAMPRD ) in the same RAC cluster by restoring and recovering

      from the above mentioned full backup of SNAMPRD. We have created a new diskgroup called CLSNAM_DG to store datafiles for this new DB.

       

      I have 2 questions on this

       

       

      1. Regarding DB_ID and accidental overwrite of production DB's datafiles

       

      The full backup is in Tape (netbackup). I must let RMAN know the DBID of the DB which I want to restore. But , in this case, both the production DB and the clone DB which we want to create are in the same cluster. So, RMAN might overwrite the datafiles of the production DB SNAMPRD during restore. How can I make sure that RMAN will only restore datafiles to the newly created CLSNAM_DG diskgroup ?

       

      $ export NB_ORA_CLIENT=psnam213

      $ rman catalog rman/password@MANHRMAN

       

      RMAN> set dbid=432274545  ----------------> DB_ID of original DB

      RMAN> connect target /

       

       

      RMAN> run {

      ALLOCATE CHANNEL CH00 TYPE 'SBT_TAPE';

      SEND 'NB_ORA_SERV=manh9834, NB_ORA_CLIENT=psnam213';

       

      restore commands go here....

      }

       

       

      2. Control File:

       

      Stage1 of the restore process is to restore the production DB's control file using something like below. But the production DB's control file has DB name as  SNAMPRD. For restoring , I would have started the instance with the name of CLSNAM1. Won't RMAN throw error during Control file restore due to DB_NAME differences ?

       

      set dbid=432274545

      RUN {

      SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT TO 'SNAM_CTRLFILE.%F';

      RESTORE CONTROLFILE FROM AUTOBACKUP;

      }