ORA-22981: must specify a table/view having system generated OID
Cause: The super-view is based on a table/view having the system generated OID and the sub-view must also be based on a similar table/view.
Action: Specify table/view having system generated OID and retry the the operation.
ORA-22981错误发出时意味着一条被发送到数据库的SQL查询语句所引用的表/视图并不具有System Generated OID(Object ID)属性。这意味着DATA_OBJECT_ID不可能作为一个属性建立在表或视图中。
比如下面的SQL语句:
SELECT column_id1, column_id2
FROM customers;
上述SQL查询语句产生ORA-22981错误,因为customers表未定义为具有System Generated OID。
一般来说,解决ORA-22981错误的正确方法就是改正查询的定义,确保正确引用到一个具有System Generated OID的表/视图。
此外,要想使用DATA_OBJECT_ID属性,还需要给表/视图定义System Generated OID属性。可以使用ALTER TABLE命令在表上定义System Generated OID,示例如下:
ALTER TABLE customers
ADD SYSTEM GENERATED OID;