If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Rebind not necessary in this case?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-29-10, 11:41
db2user24 db2user24 is offline
Registered User
 
Join Date: Nov 2007
Posts: 248
Rebind not necessary in this case?

Hello,

I was trying to get two stored procedures that call each other setup. I was recommended to try this out --

1) create TEST1 without the call to TEST2
2) create TEST2
3) recreate TEST1 with the call to TEST2
4) REBIND TEST2

The call to TEST1 worked just fine without executing step 4. In the past, whenever I have dropped any functions / procedures it has marked it as inoperative so I was expecting it to complain this time as well since I dropped and then created TEST1. Do you think that it's necessary to rebind the packages even though it works just fine right now? Is it possible that it might fail someday with the way I have it currently setup? Thanks!
Reply With Quote
  #2 (permalink)  
Old 04-29-10, 12:42
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
When a dependent object is dropped, then the package using that object is marked as invalid. The next time that package is executed, DB2 attempts an automatic rebind, and if the rebind succeeds everything is fine. If the rebind fails because the dependent object is still missing at auto rebind time, then the package is marked as inoperative, and a manual rebind will need to be performed.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #3 (permalink)  
Old 04-29-10, 12:50
dbzTHEdinosaur dbzTHEdinosaur is offline
Registered User
 
Join Date: Jun 2007
Location: germany
Posts: 96
Quote:
DB2 attempts an automatic rebind, and if the rebind succeeds everything is fine
does that mean then the package using that object is marked as valid
__________________
Dick Brenholtz, Ami in Deutschland
Reply With Quote
  #4 (permalink)  
Old 04-29-10, 12:56
db2user24 db2user24 is offline
Registered User
 
Join Date: Nov 2007
Posts: 248
Quote:
Originally Posted by Marcus_A View Post
When a dependent object is dropped, then the package using that object is marked as invalid. The next time that package is executed, DB2 attempts an automatic rebind, and if the rebind succeeds everything is fine. If the rebind fails because the dependent object is still missing at auto rebind time, then the package is marked as inoperative, and a manual rebind will need to be performed.
Thanks Marcus...I just thought I'd ask since this is the first time I've seen it NOT complain when something was dropped and was wondering if I should rebind it manually just in case it fails in the future. It seems like the automatic rebind worked in this case? Do you recommend performing a manual rebind just to be safe?
Reply With Quote
  #5 (permalink)  
Old 04-29-10, 13:17
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Quote:
Originally Posted by db2user24 View Post
Thanks Marcus...I just thought I'd ask since this is the first time I've seen it NOT complain when something was dropped and was wondering if I should rebind it manually just in case it fails in the future. It seems like the automatic rebind worked in this case? Do you recommend performing a manual rebind just to be safe?
As long as it is working, and status of package is not invalid or inoperative, then no manual rebind is necessary. This is a key feature of relational database architecture.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #6 (permalink)  
Old 04-29-10, 15:24
db2user24 db2user24 is offline
Registered User
 
Join Date: Nov 2007
Posts: 248
Thanks Marcus.. I will leave it as is since it seems to be working A-ok..
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On