SPM- Load Plan from Cursor Cache
-- load plan from cursor
define sql_id=6vzp7h6rdrwu1
define plan_hash_value=2346335358
SET SERVEROUTPUT ON
DECLARE
  l_plans_loaded  PLS_INTEGER;
BEGIN
  l_plans_loaded := DBMS_SPM.load_plans_from_cursor_cache(
    sql_id => '&sql_id',
    plan_hash_value => '&plan_hash_value',
    --sql_handle => '&handle'
    fixed => 'YES',
    enabled  => 'YES');
  DBMS_OUTPUT.put_line('Plans Loaded: ' || l_plans_loaded);
END;
/