From:Steve Adams
Date:18-Apr-2001 23:28
Subject:   cursor_sharing and PL/SQL

The "problem" is that PL/SQL parses your SQL and type checks it before representing it in its own "executable" form. When the SQL statement has to be executed during the execution of the PL/SQL procedure, the PL/SQL engine reconstructs your SQL statement from its own executable form. You may notice changes in the capitalization and white space as a result of this. The PL/SQL engine then uses low-level OPI calls to parse, bind, and execute the cursor. In the case of literal SQL, the generated PL/SQL executable code does not contain a bind call for the literals. Therefore, the parse call must intentionally avoid literal replacement regardless of the setting of the cursor_sharing parameter.

The work-around is of course to use dynamic SQL to hide your literals from the PL/SQL compiler.

I am trying to get cursor_sharing = FORCE to work correctly under 8.1.6.3. All of my select statements get implicitly bound correctly, but sql from inside stored procedures does not. Is this a know bug/limitation of this feature, or am I missing something?