SQL0670N创建包含250列的表 [英] SQL0670N creating table with 250 columns

查看:99
本文介绍了SQL0670N创建包含250列的表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨。


我在创建一个250列的表格时遇到以下错误

..我试过用32K创建它表空间,仍然是同一个问题。

这是DB2的限制吗?我正在使用DB2 v8.2 FP 9a。


SQL0670N表的行长超过了32677的限制

字节。


(表空间" ;.)SQLSTATE = 54010


任何建议将不胜感激

非常感谢。

Hi.

I''m getting the following error when creating a table with 250 columns
.. I have tried creating it in a 32K tablespace , still the same issue.
Is this a limitation in DB2? I am using DB2 v8.2 FP 9a.

SQL0670N The row length of the table exceeded a limit of "32677"
bytes.

(Table space "".) SQLSTATE=54010

Any advice will be appreciated
Thanks a lot.

推荐答案

Jo写道:
Jo wrote:

嗨。


我在创建一个250列的表格时收到以下错误

。我试过在32K表空间中创建它,仍然是同样的问题。

这是DB2的限制吗?我正在使用DB2 v8.2 FP 9a。


SQL0670N表的行长超过了32677的限制

字节。


(表空间" ;.)SQLSTATE = 54010


任何建议将不胜感激

非常感谢。
Hi.

I''m getting the following error when creating a table with 250 columns
. I have tried creating it in a 32K tablespace , still the same issue.
Is this a limitation in DB2? I am using DB2 v8.2 FP 9a.

SQL0670N The row length of the table exceeded a limit of "32677"
bytes.

(Table space "".) SQLSTATE=54010

Any advice will be appreciated
Thanks a lot.



Jo,


听起来你的问题不是列数而是总长度

列中的列。

标准限制为32k(32677)。列(不包括LONG VARCHAR和LOB类型列)。


我建议确实要求

中的数据量是非常不寻常的一个表:它表明您使用的是错误的数据类型或

您有设计问题。


首先,查看您的VARCHAR列并将最长的一个转换为LONG

VARCHAR或CLOB。出于性能原因,您可能希望将LONG数据分成单独的表空间(创建DMS表空间,

包括一个大表空间并使用LONG IN tsname)。在CREATE TABLE

定义中。


但最重要的是,请检查您的设计以确保您拥有的所有属性

与密钥直接相关:你没有重复的组,例如:

例子(例如ADDRESS1,ADDRESS2,ADDRESS3,......)。


HTH


Phil

Jo,

It sounds like your issue is not the number of columns but the total length
of the columns in the columns. There is a limit of 32k (32677) on
"standard" columns (not counting LONG VARCHAR and LOB type columns).

I''d suggest that it is very unusual indeed to require that amount of data in
one table : it suggests that either you are using the wrong data types or
you have a design issue.

As a start, look at your VARCHAR columns and turn the longest ones into LONG
VARCHAR or CLOB. You maybe want, for performance reasons, to separate
your LONG data into a separate tablespace (create DMS tablespaces,
including a LARGE one and use "LONG IN tsname" in the CREATE TABLE
definition).

But above all, review your design to ensure that all the attributes you have
are directly related to the key : that you don''t have repeating groups, for
example (e.g. ADDRESS1, ADDRESS2, ADDRESS3, ...).

HTH

Phil


Jo写道:
Jo wrote:

嗨。


创建250列的表时,我收到以下错误

。我试过在32K表空间中创建它,仍然是同样的问题。

这是DB2的限制吗?我正在使用DB2 v8.2 FP 9a。


SQL0670N表的行长超过了32677的限制
字节。
Hi.

I''m getting the following error when creating a table with 250 columns
. I have tried creating it in a 32K tablespace , still the same issue.
Is this a limitation in DB2? I am using DB2 v8.2 FP 9a.

SQL0670N The row length of the table exceeded a limit of "32677"
bytes.



列数无关。行的宽度是。

请注意,DB2不允许运行时错误(与至少一个其他

供应商不同)。所以重要的不是你打包了多少数据

这一行,它是你可以打包到行中的多少。

你有大的VARCHAR()列?他们可以变成CLOB还是

收缩?

这应该是一张桌子还是你应该更好地将它标准化?


干杯

Serge


-

Serge Rielau

DB2解决方案开发

IBM多伦多实验室


IOD会议
http://www.ibm.com/software/data/ond...ness/conf2006/


嗨。

所有列都是使用DBCLOB数据类型声明的。 SQL Server

列被声明为NTEXT。我正在迁移过程中,我不认为我可以更改表定义。任何变通办法都会受到赞赏。

非常感谢。

Hi.
All the columns are declared using DBCLOB datatype. The SQL Server
columns were declared as NTEXT. I am in the process of migrating and I
dont think I can change the table definition. Any workarounds would be
appreciated .
Thanks a lot.


这篇关于SQL0670N创建包含250列的表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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