nbu備份db2數(shù)據(jù)庫(kù)6號(hào)錯(cuò)誤如何處理

這篇文章給大家分享的是有關(guān)nbu備份db2數(shù)據(jù)庫(kù)6號(hào)錯(cuò)誤如何處理的內(nèi)容。小編覺得挺實(shí)用的,因此分享給大家做個(gè)參考,一起跟隨小編過來看看吧。

十年的麻陽(yáng)網(wǎng)站建設(shè)經(jīng)驗(yàn),針對(duì)設(shè)計(jì)、前端、開發(fā)、售后、文案、推廣等六對(duì)一服務(wù),響應(yīng)快,48小時(shí)及時(shí)工作處理。全網(wǎng)營(yíng)銷推廣的優(yōu)勢(shì)是能夠根據(jù)用戶設(shè)備顯示端的尺寸不同,自動(dòng)調(diào)整麻陽(yáng)建站的顯示方式,使網(wǎng)站能夠適用不同顯示終端,在瀏覽器中調(diào)整網(wǎng)站的寬度,無論在任何一種瀏覽器上瀏覽網(wǎng)站,都能展現(xiàn)優(yōu)雅布局與設(shè)計(jì),從而大程度地提升瀏覽體驗(yàn)。成都創(chuàng)新互聯(lián)從事“麻陽(yáng)網(wǎng)站設(shè)計(jì)”,“麻陽(yáng)網(wǎng)站推廣”以來,每個(gè)客戶項(xiàng)目都認(rèn)真落實(shí)執(zhí)行。

  NBU在備份一臺(tái)AIX服務(wù)器上的DB2數(shù)據(jù)庫(kù)時(shí),報(bào)6號(hào)錯(cuò)誤。

  報(bào)錯(cuò)截圖:

nbu備份db2數(shù)據(jù)庫(kù)6號(hào)錯(cuò)誤如何處理

nbu備份db2數(shù)據(jù)庫(kù)6號(hào)錯(cuò)誤如何處理

在AIX服務(wù)器上運(yùn)行備份腳本,具體報(bào)錯(cuò)信息如下:

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".

一、分析檢查

1、檢查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.  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、分析共享庫(kù)的載入

# 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)

使用LDD命令可顯示所依賴的動(dòng)態(tài)連接庫(kù)的盡可能的詳細(xì)信息

根據(jù)提示去檢查列出的文件是否都存在,如果不存在可以從其他正??蓚浞莸臋C(jī)器上拷貝。

3、分析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                */

根據(jù)提示,可推斷沒有找到相關(guān)文件或路徑不正確

4、分析DB2diag.log文件

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.

根據(jù)以上的分析,可確知?dú)w檔目錄讀取不正確

5、檢查當(dāng)前數(shù)據(jù)庫(kù)是否開啟歸檔

$ 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

發(fā)現(xiàn)設(shè)置了歸檔,但歸檔目錄沒指定

二、解決問題

$db2 update db cfg for bjtt4 using LOGARCHMETH1 "disk:/archive/db2log"

運(yùn)行后結(jié)果如下:

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/

這個(gè)參數(shù)修改后,需要重啟數(shù)據(jù)庫(kù)才能生效。

重啟后,發(fā)現(xiàn)問題已解決,可以重新正常備份了。

另外如果你是在做數(shù)據(jù)庫(kù)恢復(fù)時(shí),遇到這樣的問題

例如: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 ? (y/n) y

SQL2071N  An error occurred while accessing the shared library

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

可以在恢復(fù)腳本上增加以下參數(shù)即可:

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

補(bǔ)充:

SQL2071N  An error occurred while accessing the shared library

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

這個(gè)問題的另外一種原因就是你的服務(wù)器如果裝的是32位的NBU客戶端,則不能使用nbdb2.sl64這個(gè)文件,而應(yīng)該在腳本中指明使用nbdb2.sl這個(gè)32位的文件。這個(gè)問題跟你的服務(wù)器是64位的無關(guān)。

(# 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)

感謝各位的閱讀!關(guān)于“nbu備份db2數(shù)據(jù)庫(kù)6號(hào)錯(cuò)誤如何處理”這篇文章就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,讓大家可以學(xué)到更多知識(shí),如果覺得文章不錯(cuò),可以把它分享出去讓更多的人看到吧!

文章標(biāo)題:nbu備份db2數(shù)據(jù)庫(kù)6號(hào)錯(cuò)誤如何處理
地址分享:http://muchs.cn/article2/iepeoc.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站維護(hù)企業(yè)建站、網(wǎng)站建設(shè)、App設(shè)計(jì)網(wǎng)站導(dǎo)航、小程序開發(fā)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

成都定制網(wǎng)站建設(shè)