My Oracle Support Banner

SQL Developer Migration Incorrectly Handles DB2 Blob Default Null Clause (Doc ID 2475424.1)

Last updated on APRIL 17, 2023

Applies to:

Oracle SQL Developer - Version 18.2 to 18.3
Information in this document applies to any platform.

Symptoms

Running an online migration with SQL Developer 18.2 translates table to the following Oracle syntax:

DB2 table: create table db2blob (col1 double, col2 blob default null);

The copy is working, but before copy, while creating Oracle model in an Oracle database, the SQL Developer migration utility generates the wrong code.

The output generated by the utility first correctly creates the table:
PROMPT Creating Table DB2BLOB ...
CREATE TABLE DB2BLOB (
COL1 NUMBER(38,0),
COL2 BLOB
);

But instantiating the BLOB with Null fails as the code is incorrect:
ALTER TABLE DB2BLOB MODIFY (COL2 DEFAULT TO_BLOB(HEXTORAW('NULL')));

The ALTER command will fail in Oracle with:
SQL> ALTER TABLE DB2BLOB MODIFY (COL2 DEFAULT TO_BLOB(HEXTORAW('NULL')))
*
ERROR at line 1:
ORA-01465: invalid hex number

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.