Skip to Main Content

Oracle Database Discussions

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!

How to (re)execute the sql query of a specific sql_id/hash_value

Jeremy_BaumontSep 25 2013 — edited Sep 26 2013

Hello,

How could I re-execute a sql query via the sql_id/hash_value, I do not want to copy/paste the sql_fulltext value of v$sql/v$sqlarea... and replay it in a client since depending of the formatting it will be parsed in a different sql_id ? I also tried with DBMS_SQL and filling the sql text parameter of DBMS_SQL.parse() by querying v$sql/v$sqlarea... but it parses a different sql_id.

More context:

  • Database version 11.2.0.3
  • OS: Linux x86-64 Redhat 5.9
  • Trying to apply the workaround of  following bug: "Workaround :Try reproducing the plan using the SPM Baseline or Stored Outline in a session where _optim_peek_user_binds = FALSE."
    • Bug 14142152 - SPM BASELINE MIGHT NOT BE USED DEPENDING ON THE VALUE OF THE BIND VARIABLE, which pointed to Base Bug: 12732879
    • Bug 12732879 - SPM: COULDN'T REPRODUCE ANY ENABLED+ACCEPTED PLAN SO USING THE COST-BASED PLAN
  • I am not allowed to display the SQL but it used bind variables

Br,

--Jeremy Baumont

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 24 2013
Added on Sep 25 2013
3 comments
2,784 views