DBMS_SPM.LOAD_FROM_CURSOR_CACHE

From: Mladen Gogala <gogala.mladen_at_gmail.com>
Date: Tue, 11 Oct 2011 18:17:42 +0000 (UTC)
Message-ID: <pan.2011.10.11.18.17.42_at_gmail.com>



In 11.2.0.3, DBMS_SPM.LOAD_FROM_CURSOR_CACHE refuse to load if the SQL_ID of the statement for which I'm loading the plan and the plan that I'm trying to load are not the same:

declare
v_sql_text CLOB;
# v_sql_id varchar2(13) := '0wnf3cqjjuw0b'; v_sql_id varchar2(13) := '6tm6vjxx9wwp9'; v_hash number := 599409829;
plans_loaded number;
begin
plans_loaded:=dbms_spm.load_plans_from_cursor_cache( sql_id=>v_sql_id,
plan_hash_value=>v_hash);
dbms_output.put_line('Loaded '||plans_loaded||' plans.'); end;
/

Basically, I'm trying to hint a SQL statement and loaded a hinted plan as described here: http://tinyurl.com/4y28t92 On 11.2.0.3, this doesn't work. Any ideas? According to the blog, this should be possible. Is this a new feature of Oracle 11.2.0.3?

-- 
http://mgogala.byethost5.com
Received on Tue Oct 11 2011 - 13:17:42 CDT

Original text of this message