My Oracle Support Banner

ORA-6502 From Execute Immediate When in a Loop and Statement is > 32K & < 64K (Doc ID 1367929.1)

Last updated on DECEMBER 16, 2019

Applies to:

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

Symptoms

Concatenate an update statement > 32k and execute it using execute immediate.

Executes immediate the concatenated update statement 10 times in a loop.

In 11.2.0.1 and higher the code fails on the execute immediate with ORA-6502. The exact same code works prior to 11.2. Also adding dbms_output statement to the loop will resolve 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.