11 Replies Latest reply: Dec 26, 2012 8:56 AM by Vidhya.V RSS

    i have configured Full database recovery through RMAN

    Vidhya.V
      Hi,

      My oracle database is in 9i and i have scheduled a RMAN backup through BACKUP DATABASE command. Also, i have configured control file autobackup.

      To recover a complete database, i have tried the fowwing commands.

      restore controlfile from '/opt/backup/RMAN/rbackup/c-202863538-20121218-03';
      alter database mount;
      restore database;
      recover database;

      But recover database is failing. Please suggest.

      I have given control file restore initially, so that i could mount the database and then start with the restore.


      Please guide me in restoring the full database.

      Thanks!
        • 1. Re: i have configured Full database recovery through RMAN
          Niket Kumar
          any error you are getting during this?
          • 2. Re: i have configured Full database recovery through RMAN
            Vidhya.V
            RMAN> recover databse;

            archive log thread=1 sequence=33
            RMAN-00571: ===========================================================
            RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
            RMAN-00571: ===========================================================
            RMAN-03002: failure of recover command at 04/08/2010 14:45:21
            RMAN-06054: media recovery requesting unknown log: thread 1 seq 33 lowscn


            This is the error i am getting.

            Restore is successful. But recovery is failing.
            • 3. Re: i have configured Full database recovery through RMAN
              Pinela
              hi,

              you are missing the archivelogs backup if you are doing a hot backup.
              RMAN> backup database plus archivelog;
              http://docs.oracle.com/cd/B19306_01/backup.102/b14192/bkup003.htm

              IF you ran a cold backup, you can just open resetlogs.
              SQL> alter database open resetlogs;
              br,
              pinela.
              • 4. Re: i have configured Full database recovery through RMAN
                Vidhya.V
                Hi Pinela,

                This is the command that i am using to do a backup of my database which is in archive log mode.

                SHUTDOWN;
                STARTUP MOUNT;
                BACKUP DATABASE;
                ALTER DATABASE OPEN;
                exit

                So, please let me know if i need to change the steps as

                SHUTDOWN;
                STARTUP MOUNT;
                BACKUP DATABASE PLUS ARCHIVELOG;
                ALTER DATABASE OPEN RESETLOGS;
                exit;

                Also, kindly let me know if i need to change default configurations and will this support in oracle9i.

                Thanks a lot for your support !!!
                • 5. Re: i have configured Full database recovery through RMAN
                  Pinela
                  hi vidhya,

                  since your database is in archivelog mode, you need to apply the generated archives during the backup process.
                  so you need to back them up, so they can be recognized and used in the recover process.
                  so you need to add the "plus archivelog" to your "backup database" command in the BACKUP script.

                  in this case, if you are not changing the DB name, and you are doing a hot backup, you don't need the open resetlogs.
                  after the recover process, passes the SCN of the end of the backup, the db will open.

                  in short, the backup script should be:
                  SHUTDOWN;
                  STARTUP MOUNT;
                  BACKUP DATABASE PLUS ARCHIVELOG;
                  exit;
                  your restore script is ok.

                  in 9i, this should work, if the server is the same (meaning that the CF knows where the backuppieces are).
                  http://docs.oracle.com/cd/B10501_01/server.920/a96566/rcmbackp.htm

                  br,
                  pinela.

                  p.s. - if you found my comments helpful/correct,
                  please mark them accordingly. thanks

                  Edited by: Pinela on Dec 20, 2012 1:15 PM
                  • 6. Re: i have configured Full database recovery through RMAN
                    Niket Kumar
                    if you data is not important...

                    sql>startup mount;
                    sql>alter database open resetlogs;

                    your database will open.

                    and take backup using rman:
                    rman>backup database plus archivelog all;
                    • 7. Re: i have configured Full database recovery through RMAN
                      Vidhya.V
                      Hi,

                      Let me try to backup the database by using backup database plus archivelog and update you.

                      Thanks!
                      • 8. Re: i have configured Full database recovery through RMAN
                        Vidhya.V
                        Hi,

                        i am getting the below error if i give BACKUP DATABASE PLUS ARCHIVELOG through RMAN Prompt. Please suggest

                        RMAN> BACKUP DATABASE PLUS ARCHIVELOG;


                        Starting backup at 26-DEC-12
                        allocated channel: ORA_DISK_1
                        channel ORA_DISK_1: sid=16 devtype=DISK
                        RMAN-00571: ===========================================================
                        RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
                        RMAN-00571: ===========================================================
                        RMAN-03002: failure of backup command at 12/26/2012 11:20:46
                        RMAN-06059: expected archived log not found, lost of archived log compromises recoverability
                        ORA-19625: error identifying file /opt/app/oracle/oradata/archive/TECHDATA/arch_24565.arc
                        ORA-27037: unable to obtain file status
                        Linux Error: 2: No such file or directory
                        Additional information: 3

                        Kindly let me know if i nedd to make changes in the default configuration. Currently my configuration is

                        RMAN> show all;

                        RMAN configuration parameters are:
                        CONFIGURE RETENTION POLICY TO REDUNDANCY 2;
                        CONFIGURE BACKUP OPTIMIZATION OFF; # default
                        CONFIGURE DEFAULT DEVICE TYPE TO DISK;
                        CONFIGURE CONTROLFILE AUTOBACKUP ON;
                        CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/opt/backup/RMAN/rbackup/%F';
                        CONFIGURE DEVICE TYPE DISK PARALLELISM 1; # default
                        CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
                        CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
                        CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/opt/backup/RMAN/rbackup/%d_%T_%s_%p' MAXPIECESIZE 4 G;
                        RMAN configuration has no stored or default parameters
                        CONFIGURE MAXSETSIZE TO UNLIMITED; # default
                        CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/opt/app/oracle/product/9.2.0/dbs/snapcf_TECHDATA.f'; # default

                        Please help me in recovering the entire database.

                        Thanks!!
                        • 9. Re: i have configured Full database recovery through RMAN
                          Shivananda Rao
                          ORA-19625: error identifying file /opt/app/oracle/oradata/archive/TECHDATA/arch_24565.arc
                          ORA-27037: unable to obtain file status
                          Linux Error: 2: No such file or directory
                          Additional information: 3
                          The following archive log sequence 24565 is unavailable for RMAN to backup. Uncatalog the archive log sequence and backup the full database.
                          RMAN>change archivelog sequence 24565 uncatalog;
                          Regards,
                          Shivananda
                          • 10. Re: i have configured Full database recovery through RMAN
                            EdStevens
                            Vidhya.V wrote:
                            Hi,

                            i am getting the below error if i give BACKUP DATABASE PLUS ARCHIVELOG through RMAN Prompt. Please suggest

                            RMAN> BACKUP DATABASE PLUS ARCHIVELOG;


                            Starting backup at 26-DEC-12
                            allocated channel: ORA_DISK_1
                            channel ORA_DISK_1: sid=16 devtype=DISK
                            RMAN-00571: ===========================================================
                            RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
                            RMAN-00571: ===========================================================
                            RMAN-03002: failure of backup command at 12/26/2012 11:20:46
                            RMAN-06059: expected archived log not found, lost of archived log compromises recoverability
                            ORA-19625: error identifying file /opt/app/oracle/oradata/archive/TECHDATA/arch_24565.arc
                            ORA-27037: unable to obtain file status
                            Linux Error: 2: No such file or directory
                            Additional information: 3
                            Looks like the expected archivelog has gone missing. I suspect you've been doing housekeeping outside of rman. If the requested archivelog (/opt/app/oracle/oradata/archive/TECHDATA/arch_24565.arc) was backed up at the OS level, you could restore it from that backup, then repeat your rman backup. But if that is the case, I also suspect there is a boat-load of other archives that would need to be restored. The only other way around would be to write-off those archives, accept the fact that you have a period of time for which you cannot recover your database, and start fresh. First thing you'd need to do in that case is to CROSSCHECK your archivelogs, then DELETE EXPIRED. Then immediately take a full Inc 0 backup plus archivelogs. then you need to review your entire backup methodology. You should be using rman to back up both the database and archivelogs. You should be using rman to delete archivelogs once they are backed up. You should be using rman to crosscheck for missing backups and archivelogs - and investigate why they went missing. You should use rman to delete any expired backups or archivelogs (expired means the crosscheck found they had gone missing). You should use rman to delete obsolete backups. In short, you should use rman for all backup and recovery management operations. Any time you try to do things outside of rman, then rman has no way of knowing what you've done and is unable to do its job properly.
                            Kindly let me know if i nedd to make changes in the default configuration. Currently my configuration is

                            RMAN> show all;

                            RMAN configuration parameters are:
                            CONFIGURE RETENTION POLICY TO REDUNDANCY 2;
                            I'd review the retention policy to make sure you can meet your requirements.
                            CONFIGURE BACKUP OPTIMIZATION OFF; # default
                            I'd turn optimization on.
                            CONFIGURE DEFAULT DEVICE TYPE TO DISK;
                            CONFIGURE CONTROLFILE AUTOBACKUP ON;
                            CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/opt/backup/RMAN/rbackup/%F';
                            CONFIGURE DEVICE TYPE DISK PARALLELISM 1; # default
                            CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
                            CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
                            CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/opt/backup/RMAN/rbackup/%d_%T_%s_%p' MAXPIECESIZE 4 G;
                            RMAN configuration has no stored or default parameters
                            CONFIGURE MAXSETSIZE TO UNLIMITED; # default
                            CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/opt/app/oracle/product/9.2.0/dbs/snapcf_TECHDATA.f'; # default

                            Please help me in recovering the entire database.

                            Thanks!!