Nbu backup db2 database No. 6 error solution case

Source: Internet
Author: User

When NBU backs up a DB2 database on an AIX server, it reports Error 6.

Error:

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/1H545F15-0.jpg "title =" sss.jpg "/>


The specific error message on the AIX server is as follows:

Executing: db2 backup database BJMOA4 online load/usr/openv/netbackup/bin/nbdb2.sl64 OPEN 4 sessions buffer 1024

SQL2071N An error occurred while accessing the shared library

"/Usr/openv/netbackup/bin/nbdb2.sl64". Reason code: "2 ".

I. Analysis and check

1. Check SQL2071N

$ Db2? SQL2071N


SQL2071N An error occurred while accessing the shared library

"<Shr-lib-name>". Reason code: "<reason-code>"

Explanation:

An unexpected error occurred while accessing a vendor shared

Library during the processing of a database utility.

Following is a list of reason codes:

1 An invalid shared library path was encountered.

2 An attempt to load the backup shared library failed.

3 An error was encountered while unloading the shared library.

The utility stops processing.

User Response:

Ensure the shared library provided is valid and resubmit

Utility command or use another supported media.


2. Analyze the loading of shared libraries

# Ldd/usr/openv/netbackup/bin/nbdb2.sl64

/Usr/openv/netbackup/bin/nbdb2.sl64 needs:

/Usr/openv/lib/libxbsa64.so

/Usr/openv/lib/libVcvcomb64_noul.so

/Usr/lib/libc. a (shr_64.o)

/Usr/lib/libdl. a (shr_64.o)

/Unix

/Usr/lib/libcrypt. a (shr_64.o)

Use the LDD command to display the detailed information of the dependent Dynamic Connection Library as much as possible

Check whether all listed files exist as prompted. If not, you can copy the files from other normal backup machines.

3. Analyze CODE 2

# Cat/usr/include/sys/errno. h

# Define EPERM 1/* Operation not permitted */

# Define ENOENT 2/* No such file or directory */

# Define ESRCH 3/* No such process */

# Define EINTR 4/* interrupted system call */

# Define EIO 5/* I/O error */

# Define ENXIO 6/* No such device or address */

# Define E2BIG 7/* Arg list too long */

# Define ENOEXEC 8/* Exec format error */

# Define EBADF 9/* Bad file descriptor */

# Define ECHILD 10/* No child processes */

# Define EAGAIN 11/* Resource temporarily unavailable */

# Define ENOMEM 12/* Not enough space */

# Define EACCES 13/* Permission denied */

# Define EFAULT 14/* Bad address */

# Define ENOTBLK 15/* Block device required */

According to the prompt, it can be inferred that the relevant file or path is not found correctly.

4. Analyze the DB2diag. log File

DATA #3: String, 265 bytes

0509-022 Cannot load module/usr/openv/netbackup/bin/nbdb2.sl64 (shr. o ).

0509-153 File/usr/openv/netbackup/bin/nbdb2.sl64 is not an archive or

The file cocould not be read properly.

FUNCTION: DB2 UDB, database utilities, sqlubcka, probe: 140

MESSAGE: Backup Terminated.

Based on the above analysis, it is clear that the reading of the archive directory is incorrect.

5. Check whether archiving is enabled for the current database.

$ Db2 get db cfg for bjtt4 | grep-I log

Log retain for recovery enabled (LOGRETAIN) = RECOVERY

User exit for logging enabled (USEREXIT) = OFF

HADR log write synchronization mode (HADR_SYNCMODE) = NEARSYNC

First log archive method (LOGARCHMETH1) = LOGRETAIN

Archive is set, but the archive directory is not specified.

Ii. Solving Problems

$ Db2 update db cfg for bjtt4 using LOGARCHMETH1 "disk:/archive/db2log" run the following result: Log retain for recovery enabled ( LOGRETAIN) = RECOVERY
User exit for logging enabled (USEREXIT) = OFF
HADR log write synchronization mode (HADR_SYNCMODE) = NEARSYNC

First log archive method(LOGARCHMETH1) =DISK:/archivelog/db2log/

After this parameter is modified, the database needs to be restarted to take effect.

After the restart, the problem is resolved and you can back up the backup again.


In addition, if you encounter this problem during database recovery

Example: restore database epd from/db2 taken at 20130525112121 TO/db2/epp into epp newlogpath/db2/EPP/log_dir/WITH 2


Buffers buffer 1024 REDIRECT

SQL2529W Warning! Restoring to an existing database that is different from the backup image database, and the alias name "EPP" of the existing database does not match the alias name "EPD" of the backup image, and the database name "EPP" of the existing database does not match the database name "EPD" of the backup image. the target database will be overwritten by the backup version. the Roll-forward recovery logs associated with the target database will be deleted.

Do you want to continue? (Y/n) y

SQL2071N An error occurred while accessing the shared library

"/Db2/EPP/db2EPP/NODE0000/SQL00001/libdb2compr. a". Reason code: "2 ".


You can add the following parameters to the recovery script:

COMPRLIB/db2/db2EPP/sqllib/lib/libdb2compr.


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

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.