2 Replies Latest reply: May 9, 2013 11:22 PM by Mark willium RSS

    Difference between recover database and alter database recover

    user10643795
      Hi,
      Oracle database 11.2

      What is the difference between

      recover database until cancel using backup controlfile;
      and
      alter database recover automatic until cancel;

      1. in user managed and server managed backups. What would be the location of the controlfile which is used in (recover database until cancel using backup controlfile;) .
      2. why user first option and why use second option.

      Thanks.

      Edited by: user10643795 on 08-May-2013 23:21
        • 1. Re: Difference between recover database and alter database recover
          Hemant K Chitale
          The "RECOVER DATABASE ......" commands are SQLPLUS and RMAN commands. These are documented in the SQL*Plus and Recovery Manager documentation.

          The "ALTER DATABASE RECOVER ....." commands are SQL commands. These are documented in the SQL Language Reference.


          The command :
          recover database until cancel using backup controlfile;
          a. is not automatic -- so it prompts for each "next "archivelog unless the DBA enters "AUTO" and continues until the DBA enters "CANCEL", when it stops
          b. uses the controlfile that the initSID.ora or spfileSID.ora points to -- that means that if you really using a backup controlfile you first have to had restored the controlfile from a backup (you might also use this command if you've created the controlfile using the CREATE CONTROLFILE command)

          The command :
          alter database recover automatic until cancel;
          a. is automatic and applies all the archivelogs it finds and halts when it doesn't find an expected "next" archivelog at which point the DBA can manually enter the name
          b. stops when the DBA enters CANCEL


          Hemant K Chitale
          • 2. Re: Difference between recover database and alter database recover
            Mark willium
            In ALTER DATABASE, you have to issue each and every command manually since it is manual process.

            RECOVER DATABASE is a SQLPLUS command and it is an automated process.