My Oracle Support Banner

Literal SQL is not shared in PL/SQL block with cursor_sharing set to Force or Similar (Doc ID 285447.1)

Last updated on JULY 15, 2022

Applies to:

Oracle Database Cloud Exadata Service - Version N/A and later
Oracle Database Backup Service - Version N/A and later
Oracle Database Cloud Service - Version N/A and later
Oracle Database - Enterprise Edition - Version 11.2.0.4 and later
Oracle Database Cloud Schema Service - Version N/A and later
Information in this document applies to any platform.

Symptoms

Statements containing literals in pl/sql blocks do not share when cursor_sharing = force or cursor_sharing = force similar.

Literal replacement does not occur.
If the same statements are executed in standard SQL or via execute immediate then they are shared.

e.g.

Using the following table:

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!


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