我先说下,我要做的事情和环境:
数据库服务器a机,b机作为NBU server端备份a机数据库至到磁带库st,
现在我想做异地恢复测试,将a机数据库作为源数据库,恢复至c机目标数据库。
如果不连接catalog的话,在目标库执行:
-bash-3.00$ rman target /
Recovery Manager: Release 9.2.0.6.0 - 64bit Production
Copyright (c) 1995, 2002, Oracle Corporation.All rights reserved.
connected to target database: china111 (not mounted)
RMAN> run{
2> ALLOCATE CHANNEL CH00 TYPE 'SBT_TAPE';
3> SEND 'NB_ORA_SERV=sol1,NB_ORA_CLIENT=eagle';
4> restore controlfile;
5> }
using target database controlfile instead of recovery catalog
allocated channel: CH00
channel CH00: sid=13 devtype=SBT_TAPE
channel CH00: Veritas NetBackup for Oracle - Release 6.5 (072323)
sent command to channel: CH00
Starting restore at 14-JUN-11
released channel: CH00
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 06/14/ 14:34:03
RMAN-06563: controlfile or SPFILE must be restored using FROM AUTOBACKUP
RMAN> exit
同样指定 FROM AUTOBACKUP 也报错:
RMAN> set dbid=2087198266
executing command: SET DBID
RMAN> run{
2> ALLOCATE CHANNEL CH00 TYPE 'SBT_TAPE';
3> SEND 'NB_ORA_SERV=sol1,NB_ORA_CLIENT=eagle';
4> restore controlfile from autobackup;
5> }
allocated channel: CH00
channel CH00: sid=11 devtype=SBT_TAPE
channel CH00: Veritas NetBackup for Oracle - Release 6.5 (072323)
sent command to channel: CH00
Starting restore at 14-JUN-11
channel CH00: looking for autobackup on day: 0614
channel CH00: looking for autobackup on day: 0613
channel CH00: looking for autobackup on day: 0612
channel CH00: looking for autobackup on day: 0611
channel CH00: looking for autobackup on day: 0610
channel CH00: looking for autobackup on day: 0609
channel CH00: looking for autobackup on day: 0608
channel CH00: no autobackup in 7 days found
released channel: CH00
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 06/14/ 12:51:39
RMAN-06172: no autobackup found or specified handle is not a valid copy or piece
google下网上的例子都是连接catalog做恢复的
在目标机做rman恢复的时候,一定需要连接catalogDB才能找到磁带库备份的信息吗?
eg:
rman catalog auss3pis/auss3pis@catalog;
Recovery Manager: Release 9.0.1.4.0 - Production
(c) Copyright 2001 Oracle Corporation.All rights reserved.
connected to recovery catalog database
RMAN> set dbid=4227459251
executing command: SET DBID
RMAN> connect target / connected to target database:(not mounted)
RMAN> run {
2> allocate channel ch00 type 'sbt_tape';
3> send 'nb_ora_serv=aush06';
4> send 'nb_ora_client=aush49';
5> restore controlfile;
6> }
allocated channel: ch00
channel ch00: sid=11 devtype=SBT_TAPE
channel ch00: VERITAS NetBackup for Oracle - Release 4.5FP_3GA (2002121901)
sent command to channel: ch00
sent command to channel: ch00
Starting restore at 09-DEC-04
。。。。。。。
[本帖最后由 lixiang114 于 -6-14 14:58 编辑]