Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 detail information about them?

like image 778
CheeseConQueso Avatar asked Aug 05 '11 15:08

CheeseConQueso


People also ask

How do I export all Stored Procedures?

Export Stored Procedure in SQL Server In the Object Explorer, right-click on your database. Select Tasks from the context menu that appears. Select the Generate Scripts command.

How do I view stored procedure data?

To view the definition a procedure in Object Explorer In Object Explorer, connect to an instance of Database Engine and then expand that instance. Expand Databases, expand the database in which the procedure belongs, and then expand Programmability.

How do I get a list of tables in Informix?

Informix iSQL has a command " info tables; " that shows all tables.


2 Answers

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.

like image 170
Adriano Carneiro Avatar answered Sep 29 '22 23:09

Adriano Carneiro


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

like image 40
user6002315 Avatar answered Sep 30 '22 00:09

user6002315