Drop accepted plan in SQL Advisory

Drop accepted plan in SQL Advisory

1. From SQL Advisory we accepted the plan

begin
DBMS_SQLTUNE.ACCEPT_SQL_PROFILE(task_name => 'TASK_69287', task_owner => 'SYSTEM', replace => TRUE);
end;
/

2. Check that SQL profile created is used

Set autotrace on
-- run the SQL Query it will show execution plan which last line show you that plan is used or not and you get name of SQL Profile.

3. Check the sql profiles which is associated with SQL

select * from dba_sql_profiles;

4. Disable the SQL profile if you want

begin
DBMS_SQLTUNE.ALTER_SQL_PROFILE('SQL_PROFILE_NAME','STATUS','DISABLED');
end;
/

5. Drop the SQL Profile

exec dbms_sqltune.drop_sql_profile('SQL_PROFILE_NAME');

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.