Restore Don’t Need DBID If You Use A Tag

The last day a coworker asked me to take a look at a rman script that I had to launch to start recovering a database. He specified the DBID and a TAG to restore the control file. Since the database is not mounted and we are recovering from a backup catalog, at some point we have to tell RMAN which database we want to recover (this catalog has hundreds of databases). Usually the “set dbid” clause is used to tell you which database we are interested in. But he previously made a backup of the database using the TAG clause in the backup database. In this case if you use the TAG you will not have to specify the BDID, since Oracle associates it with said tag.

The script would be as follows

 

connect target /
connect rcvcat backup/xxxxx@catalog;

#### set dbid 325364398  -- Don't neccesary

spool log to '/exp/home/ora12c/util/LOG/restore_cf.log';

run {

         allocate channel t1 type 'SBT_TAPE' MAXPIECESIZE 700G
         parms 'ENV=(NSR_DATA_VOLUME_POOL=Prod_Pool,
                                     NSR_CLIENT=bckcli.domain.one,
                                     NSR_SERVER=bckser.domain.one)';

         restore controlfile from tag backup_migra12c_v2_290617 ;

}

HTH – Antonio NAVARRO

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s