Backup failed due to TSM error 106

AIX Server,实例:db2inst2 ,数据库:CPW。部署脚本,每天做online backup use tsm。

客户发现备份失败。

检查report发现SQL2033 错误。


*------------------------------------------------------------------*
Starting database backup Sun Dec 25 04:01:01 CUT 2011
*------------------------------------------------------------------*

Start timestamp of backup is Sun Dec 25 04:01:01 CUT 2011

Issuing this command: db2 backup database CPW online use tsm open 2 sessions without prompting

*------------------------------------------------------------------*

SQL Return code = -2033
Backup of database CPW failed


运行db2 backup db cpw use tsm检查错误码:sql2033,tsm error code 106

查看Sql2033的解释:

db2inst2@b03cxnp01049:/home/db2inst2> db2 ? sql2033


SQL2033N An error occurred while accessing TSM during the processing of
a database utility. TSM reason code: "<reason-code>".

Explanation:

Some common TSM reason codes are:

106

The specified file is being used by another process. You tried
to read from or write to a file that is currently being used by
another process.
User response:

Responses for common TSM problems are:

106

Ensure that you specified the correct file or directory name,
correct the permissions, or specify a new location.



检查为TSM设置的环境变量:

db2inst2@b03cxnp01049:/home/db2inst2> env |grep -i dsm
DSMI_CONFIG=/usr/tivoli/tsm/client/api/bin64/dsm.opt
DSM_LOG=/u/db2inst2
DSMI_LOG=/u/db2inst2
DSMI_DIR=/usr/tivoli/tsm/client/api/bin64


需要写权限的应该只有LOG,检查LOG的权限:

db2inst2@b03cxnp01049:/home/db2inst2> ls -ld /u/db2inst2
drwxr-xr-x 8 db2inst2 staff 4096 Jan 20 04:55 /u/db2inst2


权限没发现问题,还是不放心,touch一个文件,并且cat些text以确定可以写入:

db2inst2@b03cxnp01049:/home/db2inst2> touch /u/db2inst2/test
db2inst2@b03cxnp01049:/home/db2inst2> cat > /u/db2inst2/test
test
db2inst2@b03cxnp01049:/home/db2inst2> ls -l /u/db2inst2/test
-rw------- 1 db2inst2 db2iadm2 5 Jan 20 07:31 /u/db2inst2/test
db2inst2@b03cxnp01049:/home/db2inst2> cat /u/db2inst2/test
test


确定LOG dir权限没问题,那么是哪个文件出问题了呢,想到TSM错误日志在dsm.sys里面指定,检查:

db2inst2@b03cxnp01049:/usr/tivoli/tsm/client/api/bin64> grep ERROR /usr/tivoli/tsm/client/api/bin64/dsm.sys
ERRORLOGRETENTION 7,d
ERRORLOGNAME /home/inst1/dsierror.log
db2inst2@b03cxnp01049:/usr/tivoli/tsm/client/api/bin64> ls -l /home/inst1/dsierror.log
-rw-r--r-- 1 inst1 sysadm1 0 Jul 18 2010 /home/inst1/dsierror.log


显然,db2inst2没有写/home/inst1/dsierror.log的权限。
切换到user inst1,修改/home/inst1/dsierror.log的权限,允许db2inst2写入:

inst1@b03cxnp01049:/home/inst1> chmod 777 /home/inst1/dsierror.log
inst1@b03cxnp01049:/home/inst1> ls -l /home/inst1/dsierror.log
-rwxrwxrwx 1 inst1 sysadm1 0 Jul 18 2010 /home/inst1/dsierror.log


运行备份脚本测试:

Starting online backup
Issuing this DB2 command: backup db CPW online use tsm
backup db CPW online use tsm

Backup successful. The timestamp for this backup image is : 20120120045654
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值