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 > Access Plan for stored procedure

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-24-07, 09:52
nick.ncs nick.ncs is offline
Registered User
 
Join Date: May 2007
Location: somewhere in dbforums
Posts: 221
Access Plan for stored procedure

Is there any way to get an access plan for db2 stored procedure......the same way as we get the access plan for a sql query
Reply With Quote
  #2 (permalink)  
Old 08-24-07, 10:47
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Find its corresponding package name and run db2expln for that package.
Reply With Quote
  #3 (permalink)  
Old 08-24-07, 10:47
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Yes, you have to determine the package name, then run db2expln on that package.

Andy
Reply With Quote
  #4 (permalink)  
Old 08-25-07, 02:48
nick.ncs nick.ncs is offline
Registered User
 
Join Date: May 2007
Location: somewhere in dbforums
Posts: 221
can you give me the syntax i was not able to find one

One i tried out is
db2expln -schema SCHEMA-NAME -package PACKAGE-NAME

which ofcourse gave a syntax error
Reply With Quote
  #5 (permalink)  
Old 08-25-07, 12:50
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Did you try the Command Reference manual? All the manuals are downloadable for free from the IBM website.
__________________
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 08-26-07, 12:02
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
A package contains (usually) more than a single SQL statement. That's why you should also specify the -section option.

And what exactly was the error message you got with your example? I would expect something like "database not specified" or so because you have no -d option. But that's just a guess...
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
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