2 Replies Latest reply: Aug 6, 2012 3:21 AM by Tareq Alkhateeb RSS

    How to create a consistent backup using RMAN?

    884659
      I have set the database to archivelog without using FRA. I have backed up the database by issuing backup database in RMAN when the database is still online. I have now also issued backup archivelog all. I updated data of a table after I backed up the archive logs.

      I issued the following command in RMAN:

      restore database;
      recover database;

      The recovery was successful but the change I did after the archive logs were backed up is also there. I thought any change after the archive logs were backed up will not be included.

      Does RMAN use online redo logs during restore/recover?

      I want to able to backup/restore a database to the time when I issued backup archivelog all.

      Edited by: 881656 on Jul 30, 2012 7:08 PM
        • 1. Re: How to create a consistent backup using RMAN?
          Hemant K Chitale
          Does RMAN use online redo logs during restore/recover?
          Yes, if it finds them.
          I want to able to backup/restore a database to the time when I issued backup archivelog all
          Specify SET UNTIL SEQUENCE or SET UNTIL TIME before the RECOVER


          Hemant K Chitale
          • 2. Re: How to create a consistent backup using RMAN?
            Tareq Alkhateeb
            Hi my friend,

            restore database: means take the files from backup and put it in their location.
            recover database: means apply all changes from the time of backup until current time using the archivelogs and online redologs (complete recovery).
            that is why you saw the updated data.

            but if you want to not see your updated data you have to use incomplete recovery (before execute the your update statement) using the following commands:
            RMAN> restore database; --- to restore datafile
            RMAN> recover database until time to_timestamp(2012-04-29:11:59:00, 'YYYY-MM-DD:HH24:MI:SS'); -- the time of update statement.
            RMAN> alter database open resetlogs;

            but again my friend be careful when you do that, because it will undo all changes by all users.

            regards,
            Tareq Alkhateeb