程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> SqlServer數據庫 >> 關於SqlServer >> DB2 “SQL0805N 找不到程序包”錯誤解析

DB2 “SQL0805N 找不到程序包”錯誤解析

編輯:關於SqlServer

今天所做的程序最後封版,封版前覺得程序有一個地方讓我很不爽,於是就進行了一下修改,改動其實很小,只是在if裡面增加了一個判斷條件,結果程序運行的時候開始報數據庫系統錯誤,錯誤內容如下:

 

[DB2/NT] SQL0805N  找不到程序包 "NULLID.SYSLH203 0X5359534C564C3031"。  SQLSTATE=51002

 

到網上查找錯誤的原因,結果關於這方面的內容少之又少,Google中只找到兩個網頁,裡面倒是提供了解決方案,不過原因不是很詳細。繼續搜索,最後在IBM官方網站上找到一個還算清楚的解釋:

 

Solution

Depending on the type of statement you are executing, DB2 will use a particular package on the server. By default, DB2 creates three packages for each type of package. In this case NULLID.SYSLH2yy is reserved for statements with CURSORHOLD on and isolation level Cursor Stability. The package SYSLH203 means that DB2 is looking for the 4th package (200 is first, 201 is second, etc) of this type, but it does not exist. You can create more packages on the server by connecting to the database and issuing the following bind command from the /sqllib/bnd directory:

 

db2 bind @db2cli.lst blocking all grant public sqlerror continue CLIPKG 5

Note: CLIPKG 5 will create 5 large packages, and will give you the package that your application is looking for, as well as one more in this case.

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved