Follow by Email

Wednesday, May 21, 2014

Restoring Oracle Archive Logs using RMAN from Tapes

I got a request from my client asking to restore Archivelogs of  particular sequence. let me brief you all our Oracle using ASM and our backup software is Netbackup.

Generally you can restore archive logs from the OS backup by starting the BAR utility from Netbackup MASTER SERVER but in my case these are ASM files so it cannot be seen from the OS backups so have to invoke the BAR from the CLIENT but i faced an error when i tried to list the files in BAR " Library Binaries Error" something strange so i have opened a case with Netbackup but Netbackup denied support as my NBU version is 6.5.4 which is EOS ( End of Support ) already , So now i have only one way to restore is through RMAN , After some struggle with google  i was able to build a script to restore my archivelogs

Note:- I am going to restore the archivelogs to an alternate location on the same server may be /tmp in my case but please check if you have enough space in the particular directory before proceeding with the restore and also get the LOGSEQUENCE  from your DBA

Login to the Host then switch to oracle

prdbclient:~ #  su - oracle

prdbclient: : oracle:>

Now go to the instance for which you want to restore Archivelogs

 prdbclient: : oracle:> prdb1

 prdbclient:prdb1: oracle:>

Once you are logged in to the instance now go to the RECOVERY MANAGER ( RMAN )   PROMPT ( Check with your DBA for the home directory of Oracle to be set )

/OraBase/V10010/bin -->  Is my Oracle Home directory

prdb1/prdb1 -->  Oracle Userid and Password ( You can get userID and Password from you RMAN SCRIPT )

Now type in as below to go to RMAN prompt of instance prdb1

prdbclient:prdb1: oracle:> /OraBase/V10010/bin/rman target / catalog prdb1/prdb1@rman

Once done run the restoration script


 run {

set archivelog destination to '/tmp/PRDB1_Archlogs';


SEND 'NB_ORA_CLIENT=prdbclient, NB_ORA_SERV=masbak, NB_ORA_POLICY=prdbclient_prdb1_archlog_daily';

restore archivelog from logseq=443196 until logseq=433299;



Monitor the Restoration Job from the Netbackup Console

 Once completed successfully let the DBA do his job :)

No comments:

Post a Comment