drop a sql baseline - Oracle Database Script. DECLARE drop_result pls_integer; BEGIN drop_result := DBMS_SPM.DROP_SQL_PLAN_BASELINE(plan_name => '&sql_plan_baseline_name'); dbms_output.put_line(drop_result); END; / You can GET the SQL baseline FROM a sql_id FROM below command: SELECT sql_handle, plan_name FROM dba_sql_plan_baselines WHERE signature IN (SELECT exact_matching_signature FROM gv$sql WHERE sql_id='&SQL_ID');
DECLARE drop_result pls_integer; BEGIN drop_result := DBMS_SPM.DROP_SQL_PLAN_BASELINE(plan_name => '&sql_plan_baseline_name'); dbms_output.put_line(drop_result); END; / You can GET the SQL baseline FROM a sql_id FROM below command: SELECT sql_handle, plan_name FROM dba_sql_plan_baselines WHERE signature IN (SELECT exact_matching_signature FROM gv$sql WHERE sql_id='&SQL_ID');