2 Replies Latest reply: Jul 3, 2014 11:12 AM by L-MachineGun RSS

    Rman restore spfile

      Hi all,

       

      11.2.0.3

       

      I am testing disaster recovery restoring backups to another server. I backup my database and copy all files  FRA/backupset, autobackup, archivelog to DR server

      The do the recovery.

       

      I found this script but, it is in 10g and get error on 11g:

       

      run

      {

         startup nomount;

         restore spfile from '/backup/SSSDB/o1_mf_s_849845148_9sd4wwjg_.bkp';

         startup force nomount;

         restore controlfile from '/backup/SSSDB/o1_mf_s_849845148_9sd4wwjg_.bkp';

         startup force mount;

         sql 'alter system set encryption wallet open identified by "wallet123"';

         catalog start with '/backup/SSSDB';

         restore database;

         recover database;

      }

       

      RMAN-06564: must use the TO clause when the instance is started with SPFILE

       

      This one works in 10g, I can not understand why 11g is getting dumber?

       

      The docs said I will use something like > RESTORE SPFILE TO ‘/tmp/spfileTEMP.ora’ FROM AUTOBACKUP;

      Why do I need to restore it to a temp folder when it is easier to use the default it to $ORACLE_HOME/dbs?

       

      Can you help me the counterpart in 11g please?

       

      Thanks,

      pK;

        • 1. Re: Rman restore spfile
          L-MachineGun

          RMAN-06564: must use the TO clause when the instance is started with SPFILE

           

          You need to recover the spfile to another location, see the above reason.

           

          • 2. Re: Rman restore spfile
            Levi Pereira

            In disaster recovery testing SPFILE must not exists.

            In your case the SPFILE already exists under $ORACLE_HOME/dbs and you used it to start the Database.

            Then you are trying to replace a SPFILE in use.

             

            Solution:

            Remove SPFILE under $ORACLE_HOME/dbs

             

            run

            {

               startup force nomount;

               restore spfile from '/backup/SSSDB/o1_mf_s_849845148_9sd4wwjg_.bkp';

               shutdown immediate;

               startup nomount;

               restore controlfile from '/backup/SSSDB/o1_mf_s_849845148_9sd4wwjg_.bkp';

               startup mount;

               .

               .

               .

            }