SQL2059W error parsing in DB2 database backup

Source: Internet
Author: User

On a production AIX server, the DB2 database needs to be backed up. The SQL2059W error is reported in the backup. The details are 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 generally related to the operating system rather than the DB2 database error.
1. Check whether the file system is a large file system and whether there are limits restrictions;
2. Check whether the directory space is sufficient;

First

1. view the active volume

# 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/
Hd6 paging 24 48 2 open/syncd N/
Hd8 jfs2log 1 2 2 open/syncd N/
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/
Paging00 paging 50 50 1 open/syncd N/
Lv002 jfs2 248 496 2 open/syncd/backup

The file system of "/backup" is JFS2, which supports large file systems. For JFS file systems, multiple file systems use public logs with a size of 4 MB in most instances. For example, after initial installation, all file systems in the root volume group use the logical volume hd8 as the common JFS log. The default logical volume partition size is 4 MB, and the default log size is one partition. Therefore, the root volume group usually contains a 4 mb jfs log. When the file system exceeds 2 GB or the total space of the file system that uses a single log exceeds 2 GB, the default log size may be insufficient. Generally, JFS supports a maximum of 2 GB files, 64 gb jfs for large files, and 1 TB for large files supported by JFS2.

2. Check the parameters in the/etc/security/limits file. Pay special attention to the value of FSIZE. If the SQL2059W error occurs during backup, you can change the value of FSIZE in the/etc/security/limits file to-1. Note that this change will take effect after the system restarts.
Default:
Fsize =-1
Core = 0
Cpu =-1
Data =-1
Rss = 65536
Stacks = 65536
Nofiles = 32768 #-1 is unrestricted)
Core_hard = 0
Root:
Nobody:
Db2inst2:
Core =-1
Data = 491519
Stacks = 32767
Rss =-1
Fsize =-1
No files = 10000
 

Second

1. Check whether ROOTVG has any scalable space.

# Lsvg rootvg
Volume group: rootvg IDENTIFIER: 00c5febb3164c0000000120b573a76a
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 packets 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 extension/backup Directory

Before 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

After expansion

# 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/
Hd6 paging 24 48 2 open/syncd N/
Hd8 jfs2log 1 2 2 open/syncd N/
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/
Paging00 paging 50 50 1 open/syncd N/
Lv002 jfs2 248 496 2 open/syncd/backup

$ Db2 backup db happydb online to/backup include logs

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

Back up again and find that the operation is successful.

$ Cd/backup
$ Ls-l
Total 81305984
-Rw-r ----- 1 db2inst2 db2grp 21463318528 Mar 07 20:32

HAPPYDB.0.db2inst2. node.zip .catn=.20130307202616.001
 

After inspection, we found that the backup file of the database is large and the size of the database is 21 GB. Therefore, the above SQL2059W error is caused.

This article is from the "dripping water and stone" blog. For more information, contact the author!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.