Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

New session level hidden parameter to NOT IGNORE failed hints.

Rodrigo Jorge DBAAug 10 2015 — edited Jan 11 2016

A lot of DBA's comes to a situation where we put some hints in a query but we do some typo or semantic conflict/error.

So, instead of showing an error, oracle wisely executes the query ignoring the hints. I'm OK with that.

The problem is that in many situations we DO want to know that Oracle is not obeying our hints! Why not give us a way to know that, maybe throwing an error?

Maybe Oracle could create a session level hidden parameter "_optimizer_disallow_failed_hints" that default to FALSE, but if we set it to TRUE in one session, the query would fail because the hints are invalid.

Thus, we could easily track and check that we made some mistake.

Example:

alter session set _optimizer_disallow_failed_hints=true;

select /*+ PARALLEL (x,20) */ *

from   scott.emp t;

ORA-09876 - Your hint is invalid.

Thanks.

Comments
Post Details
Added on Aug 10 2015
14 comments
944 views