DB2 V81 for Windows2003备份无法完成问题

DB2 V81 for Windows2003备份在75%的时候,报SQL2025N I/O错误。

备份失败。[@more@]

1 备份失败现象

2 检查db2diag.log错误信息如下:

2010-06-12-08.11.07.281000+720 I23727H349 LEVEL: Error

PID : 7264 TID : 3244 PROC : db2syscs.exe

INSTANCE: ESBDBIN2 NODE : 000

FUNCTION: DB2 UDB, buffer pool services, sqlbDirectRead, probe:820

RETCODE : ZRC=0x870F00F2=-2029059854=SQLO_NORES

"no resources to create process or thread"

2010-06-12-08.11.07.281000+720 I24078H319 LEVEL: Error

PID : 7264 TID : 3244 PROC : db2syscs.exe

INSTANCE: ESBDBIN2 NODE : 000

FUNCTION: DB2 UDB, buffer pool services, sqlbDirectRead, probe:820

MESSAGE : Obj={pool:4;obj:0;type:0} State=x0 Parent={0;0}, EM=0, PP0=0

2010-06-12-08.11.07.281000+720 I24399H593 LEVEL: Error

PID : 7264 TID : 3244 PROC : db2syscs.exe

INSTANCE: ESBDBIN2 NODE : 000

MESSAGE : SQLB_OBJECT_DESC

DATA #1 : Hexdump, 68 bytes

0x0FF9B1CC : 0400 0000 0000 0000 0000 0000 0000 0000 ................

0x0FF9B1DC : 0000 0000 0000 0000 0000 0000 0000 0000 ................

0x0FF9B1EC : 0000 0000 2201 0000 0000 0000 0000 0000 ...."...........

0x0FF9B1FC : 0080 0000 8000 0000 0200 0000 0400 0000 ................

0x0FF9B20C : B089 1702 ....

2010-06-12-08.11.07.281000+720 I24994H366 LEVEL: Severe

PID : 7264 TID : 5140 PROC : db2syscs.exe

INSTANCE: ESBDBIN2 NODE : 000

APPHDL : 0-8

FUNCTION: DB2 UDB, database utilities, sqlubreaddms, probe:9

MESSAGE : DiagData

DATA #1 : Hexdump, 4 bytes

0x21FF4A2C : 80FB 2D00 ..-.

比较关键的是这个返回码,是一个在Wintel平台上较为典型的故障。

FUNCTION: DB2 UDB, buffer pool services, sqlbDirectRead, probe:820

RETCODE : ZRC=0x870F00F2=-2029059854=SQLO_NORES

"no resources to create process or thread"

3 问题分析

Root cause是由于OS的文件系统cache耗尽了。

IBM有专门的表述,引述如下。

链接:

http://www-01.ibm.com/support/docview.wss?uid=swg21223949

Database marked bad with ZRC=0x870F00F2 on Windows

Question

This document describes possible causes for a database that is marked bad and a series of messages beginning with one like this in the db2diag.log: DIA0001E An internal error occurred. Report the following error code :

"ZRC=0x870F00F2".

Cause

This problem can occur if the Windows® file system cache is exhausted.

The Windows file system cache might be exhausted after DB2® repeatedly reads from large file system containers.

The database is then marked bad because the DB2® database gets a Windows error code ERROR_NO_SYSTEM_RESOURCES when reading from a database container.

When the database is marked bad, the next time it is activated it will automatically undergo crash recovery.

Problem details

The db2diag.log message will have the following format:

xxxx-xx-xx-xx.xx.xx.xxxxxx Instance:xxx Node:xxx

PID:xxxx(db2syscs.exe) TID:xxxx Appid:xxxxxxxxxxxxxxxxxxxxxxx

buffer pool services sqlbReadPageFromContainer Probe:20

Database:xxxxxxxx

DIA0001E An internal error occurred. Report the following error code :

"ZRC=0x870F00F2".

Answer

The error can be prevented from occurring--at least temporarily--by rebooting the machine, thereby clearing the Windows file system cache.

You can use the DB2 registry variable DB2NTNOCACHE to avoid use of the Windows file system cache. Follow these steps to set it:

db2stop

db2set DB2NTNOCACHE=ON

db2start

The DB2NTNOCACHE registry variable specifies whether DB2 on Windows opens

database files with a NOCACHE option. If DB2NTNOCACHE=ON, file system

caching is eliminated. If DB2NTNOCACHE=OFF, the operating system caches

DB2 files. This applies to all data except for files that contain long

fields or LOBs. Eliminating system caching allows more memory to be

available to the database so that the buffer pool or sortheap can be

increased.

In DB2 UDB Version 8.2 and DB2 9 you can achieve everything that this registry variable was designed to do by using the CREATE TABLESPACE and ALTER TABLESPACE SQL statements.

Functionality previously achieved through DB2NTNOCACHE can be achieved

at the table space level by specifying the NO FILE SYSTEM CACHING clause

on the CREATE TABLESPACE or the ALTER TABLESPACE statement. Refer to SQL

Reference for details on usage. The DB2NTNOCACHE registry variable will

be removed in a future release.

You may also reduce DB2's use of the Windows file system cache by reducing the size of your containers.

4 解决

C:>db2stop

SQL1064N DB2STOP processing was successful.

C:>

C:>db2set DB2NTNOCACHE=ON

C:>

C:>db2start

SQL1063N DB2START processing was successful.

C:>

C:>db2set -all

[e] DB2PATH=C:Program FilesIBMSQLLIB

[i] DB2_RR_TO_RS=YES

[i] DB2NTNOCACHE=ON

[i] DB2INSTPROF=C:PROGRA~1IBMSQLLIB

[i] DB2COMM=tcpip

[i] DB2CODEPAGE=1208

[g] DB2_EXTSECURITY=YES

[g] DB2_EEE_LICENSE_POLICY=844429225164800

[g] DB2SYSTEM=LROCWINP1

[g] DB2PATH=C:Program FilesIBMSQLLIB

[g] DB2INSTDEF=DB2

[g] DB2ADMINSERVER=DB2DAS00

C:>

C:>db2 terminate

DB20000I The TERMINATE command completed successfully.

C:>

C:>DB2 BACKUP DATABASE msfmeta to d:temp1

备份已经超过了80%,而没有继续报错。问题搞定!

C:>

C:>db2 list utilities show detail

ID = 1

Type = BACKUP

Database Name = MSFMETA

Partition Number = 0

Description = offline db

Start Time = 06/12/2010 21:49:43.463952

Throttling:

Priority = Unthrottled

Progress Monitoring:

Estimated Percentage Complete = 80

Total Work = 108992047233 bytes

Completed Work = 86786097257 bytes

Start Time = 06/12/2010 21:49:43.464440

C:>

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/593324/viewspace-1034410/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/593324/viewspace-1034410/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值