How to extract Stored Procedure body in Teradata

南笙酒味 提交于 2020-02-03 08:25:43

问题


I'm trying to extract Stored procedure DDL by querying system tables.
If I run the following query

select * from dbc.tvm where TableKind = 'P'

both fields RequestText and CreateText contain NULL. Is there any way to query Stored Procedure body apart from using SHOW PROCEDURE?

Thank you.


回答1:


The DDL (SPL) for the Stored Procedures is not stored in the data dictionary tables. If you do not retain your DDL in a repository for version control you will need to script the SHOW PROCEDURE commands in a BTEQ script and export them to flat files. This BTEQ script can be generated dynamically if you are creative with your queries against the data dictionary.



来源:https://stackoverflow.com/questions/17172120/how-to-extract-stored-procedure-body-in-teradata

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!