Drop or Disable the accepted Profile associated with SQL query in Oracle

Drop  the accepted profile plan generated with SQL Advisory DBMS_SQLTUNE package

1. From SQL Advisory we accepted the plan

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

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


5. Drop the SQL Profile

exec dbms_sqltune.drop_sql_profile('SQL_PROFILE_NAME');

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.