ORA-22336: table contained 8.0 image format, must specify INCLUDING DATA

文档解释

ORA-22336: table contained 8.0 image format, must specify INCLUDING DATA

Cause: One of the following: 1) An attempt was made to alter a type with a dependent table in 8.0 image format and the NOT INCLUDING TABLE DATA option was specified. 2) An attempt was made to upgrade a table in 8.0 image format with the NOT INCLUDING DATA option specified.

Action: Resubmit the statement with INCLUDING DATA option.

ORA-22336:表中存在8.0图像格式,必须指定INCLUDING DATA

官方解释

该错误是由于使用8i或更早的版本对一个表进行了更新导致的,而未指定INCLUDING DATA选项,具体而言,在8i以及之前的版本中,某些类型的数据可能会使用其旧的图像格式(而不是9i以及更高版本中使用的新图像格式)来存储。如果表中包含这些旧图像格式的数据,则必须在更新时指定INCLUDING DATA子句,以确保所有受影响的数据都使用新图像格式来进行更新。

常见案例

使用8i以及更早版本中的更新语句时,可能会发生这种错误。例如,以下更新语句可能会引发此错误:

UPDATE my_table

SET col1 = ‘xxxx’

一般处理方法及步骤

要解决此问题,需要在更新语句中添加INCLUDING DATA子句。正确的更新语句应为:

UPDATE my_table

SET col1 = ‘xxxx’

INCLUDING DATA;

你可能感兴趣的