NBU6.5备份DB2问题(在线等待)
本帖最后由 maobo575 于 2011-04-19 20:52 编辑
我这昨天到今天做NBU DB2测试,出现如下问题,望哪位指点下小弟,感激。在线等待。
环境:所有软件全安装在一台服务器
windows server2003(32bit)\192.168.1.120\server01\
详细设置:
NBU:6.5(打过MP3补丁,出现一样问题) 目录:c:\Program Files\veritas\
拷贝 db2uext2.exe到DB2安装目录D:\Program Files\IBM\SQLLIB\bin
db2.conf 和db2_backup_db_online.cmd目录:C:\Program Files\Veritas\NetBackup\DbExt\DB2
脚本db2.conf
DATABASE db2test
OBJECTTYPE DATABASE
POLICY db2_db_back
SCHEDULE Default-Application-Backup-db
ENDOPER
DATABASE db2test
OBJECTTYPE ARCHIVE
POLICY db2_log_arch
SCHEDULE user
ARCFUNC SAVE
#ARCFUNC COPY
#ARCDIR /home/db2inst1/arcdir
#RETDIR /home/db2inst1/arcdir
ENDOPER
备份脚本db2_backup_db_online.cmd
@set db2_nblib=C:\Program Files\Veritas\NetBackup\bin\nbdb2.dll
@echo db2_nblib = %db2_nblib%
@set db2_home=D:\Program Files\IBM\SQLLIB
@echo db2_home = %db2_home%
@set db2_name=db2test
@echo db2_name = %db2_name%
数据库策略:
名称:db2_db_back
TYPEB2
SCHEDULEefault-Application-Backup-db\db2_full
backup selection: C:\Program Files\Veritas\NetBackup\DbExt\DB2\db2_backup_db_online.cmd
LOG策略:
db2_log_arch\ms-windows\user back
数据库信息:
(1)DB2归档设置步骤:
1\设置参数据userexit参数为ON: db2 update db cfg for db2test using userexit on
2\设置参数logretain为on: db2 update db cfg for db2test using logretain on
3\update db cfg for NBU using NEWLOGPATH D:\db2arch\
4\ archive log for db db2test #能看见日志在D:\db2arch\中增加
5\db2 backup database db2test online to c:\ #能在线备份数据库DB2TEST
(2)DB2详细信息:
db2 => connect to db2test
数据库连接信息
数据库服务器 = DB2/NT 9.7.1
SQL 授权标识 = ADMINIST...
本地数据库别名 = DB2TEST
db2 => get db cfg for db2test
数据库 的数据库配置
数据库配置发行版级别 = 0x0d00
数据库发行版级别 = 0x0d00
数据库地域 = CN
数据库代码页 = 1386
数据库代码集 = GBK
数据库国家/地区代码 = 86
数据库整理顺序 = UNIQUE
备用整理顺序 (ALT_COLLATE) =
数字兼容性 = OFF
Varchar2 兼容性 = OFF
日期兼容性 = OFF
数据库页大小 = 4096
动态 SQL 查询管理 (DYN_QUERY_MGMT) = DISABLE
语句集中器 (STMT_CONC) = OFF
对此数据库的发现支持 (DISCOVER_DB) = ENABLE
限制访问 = NO
缺省查询优化类 (DFT_QUERYOPT) = 5
并行度 (DFT_DEGREE) = 1
在算术异常时继续 (DFT_SQLMATHWARN) = NO
缺省刷新有效期 (DFT_REFRESH_AGE) = 0
缺省维护的选项(DFT_MTTB_TYPES)的表类型 = SYSTEM
保留的高频值的数目 (NUM_FREQVALUES) = 10
保留的分位点数目 (NUM_QUANTILES) = 20
十进制浮点舍入方式 (DECFLT_ROUNDING) = ROUND_HALF_EVEN
备份暂挂 = NO
已将所有已落实的事务写入磁盘 = YES
前滚暂挂 = NO
复原暂挂 = NO
启用的多页文件分配 = YES
恢复状态的日志保留 = RECOVERY
日志记录状态的用户出口 = YES
自调整内存 (SELF_TUNING_MEM) = ON
数据库共享内存大小(4KB) (DATABASE_MEMORY) = AUTOMATIC(108752)
数据库内存阈值 (DB_MEM_THRESH) = 10
锁定列表的最大存储量(4KB) (LOCKLIST) = AUTOMATIC(6200)
每个应用程序的锁定百分比列表 (MAXLOCKS) = AUTOMATIC(60)
程序包高速缓存大小(4KB) (PCKCACHESZ) = AUTOMATIC(1533)
共享排序的排序堆域值(4KB) (SHEAPTHRES_SHR) = AUTOMATIC(10512)
排序列表堆(4KB) (SORTHEAP) = AUTOMATIC(525)
数据库堆(4KB) (DBHEAP) = AUTOMATIC(1204)
目录高速缓存大小(4KB) (CATALOGCACHE_SZ) = 300
日志缓冲区大小(4KB) (LOGBUFSZ) = 256
实用程序堆大小(4KB) (UTIL_HEAP_SZ) = 15679
缓冲池大小(页) (BUFFPAGE) = 250
SQL 语句堆(4KB) (STMTHEAP) = AUTOMATIC(204
缺省应用程序堆(4KB) (APPLHEAPSZ) = AUTOMATIC(256)
应用程序内存大小(4KB) (APPL_MEMORY) = AUTOMATIC(10000)
统计信息堆大小(4KB) (STAT_HEAP_SZ) = AUTOMATIC(4384)
检查死锁的时间间隔(毫秒) (DLCHKTIME) = 10000
锁定超时(秒) (LOCKTIMEOUT) = -1
更改的页阈值 (CHNGPGS_THRESH) = 80
异步页清除程序的数目 (NUM_IOCLEANERS) = AUTOMATIC(1)
I/O 服务器的数目 (NUM_IOSERVERS) = AUTOMATIC(3)
索引排序标志 (INDEXSORT) = YES
顺序检测标志 (SEQDETECT) = YES
缺省预取大小(页) (DFT_PREFETCH_SZ) = AUTOMATIC
跟踪修改的页数 (TRACKMOD) = OFF
容器的缺省数目 = 1
缺省表空间扩展数据块大小(页) (DFT_EXTENT_SZ) = 32
最大活动应用程序数 (MAXAPPLS) = AUTOMATIC(40)
活动应用程序的平均数目 (AVG_APPLS) = AUTOMATIC(1)
每个应用程序的最大打开数据库文件数 (MAXFILOP) = 32768
日志文件大小(4KB) (LOGFILSIZ) = 1024
主日志文件的数目 (LOGPRIMARY) = 13
辅助日志文件的数目 (LOGSECOND) = 4
已更改的至日志文件的路径 (NEWLOGPATH) =
日志文件路径 = D:\db2arch\
溢出日志路径 (OVERFLOWLOGPATH) =
镜像日志路径 (MIRRORLOGPATH) =
首个活动日志文件 = S0000009.LOG
磁盘上已满的块日志 (BLK_LOG_DSK_FUL) = NO
非记录块操作 (BLOCKNONLOGGED) = NO
事务使用的最大主日志空间的百分比 (MAX_LOG)= 0
1 个活动 UOW 的活动日志文件的数目 (NUM_LOG_SPAN) = 0
组落实计数 (MINCOMMIT) = 1
软检查点前回收的日志文件的百分比 (SOFTMAX) = 520
启用的恢复的日志保留 (LOGRETAIN) = RECOVERY
启用的日志记录的用户出口 (USEREXIT) = ON
HADR 数据库角色 = STANDARD
HADR 本地主机名 (HADR_LOCAL_HOST) =
HADR 本地服务名称 (HADR_LOCAL_SVC) =
HADR 远程主机名 (HADR_REMOTE_HOST) =
HADR 远程服务名称 (HADR_REMOTE_SVC) =
远程服务器的 HADR 实例名 (HADR_REMOTE_INST) =
HADR 超时值 (HADR_TIMEOUT) = 120
HADR 日志写同步方式 (HADR_SYNCMODE) = NEARSYNC
HADR 对等窗口持续时间(秒) (HADR_PEER_WINDOW) = 0
第一个日志归档方法 (LOGARCHMETH1) = USEREXIT
logarchmeth1 的选项 (LOGARCHOPT1) =
第二个日志归档方法 (LOGARCHMETH2) = OFF
logarchmeth2 的选项 (LOGARCHOPT2) =
故障转移日志归档路径 (FAILARCHPATH) =
错误时重试日志归档次数 (NUMARCHRETRY) = 5
日志归档重试延迟(秒) (ARCHRETRYDELAY) = 20
供应商选项 (VENDOROPT) =
启用的自动重新启动 (AUTORESTART) = ON
索引重新创建时间和重做索引构建 (INDEXREC) = SYSTEM (RESTART)
在索引构建期间记录页 (LOGINDEXBUILD) = OFF
loadrec 会话的缺省数目 (DFT_LOADREC_SES) = 1
要保留的数据库备份的数目 (NUM_DB_BACKUPS) = 12
恢复历史记录保留时间(天数) (REC_HIS_RETENTN) = 366
自动删除恢复对象 (AUTO_DEL_REC_OBJ) = OFF
TSM 管理类 (TSM_MGMTCLASS) =
TSM 节点名 (TSM_NODENAME) =
TSM 所有者 (TSM_OWNER) =
TSM 密码 (TSM_PASSWORD) =
自动维护 (AUTO_MAINT) = ON
自动数据库备份 (AUTO_DB_BACKUP) = OFF
自动表维护 (AUTO_TBL_MAINT) = ON
自动 runstats (AUTO_RUNSTATS) = ON
自动语句统计信息 (AUTO_STMT_STATS) = ON
自动统计信息概要分析 (AUTO_STATS_PROF) = OFF
自动概要文件更新 (AUTO_PROF_UPD) = OFF
自动重组 (AUTO_REORG) = OFF
自动重新验证 (AUTO_REVAL) = DEFERRED
当前已落实 (CUR_COMMIT) = ON
带有 DECIMAL 输入的 CHAR 输出 (DEC_TO_CHAR_FMT) = NEW
启用 XML 字符操作 (ENABLE_XMLCHAR) = YES
WLM 收集时间间隔(分钟) (WLM_COLLECT_INT) = 0
监视器收集设置
请求度量值 (MON_REQ_METRICS) = BASE
活动度量值 (MON_ACT_METRICS) = BASE
对象度量值 (MON_OBJ_METRICS) = BASE
工作单元事件数 (MON_UOW_DATA) = NONE
锁定超时事件数 (MON_LOCKTIMEOUT) = NONE
死锁事件数 (MON_DEADLOCK) = WITHOUT_HIST
锁定等待事件数 (MON_LOCKWAIT) = NONE
锁定等待事件阈值 (MON_LW_THRESH) = 5000000
软件包列表条目数目 (MON_PKGLIST_SZ) = 32
锁定事件通知级别 (MON_LCK_MSG_LVL) = 1
SMTP 服务器 (SMTP_SERVER) =
SQL 条件编译标志 (SQL_CCFLAGS) =
部分实际值设置 SECTION_ACTUALS) = NONE
现象: 当手动切换日志时DB2_LOG_ARCH能自动备份;但是当手动测试DB2数据库备份时
报错 code 6;数据库备份不成功,并且没有出现脚本的输出 db2_backup_db_online.out
其中NBU bpbrm日志
19:47:36.609 [3176.3400] <2> bpbrm main: INITIATING (VERBOSE = 0): version NetBackup 6.5 0
19:47:36.609 [3176.3400] <2> logparams: -backup -S server01 -c server01 -ct 18 -ru root -cl db2_policy_bak -sched db2_full -bt 1303213656 -dt 0 -st 0 -b server01_1303213656 -mediasvr server01 -jobid 23 -jobgrpid 23 -masterversion 650000 -maxfrag 0 -p 0 -use_ofb -use_otm -jm -secure 1 -kl 28 -rg root -fso -hddb -connect_options 16974338
19:47:36.625 [3176.3400] <2> vnet_vnetd_service_socket: vnet_vnetd.c.2043: VN_REQUEST_SERVICE_SOCKET: 6 0x00000006
19:47:36.625 [3176.3400] <2> vnet_vnetd_service_socket: vnet_vnetd.c.2057: service: bpcd
19:47:36.625 [3176.3400] <2> logconnections: BPCD CONNECT FROM 192.168.1.120.2154 TO 192.168.1.120.13724
19:47:36.625 [3176.3400] <2> vnet_connect_to_vnetd_extra: vnet_vnetd.c.179: msg: VNETD CONNECT FROM 192.168.1.120.2155 TO 192.168.1.120.13724 fd = 1764
19:47:36.687 [3176.3400] <2> vnet_vnetd_connect_forward_socket_begin: vnet_vnetd.c.532: VN_REQUEST_CONNECT_FORWARD_SOCKET: 10 0x0000000a
19:47:36.687 [3176.3400] <2> vnet_vnetd_connect_forward_socket_begin: vnet_vnetd.c.549: ipc_string: 2156
19:47:36.703 [3176.3400] <2> bpbrm start_bpcd_stat: DATA_SOCK from bpcr = 1780
19:47:36.703 [3176.3400] <2> bpbrm start_bpcd_stat: NAME_SOCK from bpcr = 1764
19:47:36.703 [3176.3400] <2> bpbrm create_events: created suspend event name NetBackup Suspend Event, pid: 3176
19:47:36.734 [3176.3400] <2> vnet_vnetd_service_socket: vnet_vnetd.c.2043: VN_REQUEST_SERVICE_SOCKET: 6 0x00000006
19:47:36.734 [3176.3400] <2> vnet_vnetd_service_socket: vnet_vnetd.c.2057: service: bpcd
19:47:36.734 [3176.3400] <2> logconnections: BPCD CONNECT FROM 192.168.1.120.2159 TO 192.168.1.120.13724
19:47:36.734 [3176.3400] <2> vnet_connect_to_vnetd_extra: vnet_vnetd.c.179: msg: VNETD CONNECT FROM 192.168.1.120.2160 TO 192.168.1.120.13724 fd = 1716
19:47:36.765 [3176.3400] <2> vnet_vnetd_connect_forward_socket_begin: vnet_vnetd.c.532: VN_REQUEST_CONNECT_FORWARD_SOCKET: 10 0x0000000a
19:47:36.765 [3176.3400] <2> vnet_vnetd_connect_forward_socket_begin: vnet_vnetd.c.549: ipc_string: 2161
19:47:36.796 [3176.3400] <2> bpbrm start_bpcd_stat: DATA_SOCK from bpcr = 1728
19:47:36.796 [3176.3400] <2> bpbrm start_bpcd_stat: NAME_SOCK from bpcr = 1716
19:47:36.796 [3176.3400] <2> bpbrm main: received bpcd success message
19:47:36.812 [3176.3400] <2> bpbrm main: from client server01: read client start message
19:47:36.812 [3176.3400] <2> bpbrm write_continue_backup: wrote CONTINUE BACKUP on COMM_SOCK <1728>
19:47:36.812 [3176.3400] <2> write_file_names: buffering file name 'D:\scripts\db2\db2_backup_db_online.cmd' for output
19:47:36.812 [3176.3400] <2> write_file_names: successfully wrote buffer to COMM_SOCK
19:47:36.812 [3176.3400] <2> bpbrm main: wrote CONTINUE on COMM_SOCK
19:47:36.812 [3176.3400] <2> bpbrm main: closing COMM_SOCK
19:47:36.875 [3176.3400] <2> bpbrm main: client server01 EXIT STATUS = 6: the backup failed to back up the requested files
19:47:36.875 [3176.3400] <2> bpbrm Exit: attempting to send mail to root on server01
19:47:36.890 [3176.3400] <2> vnet_vnetd_service_socket: vnet_vnetd.c.2043: VN_REQUEST_SERVICE_SOCKET: 6 0x00000006
19:47:36.890 [3176.3400] <2> vnet_vnetd_service_socket: vnet_vnetd.c.2057: service: bpcd
19:47:36.890 [3176.3400] <2> logconnections: BPCD CONNECT FROM 192.168.1.120.2164 TO 192.168.1.120.13724
19:47:36.890 [3176.3400] <2> vnet_connect_to_vnetd_extra: vnet_vnetd.c.179: msg: VNETD CONNECT FROM 192.168.1.120.2165 TO 192.168.1.120.13724 fd = 1732
19:47:36.921 [3176.3400] <2> vnet_vnetd_connect_forward_socket_begin: vnet_vnetd.c.532: VN_REQUEST_CONNECT_FORWARD_SOCKET: 10 0x0000000a
19:47:36.921 [3176.3400] <2> vnet_vnetd_connect_forward_socket_begin: vnet_vnetd.c.549: ipc_string: 2166
19:47:36.953 [3176.3400] <2> bpbrm Exit: OUT_SOCK from bpcr = 1724
19:47:36.953 [3176.3400] <2> bpbrm Exit: IN_SOCK from bpcr = 1732
19:47:36.953 [3176.3400] <2> bpcr_get_version_rqst: bpcd version: 06500000
19:47:36.953 [3176.3400] <2> bpcr_get_version_rqst: bpcd version: 06500000
19:47:36.968 [3176.3400] <2> bpcr_get_version_rqst: bpcd version: 06500000
19:47:41.968 [3176.3400] <2> bpbrm Exit: client backup EXIT STATUS 6: the backup failed to back up the requested files
19:47:44.515 [1756.3924] <2> bpbrm main: INITIATING (VERBOSE = 0): version NetBackup 6.5 0
19:47:44.515 [1756.3924] <2> logparams: -backup -S server01 -c server01 -ct 18 -ru root -cl db2_policy_bak -sched db2_full -bt 1303213664 -dt 0 -st 0 -b server01_1303213664 -mediasvr server01 -jobid 23 -jobgrpid 23 -masterversion 650000 -maxfrag 0 -p 0 -use_ofb -use_otm -jm -secure 1 -kl 28 -rg root -fso -hddb -connect_options 16974338
19:47:44.531 [1756.3924] <2> vnet_vnetd_service_socket: vnet_vnetd.c.2043: VN_REQUEST_SERVICE_SOCKET: 6 0x00000006
19:47:44.531 [1756.3924] <2> vnet_vnetd_service_socket: vnet_vnetd.c.2057: service: bpcd
19:47:44.546 [1756.3924] <2> logconnections: BPCD CONNECT FROM 192.168.1.120.2182 TO 192.168.1.120.13724
19:47:44.546 [1756.3924] <2> vnet_connect_to_vnetd_extra: vnet_vnetd.c.179: msg: VNETD CONNECT FROM 192.168.1.120.2183 TO 192.168.1.120.13724 fd = 1764
19:47:44.593 [1756.3924] <2> vnet_vnetd_connect_forward_socket_begin: vnet_vnetd.c.532: VN_REQUEST_CONNECT_FORWARD_SOCKET: 10 0x0000000a
19:47:44.593 [1756.3924] <2> vnet_vnetd_connect_forward_socket_begin: vnet_vnetd.c.549: ipc_string: 2184
19:47:44.609 [1756.3924] <2> bpbrm start_bpcd_stat: DATA_SOCK from bpcr = 1780
19:47:44.609 [1756.3924] <2> bpbrm start_bpcd_stat: NAME_SOCK from bpcr = 1764
19:47:44.609 [1756.3924] <2> bpbrm create_events: created suspend event name NetBackup Suspend Event, pid: 1756
19:47:44.625 [1756.3924] <2> vnet_vnetd_service_socket: vnet_vnetd.c.2043: VN_REQUEST_SERVICE_SOCKET: 6 0x00000006
19:47:44.625 [1756.3924] <2> vnet_vnetd_service_socket: vnet_vnetd.c.2057: service: bpcd
19:47:44.640 [1756.3924] <2> logconnections: BPCD CONNECT FROM 192.168.1.120.2187 TO 192.168.1.120.13724
19:47:44.640 [1756.3924] <2> vnet_connect_to_vnetd_extra: vnet_vnetd.c.179: msg: VNETD CONNECT FROM 192.168.1.120.2188 TO 192.168.1.120.13724 fd = 1724
19:47:44.671 [1756.3924] <2> vnet_vnetd_connect_forward_socket_begin: vnet_vnetd.c.532: VN_REQUEST_CONNECT_FORWARD_SOCKET: 10 0x0000000a
19:47:44.671 [1756.3924] <2> vnet_vnetd_connect_forward_socket_begin: vnet_vnetd.c.549: ipc_string: 2189
19:47:44.703 [1756.3924] <2> bpbrm start_bpcd_stat: DATA_SOCK from bpcr = 1728
19:47:44.703 [1756.3924] <2> bpbrm start_bpcd_stat: NAME_SOCK from bpcr = 1724
19:47:44.703 [1756.3924] <2> bpbrm main: received bpcd success message
19:47:44.734 [1756.3924] <2> bpbrm main: from client server01: read client start message
19:47:44.734 [1756.3924] <2> bpbrm write_continue_backup: wrote CONTINUE BACKUP on COMM_SOCK <1728>
19:47:44.734 [1756.3924] <2> write_file_names: buffering file name 'D:\scripts\db2\db2_backup_db_online.cmd' for output
19:47:44.734 [1756.3924] <2> write_file_names: successfully wrote buffer to COMM_SOCK
19:47:44.734 [1756.3924] <2> bpbrm main: wrote CONTINUE on COMM_SOCK
19:47:44.734 [1756.3924] <2> bpbrm main: closing COMM_SOCK
19:47:44.796 [1756.3924] <2> bpbrm main: client server01 EXIT STATUS = 6: the backup failed to back up the requested files
19:47:44.796 [1756.3924] <2> bpbrm Exit: attempting to send mail to root on server01
19:47:44.812 [1756.3924] <2> vnet_vnetd_service_socket: vnet_vnetd.c.2043: VN_REQUEST_SERVICE_SOCKET: 6 0x00000006
19:47:44.812 [1756.3924] <2> vnet_vnetd_service_socket: vnet_vnetd.c.2057: service: bpcd
19:47:44.812 [1756.3924] <2> logconnections: BPCD CONNECT FROM 192.168.1.120.2192 TO 192.168.1.120.13724
19:47:44.812 [1756.3924] <2> vnet_connect_to_vnetd_extra: vnet_vnetd.c.179: msg: VNETD CONNECT FROM 192.168.1.120.2193 TO 192.168.1.120.13724 fd = 1708
19:47:44.843 [1756.3924] <2> vnet_vnetd_connect_forward_socket_begin: vnet_vnetd.c.532: VN_REQUEST_CONNECT_FORWARD_SOCKET: 10 0x0000000a
19:47:44.843 [1756.3924] <2> vnet_vnetd_connect_forward_socket_begin: vnet_vnetd.c.549: ipc_string: 2194
19:47:44.859 [1756.3924] <2> bpbrm Exit: OUT_SOCK from bpcr = 1728
19:47:44.859 [1756.3924] <2> bpbrm Exit: IN_SOCK from bpcr = 1708
19:47:44.859 [1756.3924] <2> bpcr_get_version_rqst: bpcd version: 06500000
19:47:44.859 [1756.3924] <2> bpcr_get_version_rqst: bpcd version: 06500000
19:47:44.875 [1756.3924] <2> bpcr_get_version_rqst: bpcd version: 06500000
19:47:49.890 [1756.3924] <2> bpbrm Exit: client backup EXIT STATUS 6: the backup failed to back up the requested files
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
版主要是有时间帮我看下吧,谢谢
怎么没有反应啊啊啊
不懂DB2,6号错误大部分跟脚本有关,仔细查看下备份脚本吧。另外windows上注意下目录权限