nbu恢復oracle,使用與源備份端不同使用者問題解決

datapeng發表於2015-05-29
今天在執行nbu恢復oracle的問題,發現總是出現問題
恢復指令碼是沒問題的
RMAN> run
{
allocate channel c1 type 'sbt_tape';
send 'NB_ORA_CLIENT=mytest1';
restore controlfile from '/cntrl_6255_1_880381344';
release channel c1;
}




using target database control file instead of recovery catalog
allocated channel: c1
channel c1: SID=59 device type=SBT_TAPE
channel c1: Veritas NetBackup for Oracle - Release 7.6 (2013111313)


sent command to channel: c1


Starting restore at 22-MAY-15


channel c1: restoring control file
released channel: c1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 05/22/2015 14:45:16
ORA-19870: error while restoring backup piece /cntrl_6255_1_880381344
ORA-19507: failed to retrieve sequential file, handle="/cntrl_6255_1_880381344", parms=""
ORA-27029: skgfrtrv: sbtrestore returned error
ORA-19511: Error received from media manager layer, error text:
   Backup file not found in NetBackup catalog
   
但透過bplist從nbu備份伺服器上檢視也是可以看到的,但就是報這個錯,經過分析,感覺可能是使用者的問題,原來備份時的使用者是oracle,而現在的恢復環境是oratest。所以新建新建一個oracle使用者來,建好後對oracle使用者授好權後,再恢復報如下錯誤:
RMAN> run
{
allocate channel c1 type 'sbt_tape';
send 'NB_ORA_CLIENT=mytest1';
restore controlfile from '/cntrl_6255_1_880381344';
release channel c1;
}


using target database control file instead of recovery catalog
allocated channel: c1
channel c1: SID=59 device type=SBT_TAPE
channel c1: Veritas NetBackup for Oracle - Release 7.6 (2013111313)


sent command to channel: c1


Starting restore at 25-MAY-15


released channel: c1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 05/25/2015 17:23:18
RMAN-06172: no AUTOBACKUP found or specified handle is not a valid copy or piece


後來經過諮詢nbu的工程師,得到了答案!


原因是:
1、ORACLE_HOME的屬主,要與原環境相同。也就是說原環境中是oracle使用者,那麼新環境也必須是oracle
2、在使用oracle_link連結時,必須是使用與原環境相同的使用者進行執行
2、恢復時,使用的執行使用者,必須與原環境相同的使用者。


這些是nbu沒有公佈的,真坑!

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29371470/viewspace-1676281/,如需轉載,請註明出處,否則將追究法律責任。

相關文章