Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to deal with SQL2059W errors in DB2 Database backup

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail how to deal with SQL2059W errors in DB2 database backup. Xiaobian thinks it is quite practical, so share it with you for reference. I hope you can gain something after reading this article.

On a production AIX server, DB2 database needs to be backed up, and SQL2059W error is reported in the backup. The specific information is as follows:

$ db2 backup db happydb online to /backup include logs

SQL2059W A device full warning was encountered on device "/backup".

Do you want to continue(c), terminate this device only(d), abort the utility(t) ? (c/d/t) t

SQL2001N The utility was interrupted. The output data may be incomplete.

This error message is usually more related to the operating system than to the DB2 database.

1. Check whether the file system is a large file system and whether there are limits;

2. Check whether the space where the directory is located is sufficient;

first

1. View active volumes

# lsvg -o

rootvg

# lsvg -l rootvg

rootvg:

LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT

hd5 boot 1 2 2 closed/syncd N/A

hd6 paging 24 48 2 open/syncd N/A

hd8 jfs2log 1 2 2 open/syncd N/A

hd4 jfs2 1 2 2 open/syncd /

hd2 jfs2 40 80 2 open/syncd /usr

hd9var jfs2 4 8 2 open/syncd /var

hd3 jfs2 8 16 2 open/syncd /tmp

hd1 jfs2 140 280 2 open/syncd /home

hd10opt jfs2 16 32 2 open/syncd /opt

lg_dumplv sysdump 8 8 1 open/syncd N/A

paging00 paging 50 50 1 open/syncd N/A

lv002 jfs2 248 496 2 open/syncd /backup

The file system of "/backup" is JFS2, which supports large file systems. For JFS file systems, in most instances, multiple file systems use a common log configured to 4 MB in size. For example, after initial installation, all file systems in the root volume group use logical volume hd8 as a common JFS journal. The default logical volume partition size is 4 MB, and the default journal size is one partition, so the root volume group typically contains a 4 MB JFS journal. The default log size may be insufficient when the file system exceeds 2 GB or when the total amount of file system space using a single log exceeds 2 GB. In general, the maximum file size supported by normal JFS is 2G; the JFS supporting large files is 64G; and the JFS2 supporting large files is 1T.

Check the parameters in the/etc/security/limits file, paying special attention to the value of FSIZE. If SQL2059W error occurs when backups occur, you can vi modify the value of FSIZE in the/etc/security/limits file to-1, noting that this change will take effect after the system restarts.

default:

fsize = -1

core = 0

cpu = -1

data =-1

rss = 65536

stack = 65536

nofiles =32768 #(-1 is unlimited)

core_hard = 0

root:

nobody:

db2inst2:

core = -1

data = 491519

stack = 32767

rss = -1

fsize = -1

nofiles =10000

second

1. Check whether ROOTVG has any space left to expand

# lsvg rootvg

VOLUME GROUP: rootvg VG IDENTIFIER: 00c5febb00004c0000000120b573a76a

VG STATE: active PP SIZE: 256 megabyte(s)

VG PERMISSION: read/write TOTAL PPs: 1092 (279552 megabytes)

MAX LVs: 256 FREE PPs: 244 (62464 megabytes)

LVs: 12 USED PPs: 848 (217088 megabytes)

OPEN LVs: 11 QUORUM: 1 (Disabled)

TOTAL PVs: 2 VG DESCRIPTORS: 3

STALE PVs: 0 STALE PPs: 0

ACTIVE PVs: 2 AUTO ON: no

MAX PPs per VG: 32512

MAX PPs per PV: 1016 MAX PVs: 32

LTG size (Dynamic): 256 kilobyte(s) AUTO SYNC: no

HOT SPARE: no BB POLICY: relocatable

2. Command expand/backup directory

pre-expansion

# df -g /backup

Filesystem GB blocks Free %Used Iused %Iused Mounted on

/dev/lv002 40.00 14.85 63% 3856 1% /backup

# chfs -a size=+22G /backup

Filesystem size changed to 130023424

expanded

# df -g /backup

Filesystem GB blocks Free %Used Iused %Iused Mounted on

/dev/lv002 62.00 36.85 41% 3856 1% /backup

# lsvg -l rootvg

rootvg:

LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT

hd5 boot 1 2 2 closed/syncd N/A

hd6 paging 24 48 2 open/syncd N/A

hd8 jfs2log 1 2 2 open/syncd N/A

hd4 jfs2 1 2 2 open/syncd /

hd2 jfs2 40 80 2 open/syncd /usr

hd9var jfs2 4 8 2 open/syncd /var

hd3 jfs2 8 16 2 open/syncd /tmp

hd1 jfs2 140 280 2 open/syncd /home

hd10opt jfs2 16 32 2 open/syncd /opt

lg_dumplv sysdump 8 8 1 open/syncd N/A

paging00 paging 50 50 1 open/syncd N/A

lv002 jfs2 248 496 2 open/syncd /backup

$ db2 backup db happydb online to /backup include logs

Backup successful. The timestamp for this backup p_w_picpath is : 20130307202616

Back up again and found that it had succeeded.

$ cd /backup

$ ls -l

total 81305984

-rw-r----- 1 db2inst2 db2grp 21463318528 Mar 07 20:32

HAPPYDB.0.db2inst2.NODE0000.CATN0000.20130307202616.001

After inspection, it was found that the backup file of the database was relatively large, with 21G. SQL2059W error was created.

About "DB2 database backup SQL2059W error how to deal with" this article is shared here, I hope the above content can be of some help to everyone, so that you can learn more knowledge, if you think the article is good, please share it to let more people see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report