当前位置: 代码迷 >> 综合 >> FROM MOS : Move With LONG Datatype Using Online Redefinition Failed With ORA-00997 (文档 ID 2538484.1)
  详细解决方案

FROM MOS : Move With LONG Datatype Using Online Redefinition Failed With ORA-00997 (文档 ID 2538484.1)

热度:87   发布时间:2023-12-19 16:22:20.0

Table Move With LONG Datatype Using Online Redefinition Failed With ORA-00997 (文档 ID 2538484.1)

转到底部

https://support.oracle.com/epmos/adf/images/t.gif


https://support.oracle.com/epmos/adf/images/t.gif

In this Document

 

Symptoms

 

 

Changes

 

 

Cause

 

 

Solution

 

 

References


 

APPLIES TO:

Oracle Database - Enterprise Edition - Version 11.2.0.4 and later
Information in this document applies to any platform.

SYMPTOMS

Table move with LONG datatype using online redefinition failed with ORA-00997:

SQL> BEGIN 
2 DBMS_REDEFINITION.START_REDEF_TABLE( 
3 uname => '', 
4 orig_table => 'TEST', 
5 int_table => 'TEST_INT', 
6 options_flag => DBMS_REDEFINITION.CONS_USE_PK); 
7 END; 
8 / 
BEGIN 

ERROR at line 1: 
ORA-12018: following error encountered during code generation for 
""."TEST_INT" 
ORA-00997: illegal use of LONG datatype 
ORA-06512: at "SYS.DBMS_REDEFINITION", line 56 
ORA-06512: at "SYS.DBMS_REDEFINITION", line 1498 
ORA-06512: at line 2

CHANGES

 

CAUSE

This is expected behavior: tables with LONG columns can be redefined online, but those columns must be converted to CLOBS.
 

https://docs.oracle.com/cd/E11882_01/server.112/e25494/tables.htm#ADMIN01510
Tables with LONG columns can be redefined online, but those columns must be converted to CLOBS. Also, LONG RAW columns must be converted to BLOBS. Tables with LOB columns are acceptable. 

SOLUTION

Follow the steps stated in note 251417.1 to convert LONG column to CLOB using DBMS_REDEFINITION

REFERENCES

NOTE:251417.1 - How to Convert LONG Column to CLOB Using DBMS_REDEFINITION Package
NOTE:1012454.7 - How to Convert from Long Raw to BLOB/CLOB using PL/SQL

 

  相关解决方案