用于自动卸载/加载DB2数据库的所有表的工具(Tool to automatically unload/load all tables of DB2 databases)

编程入门 行业动态 更新时间:2024-10-11 21:21:25
用于自动卸载/加载DB2数据库的所有表的工具(Tool to automatically unload/load all tables of DB2 databases)

通常,我们需要从数据库中卸载(DB2实用程序)所有数据并将其加载到另一个数据库(相同的结构)。

我通常每个表有一个卸载jcl(源数据库),每个表有一个加载jcl(目标数据库)。 对于50-100个表数据库,它有很多jcl和重复的代码。

是否有可能构建一个工具,可以使用DB2实用程序为我完成所有这些工作? 示例:指定源数据库和目标数据库,然后指定SUB ...

任何想法,将不胜感激。 谢谢!

Often, we need to unload (DB2 utility) all the data from a database and load it to another database (same structure).

I usually have one unload jcl per table (source db), and one load jcl per table (target db). For 50-100 table databases, it's a lot of jcls and repeated code.

Would it be possible to build a tool that would do all that for me using the DB2 utilities? Example: specifying source and target databases, then SUB...

Any ideas would be appreciated. Thanks!

最满意答案

是的,你可以建立这样一个工具。 一种方法是用您选择的语言编写一个程序来生成JCL。 另一种方法是使用编目或流内过程来执行卸载和加载实用程序,然后执行提供表作为参数的过程。

如果你想变得更加漂亮,你可以编写一个程序来读取DB2目录以获取表列表并编写卸载并为您加载JCL。

Yes you can build such a tool. One approach is to write a program in the language of your choosing that will generate the JCL. Another approach is to make a cataloged or in-stream procedure to execute your unload and load utilities, then execute the procedure supplying your tables as parameters.

If you want to get even fancier, you write a program that reads the DB2 catalog to get your list of tables and write the unload and load JCL for you.

更多推荐

本文发布于:2023-07-18 07:18:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1156704.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:加载   数据库   工具   Tool   databases

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!