Skip to content Skip to sidebar Skip to footer

How Do I List All Stored Procedures In Informix?

I'm looking for a way to list all the stored procedures in my database running on Informix. Is there a table in the 'informix'.* database that lists stored procedures along with

Solution 1:

Yes, there is. It's called sysprocedures. Try this to see all there's to see:

select * from sysprocedures

For more information on what detailed information is available, read about sysprocedures and sysprocbody and sysproccolumns.

Solution 2:

Get the procid of the stored procedure from the below query

select sysprocedures.procname,sysprocedures.procid from sysprocedures

and provide the procid in the below query to view the whole stored procedure

select data from sysprocbody where procid = @procid and datakey = 'T' order by seqno

Solution 3:

select sysprocedures.procname from sysprocedures;

Solution 4:

You can get the contents of the stored procedures (the text) with dbschema: dbschema -d -f all or dbschema -d -f

The text of the procedure is also in the sysprocbody table "where datakey='T'"

so: select data from sysprocbody where procid in (select procid from sysprocedures where procname='') and datakey='T' order by seqno; -- Note that in older Informix, this would complain that seqno had to be included in the list of selected columns.

Post a Comment for "How Do I List All Stored Procedures In Informix?"