Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

rman "backup database include current controlfile plus archivelog", how to identify the file contain

user1560826Feb 5 2015 — edited Feb 6 2015

I want to create a "database in a box" type of backup, that is to have a fully usable backup in a directory that I can use to either:

- restore the database in its original place in case of problems

- copy to a different server and restore there for development/testing and so on

I would like to do this in the simplest way and, most importantly, in a script.

The database is in archivelog mode and the backup is taken while it's online.

So, for backup, this command seems to be the shortest, simplest:

backup database include current controlfile plus archivelog;

But for restore I have a problem: how do I know which file in that backup contains the controlfile? They all look the same. I need to restore the controlfile first with

restore controlfile from '/path/to/backup_file';

I determine the file on the machine where I took the backup with

list backup of controlfile;

But how can I do it on the machine where I want to restore? The restore script would look like this:

startup nomount;

restore controlfile from '/path/to/what/file';

alter database mount;

restore database;

recover database;

alter database open resetlogs;

Thanks.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 6 2015
Added on Feb 5 2015
15 comments
5,911 views