Results 1 to 2 of 2
  1. #1
    Join Date
    May 2015

    Unanswered: Different versions of same stored procedure?


    I have a stored procedure and it is called with a start and stop time.
    For some time periods it will hide some of the fields in the stored procedure, which it should not.
    I have deployed the code with a hardcoded test column so it will start with "1" and this column
    is hidden if you use certain timeperiodes, even if it always should be shown
    since is is "Select "1", col2, col3..."

    I have used:
    select * from syscat.procedures where procschema = 'myschema'

    and there is only one occurence of the stored procedure there with the
    correct CREATE_TIME and TEXT_BODY_.

    I am wondering if some old version of the stored procedure is runned when certain timeperiods are
    used. Does anybody know how I can check this, or what the problem is here?

  2. #2
    Join Date
    Apr 2012
    Provided Answers: 27
    Multiple versions of the same sproc can exist in the same schema only if the signature is different.
    Always create your sprocs with a unique 'specific name' (refer to the docs for the syntax for your version and o/s platform).
    That makes it easier to distinguish sprocs in the catalog (if you use a naming convention that uses helpful specific-names) .
    The catalog shows the signatures (and the sproc code, if that sproc is written in SQL PL or similar) and you can also use db2look to extract SQL PL procedure code.
    Last edited by db2mor; 05-11-15 at 18:51.

Posting Permissions

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