Results 1 to 6 of 6
  1. #1
    Join Date
    May 2007
    Location
    somewhere in dbforums
    Posts
    221

    Unanswered: 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

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Find its corresponding package name and run db2expln for that package.
    ---
    "It does not work" is not a valid problem statement.

  3. #3
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Yes, you have to determine the package name, then run db2expln on that package.

    Andy

  4. #4
    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

  5. #5
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    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

  6. #6
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •