When working in Optimizer, I can optimize without any problems and alternatives are given, but if I try to execute them in any way in Optimizer (the original SQL or the alternatives) it notes PLS-00215: String length constraints must be in range (1 .. 32767) error.
No run time stats are given to compare with.
Steps to replicate:
1. Connect to 11G database
2. Open Optimize SQL tab
3. Enter a sql
4. Execute (can test with original, no need to optimize)
5. Above error given in status column
Both original and alternative SQL are valid and can be executed outside of Optimizer.
If there is RAW data type in the select column of SQL, no size is appended to the RAW type in the execute PL SQL script. This causes the error in Optimizer.
Remove the RAW datatype from the query when working in Optimizer.
Waiting for fix in a future version of Quest SQL Optimizer for Oracle.