Tuesday, 14 April 2015

How to identify controlfile backup piece while using NOCATALOG mode

http://letstalkoracle.blogspot.in/2015/03/restore-controlfile-in-nocatalog-mode.html

In the above article I mentioned that you can mention the backup piece name under the backup location path to restore the controlfile in NOCATALOG mode.

So the question is you may have a lot of backup pieces in that location. How do you identify the controlfile backup piece?

Let's consider 2 scenarios.

1. Your controlfile is lost, now you are trying to restore
2. You have just completed a backup of the controlfile and now you want to identify the backup peice corresponding to it.

Now for  scenario 1:

There is only one way. Go to your backup location. Find out the last backup pieces you did according by time and date. You can do this both accessing through PuTTY or GUI.

Now check the size of each piece using du -h piecename command.

The piece that contains the least amount of memory is your controlfile backup piece. Don't worry about getting confused with the spfile backup piece, in case you took a backup of spfile separately, as spfile backup piece will be in KB.

Now for scenario 2:

On the SQL prompt issue this

SQL> select output from v$rman_output;

You will get the backup piece name against your backup command in the output. You can note the name from there.

My  recommendation is to always use a log clause including the log file name while calling RMAN from OS prompt like this

$ rman log logfilename or $ rman log /path/logfilename  then followed by connect target.

If you go the logfile location and view it you will find all the rman outputs in the logfile and you can identify each backup piece.

Hope this helps.

Thanks
Subhajit

No comments:

Post a Comment