powered by simpleCommunicator - 2.0.59     © 2025 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / IBM DB2, WebSphere, IMS, U2 [игнор отключен] [закрыт для гостей] / insert z/OS. проблема с ключами...
5 сообщений из 5, страница 1 из 1
insert z/OS. проблема с ключами...
    #37479377
lubava1991
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Заполняю таблицу на z/OS данными соответствующими по типу. Индексы не(!) совпадают с имеющимися данными. Связаные поля с другими таблицами имеют все верные "ссылки". В итоге ошибка :
Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
insert into LETD.OBJ_OSN_INF (OBJ_OSN_ID, V_OBJ_ID, OKATO_ID, DOP_RAZM, VNAME, NAME, OBJ_OSN_N, OBJ_OSN_K, ACTIV) values ( 1015623 ,  2 , null, '', 'пфеб-аюкр : лекхунбн', 'пфеб-аюкр : лекхунбн',  1183 ,  1185 , 'N')
DB21034E  The command was processed as an SQL statement because it was not a 
valid Command Line Processor command.  During SQL processing it returned:
SQL0803N  One or more values in the INSERT statement, UPDATE statement, or 
foreign key update caused by a DELETE statement are not valid because the 
primary key, unique constraint or unique index identified by "OBJROSNR" 
constrains table "000000C31D" from having duplicate values for the index key.  
SQLSTATE= 23505 

SQL0803N  One or more values in the INSERT statement, UPDATE statement, or foreign key update caused by a DELETE statement are not valid because the primary key, unique constraint or unique index identified by "OBJROSNR" constrains table "000000C31D" from having duplicate values for the index key.

Explanation: 

The INSERT or UPDATE object table "<table-name>" is constrained by one
or more UNIQUE indexes to have unique values in certain columns or
groups of columns. Alternatively, a DELETE statement on a parent table
caused the update of a foreign key in a dependent table "<table-name>"
that is constrained by one or more UNIQUE indexes. Unique indexes might
support primary keys or unique constraints defined on a table. The
statement cannot be processed because completing the requested INSERT,
UPDATE or DELETE statement would result in duplicate column values. If
the index is on an XML column, the duplicate values for the index key
may be generated from within a single XML document.

Alternatively, if a view is the object of the INSERT or UPDATE
statement, it is the table "<table-name>" on which the view is defined
that is constrained.

If "<index-id>" is an integer value, the index name can be obtained from
SYSCAT.INDEXES by issuing the following query: 

SELECT INDNAME, INDSCHEMA
  FROM SYSCAT.INDEXES
  WHERE IID = <index-id>
  AND TABSCHEMA = 'schema'
  AND TABNAME = 'table'

where schema represents the schema portion of "<table-name>" and table
represents the table name portion of "<table-name>".

The statement cannot be processed. The table remains unchanged.

User response: 

Examine the definition for the index identified by "<index-id>".

For an UPDATE statement, ensure that the specified operation is not
itself inconsistent with the uniqueness constraint. If this does not
show the error, examine the object table content to determine the cause
of the problem.

For an INSERT statement, examine the object table content to determine
which of the values in the specified value list violates the uniqueness
constraint. Alternatively, if the INSERT statement contains a subquery,
the object table contents addressed by that subquery must be matched
against the object table contents to determine the cause of the problem.
Note that if the table is protected using a security policy, your LBAC
credentials may not allow you to see the rows that are causing the
error.

If the index is on an XML column and the statement is either INSERT or
UPDATE, consider whether the XML document would result in duplicate
values from within the single XML document.

For a DELETE statement, examine the identified dependent table for
unique constraints on foreign keys that are defined with the rule ON
DELETE SET NULL. This table has a foreign key column included in the
identified unique index that cannot be set to null since there is
already a null in the column for that table.

Federated system users: isolate the problem to the data source failing
the request (refer to the Troubleshooting Guide to determine which data
source is failing to process the SQL statement) and examine the index
definitions and data for the conditions listed previously.
 sqlcode: - 803 

 sqlstate:  23505 

SQLCODE: - 803 


Что может быть при текущих обстоятельствах? всю голову сломала по несколько раз перепроверила совместимоти и повторения. все верно.. причем на тестовой базе все проходит а на рабочей нет, хотя по сути они идентичны..
...
Рейтинг: 0 / 0
insert z/OS. проблема с ключами...
    #37479399
Фотография Hunterik
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Наберите селект по каталогу, посмотрите, какая колонка в уникальном индексе на тестовой базе, а какая на боевой.
Есть подозрение, что разные...
...
Рейтинг: 0 / 0
insert z/OS. проблема с ключами...
    #37479406
lubava1991
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
одинаковые. проверяла
...
Рейтинг: 0 / 0
insert z/OS. проблема с ключами...
    #37479712
knudsen
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
lubava1991,

Load был в боевую табличку? Я бы для начала перестартовал tablespace и индексное пространство тоже. Если не поможет - снял бы констрейты и после рестарта табличных пространств посмотрел бы что действительно содержится в таблице...
...
Рейтинг: 0 / 0
insert z/OS. проблема с ключами...
    #37480984
lubava1991
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Причина оказалась глуппой. Запустили проверять на тестовой базе а не на рабочей. а на тестовую я ранее все загрузила, откуда и ошибки
...
Рейтинг: 0 / 0
5 сообщений из 5, страница 1 из 1
Форумы / IBM DB2, WebSphere, IMS, U2 [игнор отключен] [закрыт для гостей] / insert z/OS. проблема с ключами...
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]