Chinaunix

标题: 求nbu 备份 oracle rac database 的脚本(cold 和hot ) [打印本页]

作者: johnson2002    时间: 2010-07-28 15:17
标题: 求nbu 备份 oracle rac database 的脚本(cold 和hot )
查看NetBackup_AdminGuide_Oracle_Unix ,里提到是 下面的脚本.

RUN
{
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
SEND 'NB_ORA_CLIENT=$NB_ORA_CLIENT, NB_ORA_SERV=$NB_ORA_SERV';
BACKUP
DATABASE;
sql 'alter system archive log current';
RELEASE CHANNEL ch00;
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
SEND 'NB_ORA_CLIENT=$NB_ORA_CLIENT, NB_ORA_SERV=$NB_ORA_SERV';
BACKUP
ARCHIVELOG ALL ;
RELEASE CHANNEL ch00;
}

可我运行时报错


RMAN> RUN
2> {
3> ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
4> SEND 'NB_ORA_CLIENT=$NB_ORA_CLIENT, NB_ORA_SERV=$NB_ORA_SERV';
5> BACKUP
6> DATABASE;
7> sql 'alter system archive log current';
8> RELEASE CHANNEL ch00;
9> ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
10> SEND 'NB_ORA_CLIENT=$NB_ORA_CLIENT, NB_ORA_SERV=$NB_ORA_SERV';
11> BACKUP
12> ARCHIVELOG ALL ;
13> RELEASE CHANNEL ch00;
14> }

using target database control file instead of recovery catalog
allocated channel: ch00
channel ch00: SID=141 instance=racg2 device type=SBT_TAPE
channel ch00: Veritas NetBackup for Oracle - Release 7.0 (2010051100)

sent command to channel: ch00

Starting backup at 28-JUL-10
channel ch00: starting full datafile backup set
channel ch00: specifying datafile(s) in backup set
input datafile file number=00006 name=/bbbb/odm2.dbf
input datafile file number=00002 name=/oracle/racg/sysaux01.dbf
input datafile file number=00001 name=/oracle/racg/system01.dbf
input datafile file number=00003 name=/oracle/racg/undotbs01.dbf
input datafile file number=00005 name=/oracle/racg/undotbs02.dbf
input datafile file number=00004 name=/oracle/racg/users01.dbf
channel ch00: starting piece 1 at 28-JUL-10
released channel: ch00
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ch00 channel at 07/28/2010 15:07:06
ORA-19506: failed to create sequential file, name="1flju60e_1_1", parms=""
ORA-27028: skgfqcre: sbtbackup returned error
ORA-19511: Error received from media manager layer, error text:
   VxBSAValidateFeatureId: Failed with error:
   Server Status:  cannot connect on socket


网上找到另一个
RUN {
ALLOCATE CHANNEL ch00 device type sbt connect'sys/oracle@racg1'parms "ENV=(NB_ORA_CLIENT=hp01)" ;
ALLOCATE CHANNEL ch01 device type sbt connect'sys/oracle@racg2'parms "ENV=(NB_ORA_CLIENT=hp02)" ;
SEND 'NB_ORA_CLIENT=$NB_ORA_CLIENT';
BACKUP
   TAG hot_backup
   FORMAT 'rac_backup_%d_%s_%p_%t'
   DATABASE;
   sql 'alter system archive log current';
RELEASE CHANNEL ch00;
RELEASE CHANNEL ch01;
}

我运行这2个都有问题, 哪位有做过?谢谢
作者: 赵大少爷    时间: 2010-07-28 19:37
这两天碰到的这种问题挺多的还

平台 版本
你求助得把问题说清楚
作者: johnson2002    时间: 2010-07-28 22:42
这两天碰到的这种问题挺多的还

平台 版本
你求助得把问题说清楚
赵大少爷 发表于 2010-07-28 19:37



    hp 11.31 + oracle 11gr1 rac + nbu7.0.1

master : hp23
client : hp01/hp02

谢谢
作者: 赵大少爷    时间: 2010-07-28 23:12
回复 3# johnson2002


    bp.conf
修改REQUIRED_INTERFACE
作者: 赵大少爷    时间: 2010-07-28 23:13
找正规的脚本
别随处找个乱用
除非你真明白每个参数的意义
作者: 无牙    时间: 2010-07-29 02:43

作者: ry715    时间: 2010-07-29 09:05

作者: jhxware    时间: 2010-12-02 09:15
using target database control file instead of recovery catalog
allocated channel: ch00
channel ch00: SID=141 instance=racg2 device type=SBT_TAPE
channel ch00: Veritas NetBackup for Oracle - Release 7.0 (2010051100)

sent command to channel: ch00

Starting backup at 28-JUL-10
channel ch00: starting full datafile backup set
channel ch00: specifying datafile(s) in backup set
input datafile file number=00006 name=/bbbb/odm2.dbf
input datafile file number=00002 name=/oracle/racg/sysaux01.dbf
input datafile file number=00001 name=/oracle/racg/system01.dbf
input datafile file number=00003 name=/oracle/racg/undotbs01.dbf
input datafile file number=00005 name=/oracle/racg/undotbs02.dbf
input datafile file number=00004 name=/oracle/racg/users01.dbf
channel ch00: starting piece 1 at 28-JUL-10
released channel: ch00
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ch00 channel at 07/28/2010 15:07:06
ORA-19506: failed to create sequential file, name="1flju60e_1_1", parms=""
ORA-27028: skgfqcre: sbtbackup returned error
ORA-19511: Error received from media manager layer, error text:
   VxBSAValidateFeatureId: Failed with error:
   Server Status:  cannot connect on socket


我也碰到相同的问题,还请大家指点下,,我用的脚本是安装好NBU后自带的脚本来改的。
作者: johnson2002    时间: 2010-12-09 16:47
回复 8# jhxware


  如果oracle_relink 已经完成 ,   重试下重起nbu master
作者: 无牙    时间: 2010-12-10 08:58
建议LZ看一下NBU for Oracle 的admin guide ,在 附录B中有Backup RAC best practice.

里面有脚本的写法。
作者: johnson2002    时间: 2010-12-10 10:43
回复 10# 无牙


    NBU7.0 nbu for oracle 的best practise里面讲到 virtual vip,你知道这个是啥不? 俺问了好多人都没法理解.....
    rac里的vip很好理解,一个node一个vip, virtual vip真不知道是什么.
作者: hhy1363    时间: 2010-12-11 11:57
第一个脚本将 $NB_ORA_CLIENT和 $NB_ORA_SERV改为真实的主机名,再试试

第二个脚本:数据文件不需要RAC的两个节点都备份,如果归档日志是分别放在两个节点上则脚本类似如下:
RUN {
ALLOCATE CHANNEL ch00 type 'sbt_type';
ALLOCATE CHANNEL ch01 type 'sbt_type';
BACKUP
   TAG hot_backup
   FORMAT 'rac_backup_%d_%s_%p_%t'
   DATABASE;
   sql 'alter system archive log current';
RELEASE CHANNEL ch00;
RELEASE CHANNEL ch01;

ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE' connect 'sys/oracle@racg1' send 'NB_ORA_CLIENT=ibm550-1,NB_ORA_POLICY=racg1_arch,NB_ORA_SCHED=Default-Application-Backup';
ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE' connect 'sys/oracle@racg2' send 'NB_ORA_CLIENT=ibm550-2,NB_ORA_POLICY=racg2_arch,NB_ORA_SCHED=Default-Application-Backup';
BACKUP
   filesperset 20
   FORMAT 'al_%s_%p_%t'
   ARCHIVELOG ALL DELETE INPUT;
RELEASE CHANNEL ch00;
RELEASE CHANNEL ch01;
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
#SEND 'NB_ORA_CLIENT=ibm550-1,NB_ORA_SERV=nbusvr';
BACKUP
    # recommended format
    FORMAT 'cntrl_%s_%p_%t'
    CURRENT CONTROLFILE;
RELEASE CHANNEL ch00;
}


如果归档日志存放路径两个节点都能共享,则和单机的脚本一样即可




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2