db2 list of stored procedure in a database

38,524

Cut down the details... this will just show you the procedure names:

SELECT procname FROM syscat.procedures WHERE procschema = 'MYSCHEMA'

Share:
38,524
Abruzzo Forte e Gentile
Author by

Abruzzo Forte e Gentile

Updated on September 25, 2020

Comments

  • Abruzzo Forte e Gentile
    Abruzzo Forte e Gentile over 3 years

    I would like to have the list of stored procedure created in a certain database. I tried

    db2 "display procedure MyDb.*"
    

    But I get error

    DB21034E  The command was processed as an SQL statement because it was not a 
    valid Command Line Processor command.  During SQL processing it returned:
    SQL0104N  An unexpected token "procedure" was found following "display ".  
    Expected tokens may include:  "JOIN <joined_table>".  SQLSTATE=42601
    

    In another forum I read that I have to query the table syscat.procedures

    but if I call

    db2 "select * from syscat.procedures"

    I get a lot of data I cannot really understand.