Connor and Chris will both be at AI World from October 12 to October 17 , the premier Oracle conference of 2025. If you're in Vegas, please come say Hi or pop into our sessions
Thanks for the question, amir.
Asked: October 08, 2025 - 1:26 pm UTC
Last updated: October 09, 2025 - 2:44 am UTC
Version: oracle db 19.21
var v_num number; exec :v_num:=dbms_spm.load_plans_from_cursor_cache(sql_id => '0b3...............',plan_hash_value => 2170529430 ,fixed=>'YES');
select * from dba_sql_plan_baselines
select sql_id, plan_hash_value, parsing_schema_name, sql_text from v$sql where sql_id = '0b3...............';
SQL> var v_num number; SQL> exec :v_num:=dbms_spm.load_plans_from_cursor_cache(sql_id => 'nonsense',plan_hash_value => 2170529430 ,fixed=>'YES'); PL/SQL procedure successfully completed. SQL> print v_num V_NUM ---------- 0
Check out more PL/SQL tutorials on our LiveSQL tool.
PL/SQL reference manual from the Oracle documentation library