Stored Procedures and the Data Dictionary
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.


Stored Procedures and the Data Dictionary Expand / Collapse
Author
Message
Posted 9/4/2009 9:44:47 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: Today @ 11:46:06 AM
Posts: 3, Visits: 88
Does anyone know if there is a data dictionary view or table that contains the source code for stored procedures? The RequestText column in DBC.tvm seems to be a pointer to another location, but I can't find it anywhere in the documentation. SQL Assistant is able to display the formatted text, so it has to exist somewhere, no?

Many Thanks!
Post #16761
Posted 9/10/2009 10:58:07 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: Today @ 11:46:06 AM
Posts: 3, Visits: 88
Does anyone have a suggestion on how to pursue an answer to this? I need to perform comprehensive searches across a large number of stored procedures and macros, and doing so one at a time through TD SQL Assistant is error-prone and extremely tedious. SQL Assistant obviously can display the source code, including however it was formatted at compile time, so there must be a way to either search using SQL, or at a minimum dump all of the source code out to a file and use grep/sed/awk.
Post #16798
Posted 9/18/2009 4:03:25 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: Today @ 11:46:06 AM
Posts: 3, Visits: 88
Well, it isn't a perfect solution, but I generated SHOW PROCEDURE statements for all of the procs, then exported them to a text file with BTEQ. This lets me find out (quickly) what stored procedures are accessing or updating a table. It has limitations, like it may be hard to tell if a particular line of code has been commented with /* */ but it is better than nothing.
Post #16870
Posted 9/19/2009 5:23:14 PM
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
DBC.TableText contains the full text for tables, views and macros. I have used it for these, check it out for procedures.
Post #16873
Posted 9/20/2009 8:59:48 AM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: 11/5/2009 4:40:02 PM
Posts: 717, Visits: 466
The source code of a SP is not stored anywhere within the dbc tables.

If you explain a SHOW PROCEDURE you'll see it's stored as a special row within the SP "table".
Or you might get a 5535 error: No SPL source text available.

The only way to find out about dependencies is installing/using the Teradata MDS (Metadata Services).

Dieter
Post #16885
« 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 3:36pm

Powered By InstantForum.NET v4.1.4 © 2009
Execution: 0.094. 9 queries. Compression Disabled.