If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > How to know all the db's procedures

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-23-11, 18:04
fernando guerrero fernando guerrero is offline
Registered User
 
Join Date: Aug 2011
Posts: 10
Question 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??
Reply With Quote
  #2 (permalink)  
Old 08-25-11, 05:10
rgomezs rgomezs is offline
Registered User
 
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.
Reply With Quote
  #3 (permalink)  
Old 09-20-11, 00:50
BrentNZ BrentNZ is offline
Registered User
 
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.
Reply With Quote
  #4 (permalink)  
Old 09-25-11, 15:41
begooden-it begooden-it is offline
Registered User
 
Join Date: Sep 2011
Location: Pont l'Abbé, Brittany, France
Posts: 183
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On