My Oracle Support Banner

DBMS_LOB.APPEND Raises ORA-22275 When CLOB Returned by XMLSERIALIZE() Gets Appended to Another CLOB (Doc ID 2725087.1)

Last updated on NOVEMBER 03, 2020

Applies to:

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


The package sub-program dbms_lob.append raises "ORA-22275: invalid LOB locator specified" when a non-SYS user attempts to append the serialized XML value of CLOB datatype returned by the function XMLSERIALIZE() to another CLOB. This error is not triggered if the same code is executed by SYS user.

The issue can be demonstrated using the following test case.

The issue doesn't reproduce if either of the "XMLTYPE" or "PARTITION BY" clause is removed from the DDL of the table "tab2". Alternatively, DBMS_LOB.CREATETEMPORARY() can be used to initialize the CLOB variable instead of selecting CLOB from the database. The error trace(22275 trace at level 3) for the failing code shows koklnflushint() signals the error ORA-22275.


The database has been upgraded from 12c to 19c or the code is executed on a new installation of 19c database.


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

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