This content has been marked as final. Show 30 replies
Follow this doc: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 :-)
In 188.8.131.52 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.
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
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.
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.