All Forums Analytics
ratu 8 posts Joined 10/09
28 Oct 2009
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;etcDoes 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!

Jimm 298 posts Joined 09/07
29 Oct 2009

Run the following script in bteq--------------------.Export Report File = c:/outfile.txt.FORMAT OFF.WIDTH 255SHOW 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/ ImportSet the "Write All Exported Results to a single file" to on.Then turn Export Results on (File Menu) and run your SHOWs.JimM

ratu 8 posts Joined 10/09
29 Oct 2009

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

You must sign in to leave a comment.