-
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