检测RI数据类型不匹配 [英] Detecting RI datatype mismatches

查看:91
本文介绍了检测RI数据类型不匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好。


我在Windows上运行8.2。


这是一个生产项目的开发平台

环境正在大型机上运行。


我相信RI编译过程并不像Windows $ as b $ b那么强大它在其他环境中。这就是我找到的:


数据模型在ERwin中维护。


我创建了几个表,并在TABLE_1中建立一个FK,反对

TABLE_2的PK。


然后我改变TABLE_1中FK列的数据类型。 Erwin允许这个(YUCK)获得
。 ((我还发现,如果我更改父级

列的数据类型,那么该更改传播给孩子(ren)似乎相当漂亮

spotty - 有时它会发生,有时不会。))


我吐出DDL并运行它。不会生成错误。所以我现在有一个

a子列,其数据类型与父级不同,但

约束编译。


我''我很担心这个问题,因为我有一些迹象表明

这样的问题根本不会在Windows环境中被捕获,

但会导致错误DDL代码转到Production。


我的背景是Oracle,我可以看到我能在哪里生成

Oracle中的一些PL / SQL ,使用一两个游标来检查数据类型

不匹配,这样可以在ERwin模型中纠正它们。

db2中是否会有一些等效的系统视图我可以看看

有用的RI细节吗?包含表格和列的视图

涉及FK约束,以及特定

列的数据类型?


谢谢! !


BD

Hi, all.

I''m running 8.2 on Windows.

This is a development platform for a project whose production
environment is running on a mainframe.

I believe that the RI compilation process is not quite as robust on
Windows as it is in other environments. Here''s what I''m finding:

The data model is being maintained in ERwin.

I create a couple of tables, and establish an FK in TABLE_1 against
the PK of TABLE_2.

I then change the datatype of the FK column in TABLE_1. Erwin allows
this (YUCK). ((I also find that if I change the datatype of the parent
column, propagation of that change to the child(ren) seems pretty
spotty - sometimes it happens, sometimes not.))

I spit out the DDL, and run it. No errors are generated. So I now have
a child column whose datatype differs from the parent, and yet the
constraint compiles.

I''m rather concerned about this, as I have some indication that
problems like this won''t be caught in the Windows environments at all,
but will cause errors when the DDL code goes to Production.

My background is Oracle, and I could see where I''d be able to generate
some PL/SQL in Oracle, using a cursor or two, to check for datatype
mismatches like this so they can be corrected in the ERwin model.
Would there be some equivalent system views in db2 that I could look
at for helpful RI details? Views that would include tables and columns
that are involved with FK constraints, and datatypes of specific
columns?

Thanks!!

BD

推荐答案



BD写道:

BD wrote:

大家好。


我在Windows上运行8.2。


这是一个项目的开发平台,其生产环境在大型机上运行。


我相信RI编译过程并不完全与其他环境中的Windows一样强大。这就是我找到的:


数据模型在ERwin中维护。


我创建了几个表,并在TABLE_1中建立一个FK,反对

TABLE_2的PK。


然后我改变TABLE_1中FK列的数据类型。 Erwin允许这个(YUCK)获得
。 ((我还发现,如果我更改父级

列的数据类型,那么该更改传播给孩子(ren)似乎相当漂亮

spotty - 有时它会发生,有时不会。))


我吐出DDL并运行它。不会生成错误。所以我现在有一个

a子列,其数据类型与父级不同,但

约束编译。


我''我很担心这个问题,因为我有一些迹象表明

这样的问题根本不会在Windows环境中被捕获,

但会导致错误DDL代码转到Production。


我的背景是Oracle,我可以看到我能在哪里生成

Oracle中的一些PL / SQL ,使用一两个游标来检查数据类型

不匹配,这样可以在ERwin模型中纠正它们。

db2中是否会有一些等效的系统视图我可以看看

有用的RI细节吗?包含表格和列的视图

涉及FK约束,以及特定

列的数据类型?
Hi, all.

I''m running 8.2 on Windows.

This is a development platform for a project whose production
environment is running on a mainframe.

I believe that the RI compilation process is not quite as robust on
Windows as it is in other environments. Here''s what I''m finding:

The data model is being maintained in ERwin.

I create a couple of tables, and establish an FK in TABLE_1 against
the PK of TABLE_2.

I then change the datatype of the FK column in TABLE_1. Erwin allows
this (YUCK). ((I also find that if I change the datatype of the parent
column, propagation of that change to the child(ren) seems pretty
spotty - sometimes it happens, sometimes not.))

I spit out the DDL, and run it. No errors are generated. So I now have
a child column whose datatype differs from the parent, and yet the
constraint compiles.

I''m rather concerned about this, as I have some indication that
problems like this won''t be caught in the Windows environments at all,
but will cause errors when the DDL code goes to Production.

My background is Oracle, and I could see where I''d be able to generate
some PL/SQL in Oracle, using a cursor or two, to check for datatype
mismatches like this so they can be corrected in the ERwin model.
Would there be some equivalent system views in db2 that I could look
at for helpful RI details? Views that would include tables and columns
that are involved with FK constraints, and datatypes of specific
columns?



你能用两张桌子重现这个并发布剧本

从Erwin产生吗?


/ Lennart

Can you reproduce this with only two tables and post the script
generated from Erwin?

/Lennart


10月30日凌晨3:07,Lennart< Erik.Lennart.Jons ... @ gmail.comwrote:
On Oct 30, 3:07 am, Lennart <Erik.Lennart.Jons...@gmail.comwrote:

BD写道:
BD wrote:

全部。
Hi, all.


我在Windows上运行8.2。
I''m running 8.2 on Windows.


这是一个项目的开发平台,其生产是在大型机上运行的。
环境。
This is a development platform for a project whose production
environment is running on a mainframe.


我相信RI编译过程在Windows上不像其他环境那样强大。这就是我发现的:
I believe that the RI compilation process is not quite as robust on
Windows as it is in other environments. Here''s what I''m finding:


数据模型在ERwin中维护。
The data model is being maintained in ERwin.


我创建了几个表,并在TABLE_1中建立一个FK,反对

TABLE_2的PK。
I create a couple of tables, and establish an FK in TABLE_1 against
the PK of TABLE_2.


然后我更改TABLE_1中FK列的数据类型。 Erwin允许这个(YUCK)获得
。 ((我还发现,如果我更改父级

列的数据类型,那么该更改传播给孩子(ren)似乎相当漂亮

spotty - 有时它会发生,有时不会。))
I then change the datatype of the FK column in TABLE_1. Erwin allows
this (YUCK). ((I also find that if I change the datatype of the parent
column, propagation of that change to the child(ren) seems pretty
spotty - sometimes it happens, sometimes not.))


我吐出DDL并运行它。不会生成错误。所以我现在有一个子列的数据类型与父类不同的子列,但

约束编译。
I spit out the DDL, and run it. No errors are generated. So I now have
a child column whose datatype differs from the parent, and yet the
constraint compiles.


我很担心这个,因为我有一些迹象表明

这样的问题不会完全被Windows环境捕获,

但是当DDL代码进入生产时会导致错误。
I''m rather concerned about this, as I have some indication that
problems like this won''t be caught in the Windows environments at all,
but will cause errors when the DDL code goes to Production.


我的背景是Oracle,我可以看到我能够在哪里生成

一些PL / SQL在Oracle中,使用一两个游标来检查数据类型

这样的不匹配,以便在ERwin模型中对它们进行更正。

是否会有一些等效的系统视图db2,我可以看看

有用的RI细节?包含表和列的视图

涉及FK约束,以及特定

列的数据类型?
My background is Oracle, and I could see where I''d be able to generate
some PL/SQL in Oracle, using a cursor or two, to check for datatype
mismatches like this so they can be corrected in the ERwin model.
Would there be some equivalent system views in db2 that I could look
at for helpful RI details? Views that would include tables and columns
that are involved with FK constraints, and datatypes of specific
columns?



你能用两张桌子重现这个并发布剧本

从Erwin产生吗?


/ Lennart


Can you reproduce this with only two tables and post the script
generated from Erwin?

/Lennart



是... syscat。 sysrels或sysibm.sysrels第一个是视图,

第二个是真实的目录表。


HTH


Roger

yes...syscat. sysrels or sysibm.sysrels The first one is a view and
the second is a real catalog table.

HTH

Roger


Roger写道:
Roger wrote:

第二个是真正的目录表。
the second is a real catalog table.



....如果你喜欢稳定的应用程序你不应该使用它。


-

Knut Stolze

DB2 z / OS实用程序开发

IBM德国

.... which you shouldn''t use if you prefer stable applications.

--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany


这篇关于检测RI数据类型不匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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