Добро пожаловать в форум, Guest  >>   Войти | Регистрация | Поиск | Правила | В избранное | Подписаться
Все форумы / IBM DB2, WebSphere, IMS, U2, etc Новый топик    Ответить
 Создание NickName  [new]

Сообщений: 3
Привет всем!

При создании NickName на таблицу, которая содержит столбец типа long varchar, выдается сообщение "Столбец типа 'longvar' неизвестен". (DB2 7.2)

Заранее спасибо.
12 окт 06, 19:15    [3255713]     Ответить | Цитировать Сообщить модератору
 Re: Создание NickName  [new]
Nikolay Kulikov

Откуда: Москва
Сообщений: 607
7 версия снята с поддержки 1.5 года назад.
12 окт 06, 19:21    [3255729]     Ответить | Цитировать Сообщить модератору
 Re: Создание NickName  [new]

Сообщений: 207
на long varchar сплошь и рядом ограничения, смотрите "DB2 SQL Reference Version 7"

читаем :

The federated server does not support those data source data types that
correspond to the following DB2 data types: LONG VARCHAR, LONG
VARGRAPHIC, DATALINK, large object (LOB) types, and user-defined
types. When a nickname is defined for a data source table or view, only
those columns in the table or view that have supported data types will be
defined to, and can be queried from, the federated database. When the
CREATE NICKNAME statement is run against a table or view that has
columns with unsupported data types, an error is issued.

Because data types might be incompatible between data sources, the
federated server makes minor adjustments to store remote catalog data
locally as needed. Refer to the Application Development Guide for details.

The maximum allowable length of DB2 index names is 18 characters. If a
nickname is being created for a table that has an index whose name exceeds
this length, the entire name is not cataloged. Rather, DB2 truncates it to 18
characters. If the string formed by these characters is not unique within the
schema to which the index belongs, DB2 attempts to make it unique by
replacing the last character with 0. If the result is still not unique, DB2
changes the last character to 1. DB2 repeats this process with numbers 2
through 9, and if necessary, with numbers 0 through 9 for the name’s
seventeenth character, sixteenth character, and so on, until a unique name is
generated. To illustrate: The index of a data source table is named
the schema to which this index belongs. The new name is over 18
characters; therefore, DB2 truncates it to ABCDEFGHIJKLMNOPQR.
Because this name already exists in the schema, DB2 changes the truncated
version to ABCDEFGHIJKLMNOPQ0. Because this latter name exists, too,
DB2 changes the truncated version to ABCDEFGHIJKLMNOPQ1. This
name does not already exist in the schema, so DB2 now accepts it as a new

When a nickname is created for a table or view, DB2 stores the names of
the table’s or view’s columns in the catalog. If a name exceeds the
maximum allowable length for DB2 column names (30 characters), DB2
truncates the name to this length. If the truncated version is not unique
among the other names of the table’s or view’s columns, DB2 makes it
unique by following the procedure described in the preceding paragraph.
13 окт 06, 09:47    [3257013]     Ответить | Цитировать Сообщить модератору
Все форумы / IBM DB2, WebSphere, IMS, U2, etc Ответить