1 2 3 Previous Next 30 Replies Latest reply on Sep 13, 2013 7:40 PM by TSharma-Oracle

    RMAN  backup Restore to new Host different SID

    628345
      How can we restore RMAN backup taken on Host A with SID=PROD to Host B with SID=TEST. Directory structure is same only different SID.

      I have tried with same SID and directory structure on different Host it works fine.

      Is there any way other than DUPLICATE command.
        • 1. Re: RMAN  backup Restore to new Host different SID
          ebrian
          Set DB_NAME to TEST in the init file for the duplicate. Then, issue your duplicate command as:
          DUPLICATE TARGET DATABASE TO TEST;
          You'll also need to supply the appropriate FILE_NAME_CONVERT, CONFIGURE AUXNAME or SET NEWNAME parameters/commands.
          • 2. Re: RMAN  backup Restore to new Host different SID
            dba-india
            After creating the database with same name on another server you can then change the database sid by recreating the controlfiles through the backup controlfile to trace file.
            • 3. Re: RMAN  backup Restore to new Host different SID
              P.Forstmann
              You can also use the DBNEWID utility to change the db name and/or the db id.
              • 4. Re: RMAN  backup Restore to new Host different SID
                26741
                The SID is not the same as DB_NAME and DBID.
                Oracle doesn't really care what the SID is when you do a restore.

                I presume that you want to change the DB_NAME and DBID.

                You could do a RESTORE (and RECOVER) of the database on the Host B
                and then change the DB_NAME and DBID.
                • 5. Re: RMAN  backup Restore to new Host
                  akrammat
                  I am unable to restore my RMAN Full backup or Zero level backup at new host even with same SID. Can you please send the the restoration steps. Actually when restoration starts it doesn't find the data files. While the same backup is working fine on original host. Please advise.
                  Thanks.
                  • 6. Re: RMAN  backup Restore to new Host
                    521217
                    Have you copied your backup files and archived logs from source host to the target?

                    Follow this doc:
                    http://download-uk.oracle.com/docs/cd/B19306_01/backup.102/b14191/rcmdupdb001.htm#i1008888
                    • 7. Re: RMAN  backup Restore to new Host
                      636706
                      Follow this doc:
                      http://download-uk.oracle.com/docs/cd/B19306_01/backup
                      .102/b14191/rcmdupdb001.htm#i1008888
                      please, i can't understand. i'm quite new to oracle ( i'm using xe, actually ).
                      the doc above needs both the original and an auxiliary database.
                      but what if
                      1) you have one xe, happily running, and doing its backup according to the bundled backup.sh script, daily
                      2) the server explodes, or burns, or is destroied by a mad guy ... pick your choice
                      3) i have the backups in a remote host
                      what now ?

                      how can i install a new server, with a new oracle xe ( same SID, but different dbid ), and force rman to restore my old backup, with the original server gone ?

                      if i issue "catalog recovery area" rman complains about different dbid. i can modify dbid, but i can't set it to a number of my choice.

                      this should be the more easy thing in the world. mysql and postgres do this in one move. in oracle this seems a very tricky and challenging issue.

                      i'm i wrong ? i'm in such trouble just now.
                      do you have some advice ? other than from improve my english :-)

                      TIA

                      ivan
                      • 8. Re: RMAN  backup Restore to new Host
                        26741
                        1. Create a service but not a database.

                        2. STARTUP NOMOUNT with the service

                        3. Restore the controlfile from the backup

                        4. ALTER DATABASE MOUNT

                        5. Restore Database and Recover Database.
                        • 9. Re: RMAN  backup Restore to new Host
                          636706
                          no way, at least in XE :-(

                          however, expdp and impdp do the work in XE
                          i'll use normal backup for normal restoration end expdp dumps for disaster recovery in XE

                          bye
                          • 10. Re: RMAN  backup Restore to new Host
                            sinantopuz
                            Hi,

                            In 8.1.7.4 Standard Edition - Windows Server 2000,

                            Using recovery catalog. I have RMAN backups of the production database including autobackup of the controlfiles and also the latest archivelogs. (Not OS File copies of datafiles, except archivelogs). I would like to restore this database to our test server which has the same directory structure and an already up and running database (with some old data). Using RMAN on this new server and the backups (RMAN backups) from my production server, how would I restore the backups to the test server (has a different host name). How would I tell RMAN on the new server to use backups generated by another server? Can I do this without setting up recovery catalog on the new server, assuming that autocontrolfile backup will be sufficient?

                            I reviewed RMAN manuals, but I could not see this specific case explained anywere. Maybe there is. I would appreciate it if you could point me such documentation or give me some insight on how to achieve this.

                            Thank you,
                            Sinan
                            • 11. Re: RMAN  backup Restore to new Host
                              26741
                              RMAN doesn't care about which host the backup was done on and where the restore
                              is going to. RMAN uses the DBID to identify the database and the DB_NAME
                              to name the database.
                              If your backups are to tape via a media manager (eg NetBackup) and you want
                              to restore from tape directly to database files ondisk, it is NetBackup that should
                              be configured to allow a new host (which is called a "Netbackup Client") to restore
                              backups done by the previous host (another "Netbackup Client").

                              As for Oracle, the steps remain the same as outlined earlier :

                              1. Create a service but not a database.

                              2. STARTUP NOMOUNT with the service

                              3. Restore the controlfile from the backup

                              4. ALTER DATABASE MOUNT

                              5. Restore Database and Recover Database
                              • 12. Re: RMAN  backup Restore to new Host
                                sinantopuz
                                Hemant,

                                My backups are on disk. I copied RMAN backups into a directory on the test server. I start RMAN and set the DBID to the production database's DBID. This is where I get confused, how can I let this RMAN session on the test server know where the RMAN backups of the production database are? How would RMAN know that it should restore the database from those backups? Is it possible to overwrite test db or do I have to either create a new service for prod or drop the test db before restore?

                                As I as I know, RMAN

                                restore database; command will look for backups made by this RMAN session. (I never setup RMAN on the test server, so there is not backup location). Is this what I should do?

                                create the same BACKUP directory structure on the test server. Configure RMAN with this new backup location. Exit RMAN. RMAN with the PROD DBID and startup nomount the test instance and restore?

                                Sorry if it is a little confusing. Than you very much for your time.

                                Sinan
                                • 13. Re: RMAN  backup Restore to new Host
                                  26741
                                  Think about what happens when you do a backup.
                                  Oracle records the location of the backupsets. It preserves this record in
                                  a) the database's controlfile
                                  b) optionally, in the RMAN Repository, if you use a Repository database.

                                  So, when you need to restore a database, what does RMAN need ?
                                  The controlfile ! Therefore, you need to restore the controlfile first.
                                  The syntax is RESTORE CONTROLFILE FROM <locationofthecontrolfilebackup> ;

                                  However, before RMAN does a restore, Oracle needs to connect to an instance.
                                  That is why (only on Windows !) we need to create a service (but not a database)
                                  and start the service.
                                  Once the service is started, we have RMAN connect to the instance and
                                  restore the controlfile.
                                  Once the controlfile is restored, Oracle knows where the database backupsets are.
                                  The information in the controfile tells RMAN "the last (few) database backups
                                  are these files ... in this location (name of backup folder on disk)".
                                  So a simple RESTORE DATABASE works if the backupset has been copied
                                  from the source machine to the target machine into the same folder name.
                                  Oracle doesn't care about the machine name, it cares only about the DBID
                                  and the location.
                                  If you copy the backupset files to a different location, 10g allows you to run the
                                  CATALOG BACKUPSET command as well to "update" the controlfile with the new
                                  location of the backup -- before you do the RESTORE DATABASE.
                                  • 14. Re: RMAN  backup Restore to new Host
                                    sinantopuz
                                    Hemant,

                                    In this case, there is no option other than deleting the existing database, which has the same name and SID with the production database, on the test server? Is there a way of overwriting the existing db on the test server by restoring the production backups on top of it?

                                    Thank you,
                                    Sinan
                                    1 2 3 Previous Next