My Oracle Support Banner

ORA-21780 Maximum Number Of Object Durations Exceeded: Using A Loop With EXECUTE IMMEDIATE And XMLTYPE (Doc ID 1345804.1)

Last updated on JANUARY 30, 2022

Applies to:

PL/SQL - Version 10.2.0.5 and later
Information in this document applies to any platform.

Symptoms

Populating an XMLSEQUENCETYPE (SYS.XMLTYPE) via an EXECUTE IMMEDIATE in a loop fails on approx 65k iterations with

ORA-21780 "Maximum number of object durations exceeded."

Works when calling the procedure directly instead of using Execute Immediate.

Below is an example to demonstrate the error:

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.