标题: DB2 v8 备份报错 SQL2062N . 请教解决方法(更新)
xxx_hyh (hyh)
LU幼天使
Rank: 2



UID 35030
精华 0
积分 37
帖子 41
活跃指数 9
LU金币 2056 个
LU金条 0 个
阅读权限 20
注册 2005-9-30
来自 gd
 
发表于 2007-6-8 12:10  资料  个人空间  短消息  加为好友 
故障现象补充

通过测试,发现DB2主机 每次在重启后,都能自动发起log 的备份, 正常备了500多个log(大小=4M/个) 后,就报错:

2007-06-05-21.42.37.922000+480 I816702887H532     LEVEL: Error
PID     : 764                  TID  : 4636        PROC : db2syscs.exe
INSTANCE: DB2ADMIN             NODE : 000
FUNCTION: DB2 UDB, data protection, sqlpInitVendorDevice, probe:1030
MESSAGE : sqluvint failed!  Vendor rc:
DATA #1 : Hexdump, 40 bytes
0x14DCE19C : 0B00 0000 4C69 6E65 203D 2034 3734 2072    ....Line = 474 r
0x14DCE1AC : 6320 3D20 3131 0000 0000 0000 0000 0000    c = 11..........
0x14DCE1BC : 0000 0000 0000 0000                        ........
2007-06-05-21.42.37.922000+480 I816703421H277     LEVEL: Error
PID     : 764                  TID  : 4636        PROC : db2syscs.exe
INSTANCE: DB2ADMIN             NODE : 000
FUNCTION: DB2 UDB, data protection, sqlpInitVendorDevice, probe:1050
RETCODE : ZRC=0x0000000B=11
2007-06-05-21.42.37.953000+480 I816703700H278     LEVEL: Error
PID     : 764                  TID  : 4636        PROC : db2syscs.exe
INSTANCE: DB2ADMIN             NODE : 000
FUNCTION: DB2 UDB, data protection, sqlpgArchiveLogVendor, probe:1820
RETCODE : ZRC=0x0000000B=11
2007-06-05-21.42.37.953000+480 I816703980H387     LEVEL: Error
PID     : 764                  TID  : 4636        PROC : db2syscs.exe
INSTANCE: DB2ADMIN             NODE : 000
FUNCTION: DB2 UDB, data protection, sqlpgArchiveLogFile, probe:3160
MESSAGE : Failed to archive log file S0008683.LOG to VENDOR chain 1 from
          F:\DB2ADMIN\NODE0000\SQL00003\SQLOGDIR\ with rc = 11.

每次报错都是相同的

[ 本帖最后由 xxx_hyh 于 2007-6-8 12:11 编辑 ]

顶部
beginner-bj
版主
Rank: 15Rank: 15Rank: 15Rank: 15Rank: 15


UID 9471
精华 16
积分 1481
帖子 2531
活跃指数 209
LU金币 4827 个
LU金条 0 个
阅读权限 210
注册 2004-1-16
 
发表于 2007-6-8 14:31  资料  个人空间  短消息  加为好友 
按这个方法查吧

Interpreting Vendor API return codes from db2diag.log messages
Technote (FAQ)
  
Problem
Sometimes you will see a db2diag.log entry indicating that DB2 failed to archive a log file SNNNNNNN.log to TSM chain M from a particular path with rc = #. What does this mean?

This technote will help you interpret Vendor API return codes so that you can determine the next step in resolving the error.  
  
Cause
Generally when an error is encountered while archiving a log using a vendor API such as TSM, the db2diag.log will have the following messages:

2006-08-29-23.36.45.181336-240 I171851309A565     LEVEL: Error
PID     : 1287366              TID  : 1           PROC : db2logmgr (DBNAME) 0
INSTANCE: corrente              NODE : 000
FUNCTION: DB2 UDB, data protection, sqlpInitVendorDevice, probe:1030
MESSAGE : sqluvint failed!  Vendor rc:
DATA #1 : Hexdump, 48 bytes
0x0FFFFFFFFFFFD120 : 0000 01AA 3432 3520 3432 3600 0000 0000 ....425 426.....
0x0FFFFFFFFFFFD130 : 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0FFFFFFFFFFFD140 : 0000 0000 0000 0000 0000 0000 0000 0000 ................

2006-08-29-23.36.45.181867-240 I171851875A282     LEVEL: Error
PID     : 1287366              TID  : 1           PROC : db2logmgr (DBNAME) 0
INSTANCE: corrente              NODE : 000
FUNCTION: DB2 UDB, data protection, sqlpInitVendorDevice, probe:1050
RETCODE : ZRC=0x0000000B=11

2006-08-29-23.36.45.182157-240 I171852158A283     LEVEL: Error
PID     : 1287366              TID  : 1           PROC : db2logmgr (DBNAME) 0
INSTANCE: corrente              NODE : 000
FUNCTION: DB2 UDB, data protection, sqlpgArchiveLogVendor, probe:1820
RETCODE : ZRC=0x0000000B=11

2006-08-29-23.36.45.182304-240 I171852442A393     LEVEL: Error
PID     : 1287366              TID  : 1           PROC : db2logmgr (DBNAME) 0
INSTANCE: corrente              NODE : 000
FUNCTION: DB2 UDB, data protection, sqlpgArchiveLogFile, probe:3160
MESSAGE : Failed to archive log file SNNNNNNN.LOG to TSM chain 0 from
          /db2path/corrente/NODE0000/SQL00001/SQLOGDIR/ with rc = 11.
The last message tells us that the sqlpgArchiveLogFile function failed with a return code of 11.

What do we do now?

  
Solution
If we follow the function sequence we see the following:

sqlpgArchiveLogFile -> sqlpgArchiveLogVendor -> sqlpInitVendorDevice


We see that sqlpInitDevice has a return code (RETCODE) of ZRC=0x0000000B=11

ZRC codes are set by DB2 functions, so 11 must be a DB2 return code.

The definitions for all DB2 to Vendor API return codes are found under the instance home directory <sqllib>/include/ in the sqluvend.h header file.

The above return code is in this example:
#define SQLUV_INIT_FAILED      11  /* Initialization failed */

Similarly one can find the meaning of other DB2 to Vendor API return codes, in this way.

Note, however, that this return code is not the return code from the Vendor API. To find this out we must at the very first instance of the db2diag.log message, in the above group of diagnostic messages:

2006-08-29-23.36.45.181336-240 I171851309A565 LEVEL: Error
PID : 1287366 TID : 1 PROC : db2logmgr (DBNAME) 0
INSTANCE: corrente NODE : 000
FUNCTION: DB2 UDB, data protection, sqlpInitVendorDevice, probe:1030
MESSAGE : sqluvint failed! Vendor rc:
DATA #1 : Hexdump, 48 bytes
0x0FFFFFFFFFFFD120 : 0000 01AA 3432 3520 3432 3600 0000 0000 ....425 426.....
0x0FFFFFFFFFFFD130 : 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0FFFFFFFFFFFD140 : 0000 0000 0000 0000 0000 0000 0000 0000 ................

The Vendor rc is defined to of type Return_code which is defined in <sqllib>/include/sqluvend.h as:

#define SQLUV_COMMENT_LEN     30

typedef struct Return_code
{
        sqlint32   return_code;  /* return code from the vendor function  */
        char       description[SQLUV_COMMENT_LEN];
        /* descriptive message                   */
        void       *reserve;     /* reserve for future use                */
} Return_code;


This structure is dumped out in the DATA component of the above diagnostic entry:

DATA #1 : Hexdump, 48 bytes
0x0FFFFFFFFFFFD120 : 0000 01AA 3432 3520 3432 3600 0000 0000 ....425 426.....
0x0FFFFFFFFFFFD130 : 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0FFFFFFFFFFFD140 : 0000 0000 0000 0000 0000 0000 0000 0000 ................

sqlint32 takes up 4 bytes, so the return code from the vendor function is to be found in the first 4 bytes of the above diagnotics data entry. This is hexadecimal dump (hexdump).

So, in the above case we see that the value is hex 0000 01AA which is corresponds to decimal 426.
Note: the value for the description array is
3432 3520 3432 3600 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
which happens to contain the return code value. We should not rely soley on the description array though.

Now that we have the Vendor's return code one can find out what that means by simply looking up the Vendor API documentation. In the case of TSM one can find this here:

http://publib.boulder.ibm.com/in ... doc/ansa0000148.htm

A quick search for 426 we see

#define DSM_RC_CANNOT_OPEN_TRACEFILE 426/* cannot open trace file  */

Now, if the above DATA component contains all zeros and the db2diag.log contains a number of signal handler diagnostic entries, then it is likely that an abnormal termination has occurred in the vendor's library.

In this case you would see a rc = 30 in the sqlpgArchiveLogFile function.

This DB2 return code is defined in the sqluvend.h file as:


#define SQLUV_UNEXPECTED_ERROR 30 /* A severe error was experienced */





我的博客:http://blog.chinaunix.net/index.php?blogId=739欢迎访问,并请多多批评指正。
顶部
 



当前时区 GMT+8, 现在时间是 2008-10-16 04:00
乐悠LoveUnix论坛-京ICP备05005823号

Thanks to Discuz!  © 2001-2007    Power by LoveUnix.net
Processed in 5.164598 second(s), 6 queries , Gzip enabled

清除 Cookies - 联系我们 - 乐悠LoveUnix - Archiver