如何在Teradata中提取存储过程正文 [英] How to extract Stored Procedure body in Teradata

查看:364
本文介绍了如何在Teradata中提取存储过程正文的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过查询系统表来提取存储过程DDL.
如果我运行以下查询

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

从dbc.tvm中选择*,其中TableKind ='P'

两个字段 RequestText CreateText 都包含NULL. 除了使用SHOW PROCEDURE,还有什么方法可以查询存储过程正文?

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

谢谢.

推荐答案

存储过程的DDL(SPL)未存储在数据字典表中.如果您没有将DDL保留在版本控制的存储库中,则需要在BTEQ脚本中编写SHOW PROCEDURE命令的脚本并将其导出到平面文件.如果您对数据字典的查询很有创意,则可以动态生成此BTEQ脚本.

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.

这篇关于如何在Teradata中提取存储过程正文的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆