ORA-22997: VARRAY | OPAQUE stored as LOB is not specified at the table level ORACLE 报错 故障修复 远程处理
文档解释
ORA-22997: VARRAY | OPAQUE stored as LOB is not specified at the table level
Cause: An attempt was made to specify a VARRAY|OPAQUE column to be stored as LOB at the partition/subpartition/template level. However the VARRAY|OPAQUE column was not specified to be stored as LOB at the table level when the table was created.
Action: Specify the VARRAY | OPAQUE column to be stored as LOB at the table level when the table is created. Alternatively, do not specify the VARRAY | OPAQUE column to be stored as LOB at the partition/subpartition/template level if it is not specified at the table level when the table is created.
ORA-22997: VARRAY | OPAQUE stored as LOB is not specified at the table level
该错误提示在创建数据表时,将VARRAY和OPAQUE对象存储在LOB中,但在表级上没有指定这一点。
官方解释
当从表级LOB字段分配容器时,出现ORA-22997错误,这不允许混合使用VARRAY/OPAQUE和LOB。
常见案例
此错误可能是在创建表时发生的,例如:
CREATE TABLE example
(
id int,
Name varchar(50)
);
Create table test
(
Test_Type VARRAY OPAQUE store as lob
)
一般处理方法及步骤
1、要解决该错误,必须修改表,使在表级别指定VARRAY/OPAQUE存储在LOB中:
Create table test
(
Test_Type VARRAY OPAQUE store as lob (cascell_action)
)
2、使用DROP LOB语句删除LOB列,并使用ALTER TABLE替换它们:
ALTER TABLE test DROP LOB (Test_Type);
3、重新创建LOB字段:
ALTER TABLE test
ADD (Test_Type VARRAY OPAQUE store as lob(cascell_action));