db2:使用 db2look 导出包 [英] db2: export packages with db2look

查看:20
本文介绍了db2:使用 db2look 导出包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法用 db2look 功能导出CREATE PACKAGES"语句?

is there a way to export the "CREATE PACKAGES" statements with db2look functionality?

我尝试了不同的选项,但无法获得 CREATE PACKAGES 语句.我想要这样做的原因是因为我们将一个 PROD 数据库复制到一个 TEST 数据库并且 2 个 PACKAGES 的架构更改了名称,所以我只想在正确的包中重新创建它们.

I try with the different options but couldn't get the CREATE PACKAGES statements. The reason why I want that is because we copy a PROD db to a TEST DB and the schema for 2 PACKAGES changes name so I just want to recreate them in the right package.

这是我启动的命令:

db2look -d DBNAME -a -e -z SCHEMA_NAME -l -o OLDSCHEMA.sql

推荐答案

为什么要重新创建包,因为它们只是静态 SQL 需要的,你可以覆盖现有的.

Why do you want to recreate packages, because they are only needed for static SQL, and you can override existing ones.

创建相同的唯一方法是在两个数据库中使用相同的选项重新绑定.

The only way to create the same is by rebinding with the same options in both databases.

这篇关于db2:使用 db2look 导出包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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