SQLPRIMARYKEYS已损坏 [英] SQLPRIMARYKEYS corrupted

查看:123
本文介绍了SQLPRIMARYKEYS已损坏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SYSIBM.SQLPRIMARYKEYS存储过程在我的一个
数据库中已损坏。我该如何重新创建呢?我试过重新绑定

调用sysproc.rebind_routine_package(''''',''SYSIBM.SQLPRIMARYKEYS'',

''ANY'')"但得到一个令人讨厌的-443错误。另外,我的SYSCAT.ROUTINEDEP表中不存在SQLPRIMARYKEYS条目



有没有办法从损坏的系统对象中恢复?

The SYSIBM.SQLPRIMARYKEYS stored procedure is corrupt in one of my
database. How do I go about re-creating this? I have tried rebinding
"call sysproc.rebind_routine_package(''P'', ''SYSIBM.SQLPRIMARYKEYS'',
''ANY'')" but get a nasty -443 error. Also, the SQLPRIMARYKEYS entry
does not exist in my SYSCAT.ROUTINEDEP table anymore.
Is there any way of recovering from corrupted system object?

推荐答案

2007年8月31日星期五00:15:53 -0700,Otto Carl Marte潦草地说:
On Fri, 31 Aug 2007 00:15:53 -0700, Otto Carl Marte scribbled:

SYSIBM.SQLPRIMARYKEYS存储过程在我的一个
数据库中已损坏。我该如何重新创建呢?我试过重新绑定

调用sysproc.rebind_routine_package(''''',''SYSIBM.SQLPRIMARYKEYS'',

''ANY'')"但得到一个令人讨厌的-443错误。此外,我的SYSCAT.ROUTINEDEP表中不存在SQLPRIMARYKEYS条目

。有没有办法从损坏的系统对象中恢复?b $ b?
The SYSIBM.SQLPRIMARYKEYS stored procedure is corrupt in one of my
database. How do I go about re-creating this? I have tried rebinding
"call sysproc.rebind_routine_package(''P'', ''SYSIBM.SQLPRIMARYKEYS'',
''ANY'')" but get a nasty -443 error. Also, the SQLPRIMARYKEYS entry does
not exist in my SYSCAT.ROUTINEDEP table anymore. Is there any way of
recovering from corrupted system object?



SYSIBM.SQLPRIMARYKEYS不是存储过程(至少在DB2 v8中不是用于LUW的
) - 它是一个视图我认为它打算供DB2 ODBC

驱动程序使用。因此,重新绑定不会有帮助,并且SYPRAT.ROUTINEDEP中不会出现



究竟是什么意思损坏" ;?它还在吗?你能查询

吗?什么(如果有的话)错误消息告诉你它已经损坏了?

干杯,


戴夫。

SYSIBM.SQLPRIMARYKEYS isn''t a stored procedure (at least, not in DB2 v8
for LUW) - it''s a view which I think is intended for use by the DB2 ODBC
driver. Hence, rebind isn''t going to help and SQLPRIMARYKEYS shouldn''t
appear in SYSCAT.ROUTINEDEP.

What exactly do you mean by "corrupted"? Is it still there? Can you query
it? What (if any) error message has told you it''s corrupted?
Cheers,

Dave.


虽然有一个名为SYSIBM.SQLPRIMARYKEYS的视图,但在Db2 v8和DB2 v9上也有一个名为SYSIBM.SQLPRIMARYKEYS的

例程。这个

存储过程具有以下签名

SYSIBM.SQLPRIMARYKEYS(catalog_name,schema_name,table_name,options)

由DB2 ODBC使用驱动程序。


这是ODBC跟踪:


SQLPrimaryKeysW(hStmt = 1:2,szTableQualifier =" REALTIME",
cbTableQualifier = -3,szTableOwner =" REALTIME",cbTableOwner = -3,

szTableName =" TASKS",cbTableName = -3)

---时间流逝 - + 1.960000E-004秒

(StmtOut =" CALL SYSIBM.SQLPRIMARYKEYS(?,?,?,?)")

( Package =" SYSSH200",Section = 5)

(行= 1,iPar = 1,fCType = SQL_C_CHAR,rgbValue =< NULL指针>,

pcbValue = -1,piIndicatorPtr = -1)

(行= 1,iPar = 2,fCType = SQL_C_CHAR,rgbValue =" REALTIME" -

x''5245414C54494D45' ',pcbValue = 8,piIndicatorPtr = 8)

(行= 1,iPar = 3,fCType = SQL_C_CHAR,rgbValue =" TASKS" - x''5441534B53'',

pcbValue = 5,piIndicatorPtr = 5)

(行= 1,iPar = 4,fCType = SQL_C_CHAR,rgbValue =" DATATYPE = '' ODBC '';" -

x''44415441545950453D274F444243273B'',pcbValue = 16,piIndicatorPtr = 16)

(ROLLBACK REQUESTED = 1)

(ROLLBACK REPLY RECEIEVED = 1)


SQLPrimaryKeysW()

< --- SQL_ERROR时间已过 - + 3.717500E-002秒


SQLGetDiagFieldW(fHandleType = SQL_HANDLE_STMT,hHandle = 1:2,

iRecNumber = 1,fDiagIdentifier = SQL_DIAG_SQLSTATE,pDiagInfo =& 0012ea38,

cbDiagInfoMax = 12,pcbDiagInfo =< NULL指针)

---已用时间 - + 1.640000E-004秒

SQLGetDiagFieldW(pDiagInfo =" 38553")

< --- SQL_SUCCESS时间已过 - + 1.645000E-003秒

SQLGetDiagFieldW(fHandleType = SQL_HANDLE_STMT,hHandle = 1:2,

iRecNumber = 2,fDiagIdentifier = SQL_DIAG_SQLSTATE,pDiagInfo =& 0012ea38,

cbDiagInfoMax = 12,pcbDiagInfo =< NULL指针)

---时间已过 - + 1.570000E-004秒

SQLGetDiagFieldW()

< --- SQL_NO_DATA_FOUND时间已过 - + 1.471000E-003秒

SQLGetDiagRecW(fHandleType = SQL_HANDLE_STMT,hHandle = 1:2,

iRecNumber = 1,pszSqlState =& 0012ea6c,pfNativeError =& 0012e650,

pszErrorMsg =& 0012e66c,cbErrorMsgMax = 512,pcbErrorMsg =& 0012e654)

---时间已过 - + 1.930000E-004秒

(iRowNumber = -1,iColumnNumber = -2)

SQLGetDiagRecW(pszSqlState =" ; 38553",pfNativeError = -443,

pszErrorMsg =" [IBM] [CLI驱动程序] [DB2 / AIX64] SQL0443N例程

" SYSIBM.SQLPRIMARYKEYS" (特定名称PRIMARYKEYS)已返回

错误SQLSTATE,诊断文本为SYSIBM:CLI:-805。 SQLSTATE = 38553

",pcbErrorMsg = 189)

< --- SQL_SUCCESS时间已过 - + 3.725000E-003秒


你可以看到它的错误-805即找不到包。因此,我的

问题如何重新创建此存储过程?有可能

重新创建系统程序吗?

Although there is a view called SYSIBM.SQLPRIMARYKEYS there is also a
routine called SYSIBM.SQLPRIMARYKEYS on both Db2 v8 and DB2 v9. This
stored procedure has the following signature
SYSIBM.SQLPRIMARYKEYS(catalog_name , schema_name, table_name, options)
which is used by the DB2 ODBC Driver.

Here is the ODBC trace:

SQLPrimaryKeysW( hStmt=1:2, szTableQualifier="REALTIME",
cbTableQualifier=-3, szTableOwner="REALTIME", cbTableOwner=-3,
szTableName="TASKS", cbTableName=-3 )
---Time elapsed - +1.960000E-004 seconds
( StmtOut="CALL SYSIBM.SQLPRIMARYKEYS(?,?,?,?)" )
( Package="SYSSH200 ", Section=5 )
( Row=1, iPar=1, fCType=SQL_C_CHAR, rgbValue=<NULL pointer>,
pcbValue=-1, piIndicatorPtr=-1 )
( Row=1, iPar=2, fCType=SQL_C_CHAR, rgbValue="REALTIME" -
x''5245414C54494D45'', pcbValue=8, piIndicatorPtr=8 )
( Row=1, iPar=3, fCType=SQL_C_CHAR, rgbValue="TASKS" - x''5441534B53'',
pcbValue=5, piIndicatorPtr=5 )
( Row=1, iPar=4, fCType=SQL_C_CHAR, rgbValue="DATATYPE=''ODBC'';" -
x''44415441545950453D274F444243273B'', pcbValue=16, piIndicatorPtr=16 )
( ROLLBACK REQUESTED=1 )
( ROLLBACK REPLY RECEIEVED=1 )

SQLPrimaryKeysW( )
<--- SQL_ERROR Time elapsed - +3.717500E-002 seconds

SQLGetDiagFieldW( fHandleType=SQL_HANDLE_STMT, hHandle=1:2,
iRecNumber=1, fDiagIdentifier=SQL_DIAG_SQLSTATE, pDiagInfo=&0012ea38,
cbDiagInfoMax=12, pcbDiagInfo=<NULL pointer)
---Time elapsed - +1.640000E-004 seconds

SQLGetDiagFieldW( pDiagInfo="38553" )
<--- SQL_SUCCESS Time elapsed - +1.645000E-003 seconds

SQLGetDiagFieldW( fHandleType=SQL_HANDLE_STMT, hHandle=1:2,
iRecNumber=2, fDiagIdentifier=SQL_DIAG_SQLSTATE, pDiagInfo=&0012ea38,
cbDiagInfoMax=12, pcbDiagInfo=<NULL pointer)
---Time elapsed - +1.570000E-004 seconds

SQLGetDiagFieldW( )
<--- SQL_NO_DATA_FOUND Time elapsed - +1.471000E-003 seconds

SQLGetDiagRecW( fHandleType=SQL_HANDLE_STMT, hHandle=1:2,
iRecNumber=1, pszSqlState=&0012ea6c, pfNativeError=&0012e650,
pszErrorMsg=&0012e66c, cbErrorMsgMax=512, pcbErrorMsg=&0012e654 )
---Time elapsed - +1.930000E-004 seconds
( iRowNumber=-1, iColumnNumber=-2 )

SQLGetDiagRecW( pszSqlState="38553", pfNativeError=-443,
pszErrorMsg="[IBM][CLI Driver][DB2/AIX64] SQL0443N Routine
"SYSIBM.SQLPRIMARYKEYS" (specific name "PRIMARYKEYS") has returned an
error SQLSTATE with diagnostic text "SYSIBM:CLI:-805". SQLSTATE=38553

", pcbErrorMsg=189 )
<--- SQL_SUCCESS Time elapsed - +3.725000E-003 seconds

As you can see its the error -805 i.e Package not found. Hence my
question "how do I recreate this stored procedure?" Is it possible to
recreate system procedures?


您好奥托,


你有没有把db2schema.bnd绑定到你的db?


希望这会有所帮助,


JM


Otto Carl Marte < Ot ******** @ gmail.comwrote in message

news:11 ********************** @ k79g2000hse.googlegr oups.com ...
Hi Otto,

Have you bound the db2schema.bnd to your db ?

hope this helps,

JM

"Otto Carl Marte" <Ot********@gmail.comwrote in message
news:11**********************@k79g2000hse.googlegr oups.com...

虽然有一个名为SYSIBM.SQLPRIMARYKEYS的视图,但还有一个名为SYSIBM的

例程Db2 v8和DB2 v9上的.SQLPRIMARYKEYS。这个

存储过程具有以下签名

SYSIBM.SQLPRIMARYKEYS(catalog_name,schema_name,table_name,options)

由DB2 ODBC使用驱动程序。


这是ODBC跟踪:


SQLPrimaryKeysW(hStmt = 1:2,szTableQualifier =" REALTIME",
cbTableQualifier = -3,szTableOwner =" REALTIME",cbTableOwner = -3,

szTableName =" TASKS",cbTableName = -3)

---时间流逝 - + 1.960000E-004秒

(StmtOut =" CALL SYSIBM.SQLPRIMARYKEYS(?,?,?,?)")

( Package =" SYSSH200",Section = 5)

(行= 1,iPar = 1,fCType = SQL_C_CHAR,rgbValue =< NULL指针>,

pcbValue = -1,piIndicatorPtr = -1)

(行= 1,iPar = 2,fCType = SQL_C_CHAR,rgbValue =" REALTIME" -

x''5245414C54494D45' ',pcbValue = 8,piIndicatorPtr = 8)

(行= 1,iPar = 3,fCType = SQL_C_CHAR,rgbValue =" TASKS" - x''5441534B53'',

pcbValue = 5,piIndicatorPtr = 5)

(行= 1,iPar = 4,fCType = SQL_C_CHAR,rgbValue =" DATATYPE = '' ODBC '';" -

x''44415441545950453D274F444243273B'',pcbValue = 16,piIndicatorPtr = 16)

(ROLLBACK REQUESTED = 1)

(ROLLBACK REPLY RECEIEVED = 1)


SQLPrimaryKeysW()

< --- SQL_ERROR时间已过 - + 3.717500E-002秒


SQLGetDiagFieldW(fHandleType = SQL_HANDLE_STMT,hHandle = 1:2,

iRecNumber = 1,fDiagIdentifier = SQL_DIAG_SQLSTATE,pDiagInfo =& 0012ea38,

cbDiagInfoMax = 12,pcbDiagInfo =< NULL指针)

---已用时间 - + 1.640000E-004秒

SQLGetDiagFieldW(pDiagInfo =" 38553")

< --- SQL_SUCCESS时间已过 - + 1.645000E-003秒

SQLGetDiagFieldW(fHandleType = SQL_HANDLE_STMT,hHandle = 1:2,

iRecNumber = 2,fDiagIdentifier = SQL_DIAG_SQLSTATE,pDiagInfo =& 0012ea38,

cbDiagInfoMax = 12,pcbDiagInfo =< NULL指针)

---时间已过 - + 1.570000E-004秒

SQLGetDiagFie ldW()

< --- SQL_NO_DATA_FOUND时间已过 - + 1.471000E-003秒

SQLGetDiagRecW(fHandleType = SQL_HANDLE_STMT,hHandle = 1:2,

iRecNumber = 1,pszSqlState =& 0012ea6c,pfNativeError =& 0012e650,

pszErrorMsg =& 0012e66c,cbErrorMsgMax = 512,pcbErrorMsg =& 0012e654)

---经过的时间 - + 1.930000E-004秒

(iRowNumber = -1,iColumnNumber = -2)

SQLGetDiagRecW (pszSqlState =" 38553",pfNativeError = -443,

pszErrorMsg =" [IBM] [CLI Driver] [DB2 / AIX64] SQL0443N Routine

" SYSIBM .SQLPRIMARYKEYS" (特定名称PRIMARYKEYS)已返回

错误SQLSTATE,诊断文本为SYSIBM:CLI:-805。 SQLSTATE = 38553

",pcbErrorMsg = 189)

< --- SQL_SUCCESS时间已过 - + 3.725000E-003秒


你可以看到它的错误-805即找不到包。因此,我的

问题如何重新创建此存储过程?是否有可能重建系统程序?
Although there is a view called SYSIBM.SQLPRIMARYKEYS there is also a
routine called SYSIBM.SQLPRIMARYKEYS on both Db2 v8 and DB2 v9. This
stored procedure has the following signature
SYSIBM.SQLPRIMARYKEYS(catalog_name , schema_name, table_name, options)
which is used by the DB2 ODBC Driver.

Here is the ODBC trace:

SQLPrimaryKeysW( hStmt=1:2, szTableQualifier="REALTIME",
cbTableQualifier=-3, szTableOwner="REALTIME", cbTableOwner=-3,
szTableName="TASKS", cbTableName=-3 )
---Time elapsed - +1.960000E-004 seconds
( StmtOut="CALL SYSIBM.SQLPRIMARYKEYS(?,?,?,?)" )
( Package="SYSSH200 ", Section=5 )
( Row=1, iPar=1, fCType=SQL_C_CHAR, rgbValue=<NULL pointer>,
pcbValue=-1, piIndicatorPtr=-1 )
( Row=1, iPar=2, fCType=SQL_C_CHAR, rgbValue="REALTIME" -
x''5245414C54494D45'', pcbValue=8, piIndicatorPtr=8 )
( Row=1, iPar=3, fCType=SQL_C_CHAR, rgbValue="TASKS" - x''5441534B53'',
pcbValue=5, piIndicatorPtr=5 )
( Row=1, iPar=4, fCType=SQL_C_CHAR, rgbValue="DATATYPE=''ODBC'';" -
x''44415441545950453D274F444243273B'', pcbValue=16, piIndicatorPtr=16 )
( ROLLBACK REQUESTED=1 )
( ROLLBACK REPLY RECEIEVED=1 )

SQLPrimaryKeysW( )
<--- SQL_ERROR Time elapsed - +3.717500E-002 seconds

SQLGetDiagFieldW( fHandleType=SQL_HANDLE_STMT, hHandle=1:2,
iRecNumber=1, fDiagIdentifier=SQL_DIAG_SQLSTATE, pDiagInfo=&0012ea38,
cbDiagInfoMax=12, pcbDiagInfo=<NULL pointer)
---Time elapsed - +1.640000E-004 seconds

SQLGetDiagFieldW( pDiagInfo="38553" )
<--- SQL_SUCCESS Time elapsed - +1.645000E-003 seconds

SQLGetDiagFieldW( fHandleType=SQL_HANDLE_STMT, hHandle=1:2,
iRecNumber=2, fDiagIdentifier=SQL_DIAG_SQLSTATE, pDiagInfo=&0012ea38,
cbDiagInfoMax=12, pcbDiagInfo=<NULL pointer)
---Time elapsed - +1.570000E-004 seconds

SQLGetDiagFieldW( )
<--- SQL_NO_DATA_FOUND Time elapsed - +1.471000E-003 seconds

SQLGetDiagRecW( fHandleType=SQL_HANDLE_STMT, hHandle=1:2,
iRecNumber=1, pszSqlState=&0012ea6c, pfNativeError=&0012e650,
pszErrorMsg=&0012e66c, cbErrorMsgMax=512, pcbErrorMsg=&0012e654 )
---Time elapsed - +1.930000E-004 seconds
( iRowNumber=-1, iColumnNumber=-2 )

SQLGetDiagRecW( pszSqlState="38553", pfNativeError=-443,
pszErrorMsg="[IBM][CLI Driver][DB2/AIX64] SQL0443N Routine
"SYSIBM.SQLPRIMARYKEYS" (specific name "PRIMARYKEYS") has returned an
error SQLSTATE with diagnostic text "SYSIBM:CLI:-805". SQLSTATE=38553

", pcbErrorMsg=189 )
<--- SQL_SUCCESS Time elapsed - +3.725000E-003 seconds

As you can see its the error -805 i.e Package not found. Hence my
question "how do I recreate this stored procedure?" Is it possible to
recreate system procedures?



这篇关于SQLPRIMARYKEYS已损坏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆