Dropping Plans e Baselines

Para apagar um Baselines e bem simples , logue como sys e  coloque o ID do seu Baselines  no bloco abaixo:

SET SERVEROUTPUT ON
DECLARE
l_plans_dropped PLS_INTEGER;
BEGIN
l_plans_dropped := DBMS_SPM.drop_sql_plan_baseline (
sql_handle => NULL,
plan_name => 'SQL_PLAN_4s77gz996aammee82b912');

DBMS_OUTPUT.put_line(l_plans_dropped);
END;
/

 

sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Tue Nov 28 10:03:25 2017

Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, Oracle Label Security,
OLAP, Data Mining and Real Application Testing options

SQL> SET SERVEROUTPUT ON
DECLARE
l_plans_dropped PLS_INTEGER;
BEGIN
l_plans_dropped := DBMS_SPM.drop_sql_plan_baseline (
sql_handle => NULL,
plan_name => 'SQL_PLAN_4s77gz996aammee82b912');

DBMS_OUTPUT.put_line(l_plans_dropped);
END;
/SQL> 2 3 4 5 6 7 8 9 10
1

PL/SQL procedure successfully completed.

 

Leave a Reply

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *