-
var return_code number;
-
exec :return_code := dbms_spm.load_plans_from_cursor_cache (sql_id=>'&sql_id', plan_hash_value=>&plan_hash_value, fixed=>'yes', enabled=>'yes');
-
print return_code
set lin 200 pages 1000
col sql_handle for a25
col plan_name for a32
col sql_text for a60
select sql_handle,plan_name,origin,enabled,accepted,sql_text from dba_sql_plan_baselines;
-
--删除绑定
-
var return_code number;
-
exec :return_code := dbms_spm.drop_sql_plan_baseline(sql_handle=>'&sql_hdl',plan_name=>'&plan_nm');
-
print return_code