Hello,
Is there a way to revalidate (rebind) all inoperative packages
(SYSCAT.PACKAGES.VALID = 'X') via a stored procedure that scans invalid
packages from SYSCAT.PACKAGES and execute the CLP command REBIND or
something similar?
I need this because db2rbind doesn't fix inoperative ('X') packages,
and I need a script runnable from SQL console (NOT CLP console!) which
fixes all of them at once.
Thank you!
James Campbell - 12 Apr 2005 00:58 GMT
I imagine that if you write the SP in a convient language you could call
the sqlarbnd/sqlgrbnd API to do the rebind.
Alternately wait for FP8. Apparently several DB2 commands are going to
have a call stored procedure interface - maybe rebind will be one.
James Campbell
James Campbell - 12 Apr 2005 00:59 GMT
Finger problem. It's FP9 that is getting the call sp interface.
James
bughunter@ru - 12 Apr 2005 07:52 GMT
Be careful! Rebind will not FIX invalid packages. For example,
create table t1(c1,c2);
create procedure test ...language SQL... select c2 from t1 ...
drop table t1;
-- package now invalid
create table t1(c1); -- no column c2
rebind test_package;
-- package now VALID (!)
call test();
-- error...
tested on 7.2
Andy