古老 AS/400 上 DB2 的表结构
我们有一台非常旧的 400 台,大约有 10-15 年的历史,我需要将其中的数据迁移出来,以便它可以退役。我通过一个名为 QTODBC 的程序与其建立了 ODBC 连接,该程序报告我正在连接的主机版本为 03.01.0000。我正在尝试访问系统表,以便获取表结构数据,并且我尝试了各种命令,这些命令似乎都是为更高版本的 DB2 编写的。
当时的系统表是什么?假设他们有这么旧的版本,我将如何提取模式名称?
We have a VERY old 400, on the order of 10-15 years old, and I need to migrate the data out of it so it can be retired. I have ODBC connectivity to it through a program called QTODBC that is reporting that the host that I'm connecting to is version 03.01.0000. I'm trying to access system tables so that I can get table structure data and I've tried various commands that all seem to be written for later versions of DB2.
What were the system tables back way back then? And how would I pull up schema names, assuming they had them with this old of a version?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
对于 V3R1,您最好的选择是在终端会话中使用 DSFFD FILE(...) OUTPUT(*OUTPUT) OUTFILE(LIB/FILE) 命令来创建字段定义文件。
对于一个很旧的系统来说,这些文件很可能甚至没有被外部描述。这意味着文件布局在访问该文件的每个程序中都是硬编码的。如果您只找到名为 F00001、K00001 等的几个字段,您就可以识别这种情况。
Your best bet for V3R1 will be to use the
DSPFFD FILE(...) OUTPUT(*OUTPUT) OUTFILE(LIB/FILE)
command from a terminal session to create a file of field definitions.There's a high chance with a system that old that the files may not even be externally described. This means that the file layout is hardcoded in each program that access the file. You can recognize this situation if you only find a few fields named F00001, K00001, etc.
您可以检索查询 QSYS2/SYSCOLUMNS 表的表结构。
浏览 QSYS2 库以获取有关索引等的表和视图。
You can retrieve the table structure quering QSYS2/SYSCOLUMNS tables.
Browse the QSYS2 library for tables and views about indexes and others.
这对我有用。
This worked for me.