将数据从iSeries迁移到DB2 Express? [英] Move data from iSeries to DB2 Express?

查看:136
本文介绍了将数据从iSeries迁移到DB2 Express?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们需要将数据库从DB2 for i(iSeries AS / 400)迁移到DB2 Express。我们无权访问由其他公司管理的iSeries,因此无法选择直接ODBC / JDBC连接。我们需要他们将其模式和数据导出为可以在此处导入的格式。

We need to migrate a database from DB2 for i (iSeries AS/400) to DB2 Express. We do not have access to the iSeries, which is managed by a different company, so a direct ODBC/JDBC connection isn't an option. We need them to export their schemas and data into a format that we can import here.

到目前为止,他们已经向我们发送了一组字段定义文件(*。 FDF),但是我还无法弄清楚如何使用它们(在这里实时学习DB2)。

So far, they've sent us a set of field definition files (*.FDF), but I haven't been able to figure out how to do much with them (learning DB2 on the fly here).

我已经对 db2move db2look db2relocate ,但这些实用程序不是在iSeries上可用。如果可以避免,拥有iSeries的小组宁愿不必购买IBM的DB Connect产品,尽管这可以商议。

I've familiarized myself with db2move, db2look, and db2relocate, but those utilities aren't available on the iSeries. The group that owns the iSeries would prefer to not have to purchase IBM's DB Connect product, if it can be avoided, though that might be negotiable.

如果有帮助,我们只会从DB2 Express实例中读取数据,因此我们不必担心迁移触发器或类似行为。

If it helps, we will only be reading data from our DB2 Express instance, so we aren't worried about migrating triggers or similar behaviors.

我觉得这应该是一个简单的Web搜索,但是我整天忙碌着,没有取得任何进展。似乎iSeries本身就是一个世界!

I feel like this should be an easy web search but I've been scrounging all morning and haven't made any progress. It seems like the iSeries is a world unto itself!

推荐答案

IBM i(又名AS / 400,又名iSeries)是它自己的世界...主要是因为它的起源早于SQL。此外,数据库已深深嵌入到操作系统中。

IBM i (aka AS/400 aka iSeries) is it's own world...primarily because it's origins predate SQL. Additionally, the DB is deeply embedded into the OS.

可以说,它可以说是最符合SQL标准的数据库之一。假设操作系统是相对较新的版本,并且具有现代技能,那么这项任务就不会那么困难了。您可能会听到一些您不熟悉的术语,但是有一些等效项。

数据库=数据库

库=架构

物理文件=表

逻辑文件=索引和/或视图

That being said, it's arguably one of the most SQL standards compliant DB's. Assuming a relatively recent version of the OS and a modern skill set, this task shouldn't be that difficult. You may hear some terms you're not familiar with, but there are equivalents.
Database = Database
Library = Schema
Physical File = Table
Logical File = Index and/or view

FDF文件?它看起来像这样吗?

FDF file? Does it look like this:

[Data Transfer File Description]
FieldCount=13
FileType=1
Version=2
[Options]
DateFormat=1
DateSep=1
DcmlSep=1
TimeFormat=1
TimeSep=1
[F0001]
Length=7
Name=ITEM
Type=1
[F0002]
Length=30
Name=IDESCR
Type=1

这是为IBM i Access(aka客户端访问)数据传输实用程序设计的。 ..可能对您没有多大帮助。

That's designed for IBM i Access (aka Client Access) Data Transfer utility....probably not going to do you much good.

IBM i Access的另一部分称为IBM i Navigator,基本上是OS的GUI界面。在导航树中是一个节点,数据库。大多数IBM i系统仅定义了一个数据库。数据库的下方是架构的节点。默认情况下,仅显示架构的子集。您可以右键单击数据库,然后选择要显示的架构。该模式下是一个节点,。您可以右键单击节点,然后选择 Generate SQL (生成SQL)

Another part of IBM i Access is called IBM i Navigator, basically a GUI interface into the OS. In the navigation tree is a node, Databases. Most IBM i systems only have a single DB defined. Under the DB's are nodes for the Schemas. By default, only a subset of schemas are displayed. You can right lick on the DB and select the schemas to display. Underneath the schema is a node, Tables. You can right click on the Tables node and select Generate SQL

生成的SQL DLL可以放在不同的位置,包括本地PC文件。注意选项卡,您可以在ANSI / ISO和DB2(带或不带扩展名)之间进行选择。

The generated SQL DLL can be placed in different places, including a local PC file. Taker note of the options tab, you can choose between ANSI/ISO and DB2 (with or w/o extensions).

这为您提供了所有表的SQL DDL 。实际上,您可以一次为整个架构生成SQL DDL。但是出于您的目的,这些表可能就足够了。假设应用程序较旧,则可能存在非SQL触发器,约束和视图/索引。特别是,大多数显示的视图实际上是DDS定义的键控逻辑文件。但是在SQL世界中,视图不能设置键。

That gives you the SQL DDL for all the tables. You can actually generate SQL DDL for the entire schema at once. But for your purposes, the tables are probably enough. Assuming an older app, there's probably non-SQL triggers, constraints and views/indexes. In particular, most the "views" shown are actually DDS defined keyed logical files. But in the SQL world, views can't be keyed.

最后,就数据导出而言。看一下。 复制到导入文件(CPYTOIMPF)命令将数据从表导出到集成文件系统(IFS)中的固定或定界流文件中

Lastly, as far as data export. Take a look at the . Copy to Import File (CPYTOIMPF) command which exports data from a table into a fixed or delimited stream file in the Integrated File System (IFS)

EDIT
如果您可以直接连接到系统,那就更好了。甚至甚至可以使用 IBM数据移动工具(MTK)

这篇关于将数据从iSeries迁移到DB2 Express?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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