Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2011
    Posts
    10

    Question Unanswered: How to know all the db's procedures

    Hello

    How can I know the name of all the procedures that exist in a specific database??

  2. #2
    Join Date
    Oct 2007
    Posts
    4
    Hi Fernando.

    You can do it by two ways:

    1.- Use "dbaccess" utility: dbaccess -> Database -> Select -> "choose your database" -> Info -> Routine

    2.- Use "dbschema" utility: From the propmpt shell type:
    dbschema -q -f all -d yourdatabase output_filename

    You´ll get a file named output_filename with the SQL to create all procedures.

  3. #3
    Join Date
    Sep 2011
    Posts
    3

    List all database procedures

    Hi,

    The following should produce a list of all procedures in database your_database_name :

    dbschema -d your_database_name | awk '/CREATE PROCEDURE/ {print substr($3,index($3,"(")-1)}'

    Cheers,
    Brent.

  4. #4
    Join Date
    Sep 2011
    Location
    Pont l'Abbé, Brittany, France
    Posts
    381
    Provided Answers: 1
    Hi Fernando,

    just use dbschema with the right option:
    Code:
    dbschema -d databasename -f all
    this will list you all the functions and stored procedures source code for your database.

    If you just want the procedures names:
    Code:
    dbaccess databasename
    Query/New/
    type:
    select procname from sysprocedures
    and here you go
    Eric

Posting Permissions

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