Greetings!
I am using DBD::DB2 as part of an automation system for the deployment
of stored procedures. The deployment of the stored procedures is
successful, but in the course of reloading the procs, parent procs (ie,
that CALL to a child proc we just reloaded) get set to invalid. This is
not normally an issue, as invalid procs get rebound at runtime. However,
as this is an automated process, we'd like to force the rebind during
our transaction, so that if somebody breaks something, we catch it and
roll back the transaction, rather than propagating errors into the
runtime environment.
However, when I execute a statement like:
REBIND PACKAGE LK.P0343993
it fails with the following error:
[IBM][CLI Driver][DB2/6000] SQL0104N An unexpected token "BIND" was
found following "BEGIN-OF-STATEMENT". Expected tokens may include:
"EXPAND". SQLSTATE=42601
I suspect, although I haven't been able to confirm it yet, that REBIND
isn't actually a valid SQL statement, and is rather a db2 specific
command, which is why the statement fails with that error. I can, in a
command line, run the statement:
db2 REBIND PACKAGE LK.P0343993
and it works successfully.
My question is twofold:
1) Is the REBIND (or just BIND) a valid statement, which I believe it is
not
2) Is there a way to call the REBIND directly, without preparing a
statement, in such a way that I can continue to use the DBD::DB2 module
to complete this task.
Please let me know if there are additional details that would help in
answering these questions.
Thanks!
Dave Sorenson
Senior Web Administrator
Jackson National Life Insurance
[EMAIL PROTECTED]