How to search through multiple stored procedures??
Teradata Teradata Discussion Forums Teradata.com Discussion Forum
Visit Teradata.com
Home       Guidelines    Member List
Welcome Guest ( Login | Register )
        


This online forum is for user-to-user discussions of Teradata products, and is not an official customer support channel for Teradata. If you require direct assistance, please contact Teradata support.


How to search through multiple stored... Expand / Collapse
Author
Message
Posted 10/28/2009 7:11:38 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 10/29/2009 1:05:55 PM
Posts: 3, Visits: 9
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!



Eager to learn
Post #17190
Posted 10/29/2009 3:13:27 AM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: Yesterday @ 3:55:54 AM
Posts: 111, Visits: 263
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
Post #17194
Posted 10/29/2009 1:06:22 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 10/29/2009 1:05:55 PM
Posts: 3, Visits: 9
Awesome! Thank you! It worked for me......





Eager to learn
Post #17199
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 ( 0 guests, 0 members, 0 anonymous members )
No members currently viewing this topic.


All times are GMT -5:00, Time now is 11:14am

Powered By InstantForum.NET v4.1.4 © 2009
Execution: 0.031. 7 queries. Compression Disabled.