In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how to deal with error 6 in nbu backup db2 database. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
NBU reported error 6 when backing up the DB2 database on an AIX server.
Screenshot of error:
Run the backup script on the AIX server with the following error message:
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 inspection
1. Check SQL2071N
$db2? SQL2071N
SQL2071N An error occurred while accessing the shared library
"". Reason code: ""
Explanation:
An unexpected error occurred while accessing a vendor shared
Library during the processing of a database utility. The
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 the
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 as much detail as possible about the dependent dynamic link libraries
Follow the prompts to check whether all the listed files exist, and if not, you can copy them from other machines that can be backed up normally.
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 / * Iram 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 was not found or the path is incorrect.
4. Analyze DB2diag.log files
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 could not be read properly.
FUNCTION: DB2 UDB, database utilities, sqlubcka, probe:140
MESSAGE: Backup Terminated.
According to the above analysis, it is certain that the archive directory is not read correctly.
5. Check whether archiving is enabled in 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
It was found that archiving was set, but the archive directory was not specified.
Second, solve the problem
$db2 update db cfg for bjtt4 using LOGARCHMETH1 "disk:/archive/db2log"
The results are as follows:
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 restarting, it is found that the problem has been resolved and can be backed up normally again.
In addition, if you are doing database recovery, you encounter this problem.
For 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 p_w_picpath database, and the alias name "EPP" of the existing database does not match the alias name "EPD" of the backup p_w_picpath, and the database name "EPP" of the existing database does not match the database name "EPD" of the backup p_w_picpath. 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? (YBO) 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.a
Add:
SQL2071N An error occurred while accessing the shared library
"/ usr/openv/netbackup/bin/nbdb2.sl64" Reason code: "2".
Another reason for this problem is that if your server is equipped with a 32-bit NBU client, you can't use the nbdb2.sl64 file. Instead, you should specify in the script that you should use the 32-bit nbdb2.sl file. This problem has nothing to do with your server being 64-bit.
(# Change MY_LIB to the correct NetBackup library name for your host:
# Solaris or Linux 32-bit = nbdb2.so
# Solaris 64-bit = nbdb2.so64
# AIX or HPUX 32-bit = nbdb2.sl
# AIX or HPUX 64-bit = nbdb2.sl64)
Thank you for reading! On "nbu backup db2 database error 6 how to deal with" this article is shared here, I hope the above content can be of some help to you, so that you can learn more knowledge, if you think the article is good, you can share it out for more people to see it!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.