1 2 Previous Next 15 Replies Latest reply: Apr 7, 2012 7:30 AM by aLuViAn RSS

    Cannot restore after a backup and database drop

    aLuViAn
      Ive backed up a database using RMAN, then I dropped the database. Now when I want to restore the db in RMAN, when trying to bring up the database, it says that cannot find the init file. I have the whole DB backup, how can I restore it?
        • 1. Re: Cannot restore after a backup and database drop
          Balazs Papp
          when trying to bring up the database, it says that cannot find the init file
          then create one, even an "empty" instance needs a parameter file to start in nomount
          • 2. Re: Cannot restore after a backup and database drop
            Aman....
            aLuViAn wrote:
            Ive backed up a database using RMAN, then I dropped the database. Now when I want to restore the db in RMAN, when trying to bring up the database, it says that cannot find the init file. I have the whole DB backup, how can I restore it?
            http://docs.oracle.com/cd/E11882_01/server.112/e25494/create006.htm#ADMIN11123


            Aman....
            • 3. Re: Cannot restore after a backup and database drop
              aLuViAn
              Can you please tell me the usual procedure to recover the database in such situations?
              • 4. Re: Cannot restore after a backup and database drop
                Aman....
                aLuViAn wrote:
                Can you please tell me the usual procedure to recover the database in such situations?
                http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmadvre.htm#BRADV89840

                Aman....
                • 5. Re: Cannot restore after a backup and database drop
                  aLuViAn
                  Thanks guys for the help, I'm following the instructions but I cant find the DBID to use. Here is the backup filenames, note that the names are generated by rman itself:

                  o1_mf_ncsnf_TAG20120407T164446_7r0cylc8_.bkp
                  o1_mf_nnndf_TAG20120407T164446_7r0cxq5g_.bkp
                  o1_mf_nnndf_TAG20120407T164446_7r0cyj8c_.bkp
                  o1_mf_nnndf_TAG20120407T164446_7r0cymfh_.bkp

                  According to this link, i need the DBID, is that really needed?
                  • 6. Re: Cannot restore after a backup and database drop
                    912595
                    aLuViAn wrote:
                    Ive backed up a database using RMAN, then I dropped the database. Now when I want to restore the db in RMAN, when trying to bring up the database, it says that cannot find the init file. I have the whole DB backup, how can I restore it?
                    If you had spfile when you backuped the database, then oracle automatically backup the spfile also with full backup. So you first need to

                    1) Restore the spfile
                    2) Mount
                    3) restore and recover

                    You might want to do this for restoring spfile.

                    RUN
                    {
                    ALLOCATE CHANNEL c1 DEVICE TYPE sbt;
                    RESTORE SPFILE FROM AUTOBACKUP;
                    }

                    Rest is explained in above doc
                    • 7. Re: Cannot restore after a backup and database drop
                      aLuViAn
                      Yes, but it asks to set the DBID explicitly. How can i find the id? according to oracle documentation, either I should find it when RMAN starts (which obviously, not!) or from the backup filename. Any suggestions?
                      • 8. Re: Cannot restore after a backup and database drop
                        912595
                        aLuViAn wrote:
                        Yes, but it asks to set the DBID explicitly. How can i find the id? according to oracle documentation, either I should find it when RMAN starts (which obviously, not!) or from the backup filename. Any suggestions?
                        Yes DBID is needed if you dont have recovery catalog.
                        Please see
                        http://docs.oracle.com/cd/B19306_01/backup.102/b14192/recov004.htm

                        How to find DBID
                        http://docs.oracle.com/cd/B19306_01/backup.102/b14192/recov003.htm#i1038112
                        Hope tis help
                        • 9. Re: Cannot restore after a backup and database drop
                          aLuViAn
                          my backup files (reside in flash_recovery_area) do not look like the usual format(c-IIIIIIIIII-YYYYMMDD-QQ). Actually, thats my main problem because I cannot find out which number is my DBID, I've put the name of my backup files in my former replies to this post.
                          • 10. Re: Cannot restore after a backup and database drop
                            912595
                            aLuViAn wrote:
                            Thanks guys for the help, I'm following the instructions but I cant find the DBID to use. Here is the backup filenames, note that the names are generated by rman itself:

                            o1_mf_ncsnf_TAG20120407T164446_7r0cylc8_.bkp
                            o1_mf_nnndf_TAG20120407T164446_7r0cxq5g_.bkp
                            o1_mf_nnndf_TAG20120407T164446_7r0cyj8c_.bkp
                            o1_mf_nnndf_TAG20120407T164446_7r0cymfh_.bkp

                            According to this link, i need the DBID, is that really needed?
                            Here is the trick to get the DBID from these backups.

                            $string o1_mf_nnndf_TAG20120407T164446_7r0cymfh_.bkp | grep MAXVALUE
                            You get the dbid and do it from others backup too to confirm the same output. Hpe this helps

                            Also see same thread for DBID - Lost all files & don't know dbid

                            Also if you have alert.log, you can get from this too.
                            • 11. Re: Cannot restore after a backup and database drop
                              aLuViAn
                              Thanks, I found two numbers as DBIDs, however, what I forgot to mention is that its a manual backup, not an AUTOBACKUP. Actually I tried to find the control files inside each backup file (using RESTORE CONTROLFILE FROM 'filename;) but nothing came up!
                              Any ideas?
                              • 12. Re: Cannot restore after a backup and database drop
                                912595
                                aLuViAn wrote:
                                Thanks, I found two numbers as DBIDs, however, what I forgot to mention is that its a manual backup, not an AUTOBACKUP. Actually I tried to find the control files inside each backup file (using RESTORE CONTROLFILE FROM 'filename;) but nothing came up!
                                Any ideas?
                                YOu can use something like

                                RMAN> connect target /
                                RMAN> startup nomount;
                                RMAN> set dbid 2611263161;
                                RMAN> set controlfile autobackup format for device type disk to 'C:\folder\%F'; (provide the path where backup are)
                                RMAN> restore controlfile from autobackup;

                                Or

                                RMAN> connect target /
                                RMAN> startup nomount;
                                RMAN> restore controlfile from 'C:\folder\c-1140771490-20111123-07';

                                The backup of controlfile should be very small , so you have to check the size of these backups and pick up the smallest one, that probaly the controlfile backup.
                                Also see - http://www.bash-dba.com/2011/11/restoring-control-file-scenarios.html
                                • 13. Re: Cannot restore after a backup and database drop
                                  aLuViAn
                                  I can't find it! RMAN says there is no controlfile backup in any of my backup files!!!!!
                                  Am I screwed? I've seen that there is a way to rebuild the control file from alertlog. Anyone have any suggestions over this solution or any other ones that might be useful?
                                  • 14. Re: Cannot restore after a backup and database drop
                                    912595
                                    aLuViAn wrote:
                                    I can't find it! RMAN says there is no controlfile backup in any of my backup files!!!!!
                                    Am I screwed? I've seen that there is a way to rebuild the control file from alertlog. Anyone have any suggestions over this solution or any other ones that might be useful?
                                    I'm not sure if you are putting right dbid or not. Also try without dbid if you get the controlfile.
                                    The controlfile should be there, either in these backups or in FRA (of old database), Did you check your FRA location?

                                    Its just the matter fo spending sometime in searching for controlfile backup.

                                    Also check if you have snapshot controlfile and check in $oracle_home/dbs/* anything there?
                                    I suppose without controlfile you cannot restore your database.

                                    Following blog claims restore can happen if controlfile is not available but i didnt try out.
                                    http://blog.ronnyegner-consulting.de/2010/11/03/how-to-restore-an-rman-backup-without-any-existing-control-files/
                                    Thanks
                                    1 2 Previous Next