Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / April 2005

Tip: Looking for answers? Try searching our database.

Revalidating all inoperative packages from SQL (not CLP!)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gustavo Randich - 08 Apr 2005 14:57 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.