5 Replies Latest reply: Jan 29, 2013 8:06 PM by Hemant K Chitale RSS

    restore database with backup

    Bolaji80
      Hi gurus,

      Please I need to restore a dev database back to an original state it was before changes were made on it. I am using the command below but I don't know if it is fine. Here are the details:

      I took backup of the DB before changes were made;
      11gR1 Standard edition (no flashback);
      DB is in noarchive mode
      Linux 5.8

      I am assuming I just need to issue this command:

      rman target /
      RMAN> run {
      shutdown immediate;
      Startup mount;
      restore database to 21-JAN-13;
      alter database open;
      }

      Thanks.
        • 1. Re: restore database with backup
          Aman....
          Bolaji80 wrote:
          Hi gurus,

          Please I need to restore a dev database back to an original state it was before changes were made on it. I am using the command below but I don't know if it is fine. Here are the details:

          I took backup of the DB before changes were made;
          11gR1 Standard edition (no flashback);
          DB is in noarchive mode
          Linux 5.8

          I am assuming I just need to issue this command:

          rman target /
          RMAN> run {
          shutdown immediate;
          Startup mount;
          restore database to 21-JAN-13;
          alter database open;
          }
          Db is in noarchive log mode and do you have a consistent backup to work with?

          Aman....
          • 2. Re: restore database with backup
            moreajays
            Hi,

            How was the backup taken ? was it offline copy since db is in no-archivelog mode ?


            Thanks,
            Ajay More
            http://www.moreajays.com
            • 3. Re: restore database with backup
              Bolaji80
              Yes, I have a consistent backup and I also have the SCN number just in case. I just want to be sure of the command.
              • 4. Re: restore database with backup
                moreajays
                Hi,

                If you are sure you have consistent backup then refer below showing rman backup / restore example
                You need to cleanup existing data/control/temp/redo/undo files before starting restoration

                http://www.moreajays.com/2013/01/rman-backup-restoration-example.html

                Thanks,
                Ajay More
                http://www.moreajays.com
                • 5. Re: restore database with backup
                  Hemant K Chitale
                  You would first restore the controlfile from the consistent backup. {backup your current controlfiles using OS commands for safety}
                  RESTORE CONTROLFILE FROM '..location..';
                  Then you would restore the database
                  RESTORE DATABASE;
                  You would need to OPEN RESETLOGS because the backup doesn't include Online Redo Logs and these need to be recreated (overwriting the updated Online Redo Logs)



                  Hemant K Chitale