How to search through multiple stored procedures??

Analytics
Enthusiast

How to search through multiple stored procedures??

Hi All,

I am trying to search for dependencies in our database, and I have about 500 stored procedures to go through. Is there an easy way to do this?

I compiled all the show procedures as follows:

SHOW PROCEDURE database_name.procedure_name_1;
SHOW PROCEDURE database_name.procedure_name_2;
SHOW PROCEDURE database_name.procedure_name_3;
SHOW PROCEDURE database_name.procedure_name_4;
SHOW PROCEDURE database_name.procedure_name_5;
etc

Does anyone know how I can save the result set into a table or export it to a text file where I can perform my searches on the keywords?

Thanks!

2 REPLIES
Enthusiast

Re: How to search through multiple stored procedures??

Run the following script in bteq

--------------------
.Export Report File = c:/outfile.txt

.FORMAT OFF
.WIDTH 255

SHOW PROCEDURE database_name.procedure_name_1;
SHOW PROCEDURE database_name.procedure_name_2;
SHOW PROCEDURE database_name.procedure_name_3;
SHOW PROCEDURE database_name.procedure_name_4;
SHOW PROCEDURE database_name.procedure_name_5;
etc

.EXPORT RESET
---------------------------------

The above shows a run from a PC, output going to a PC file. You can also run on Unix or mainframe but you will need to change the output filename accordingly.

If you want to do it in SQL Assistant, go to Tools; Options; Export/ Import
Set the "Write All Exported Results to a single file" to on.
Then turn Export Results on (File Menu) and run your SHOWs.

JimM
Enthusiast

Re: How to search through multiple stored procedures??

Awesome! Thank you! It worked for me......