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 > packahge Stored Procedure

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-03-07, 19:40
udbdb2 udbdb2 is offline
Registered User
 
Join Date: Nov 2003
Posts: 121
packahge Stored Procedure

any way to deal with pkg or SP specially ?
we have some query has good access plan but still process is running slow?

TIA.
any guidelines on Package/Stored Procedure handling would be gratly appreciated.
Reply With Quote
  #2 (permalink)  
Old 01-04-07, 08:01
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
I am not sure that I understand what you are looking for. You need to state your DB2 version and OS.

For DB2 LUW V8.2, your have the option of setting of setting precompile and bind options when creating an SQL stored procedure. This will explain it:

http://publib.boulder.ibm.com/infoce...d/t0006584.htm

For packages, you can use the REBIND command with the REOPT clause to affect the access plan:

http://publib.boulder.ibm.com/infoce...e/r0001990.htm

HTH

Andy
Reply With Quote
  #3 (permalink)  
Old 01-04-07, 23:18
udbdb2 udbdb2 is offline
Registered User
 
Join Date: Nov 2003
Posts: 121
8.2 FP-13 SP -package

We have 8.2 wth FP-13.
We see some strage behavious like it works well for certain thousands row and after that it doesnt move for slect/insert activities.
Reply With Quote
  #4 (permalink)  
Old 01-04-07, 23:21
udbdb2 udbdb2 is offline
Registered User
 
Join Date: Nov 2003
Posts: 121
can't open the link

ARWinner:
I can not open the link you sent.
would you resend the link?
Thanks!
Reply With Quote
  #5 (permalink)  
Old 01-05-07, 01:12
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
In order to make sure that you are not in a lock-wait situation, change the following parm.

db2 connect to <db-name>
db2 update db cfg using locktimeout 15
db2 force application all (or db2stop and db2start)

If you have a lock-wait problem longer than 15 seconds, your application error with a -911 reason code 68.
__________________
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 01-05-07, 07:59
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
If you are having trouble opening the links, just goto the DB2 online documentation and search for "prepopts" for the first link and lookup the "REBIND" command for the second.

Maybe if you posted the code for the SP you are having trouble with, we could give you a better answer.

Andy
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