Purge SQL query from the Shared Pool in Oracle

Clear the SQL query from the Shared Pool in Oracle

Find the address and a hash value for the SQL ID which needs to purge from the shared pool:

select address,hash_value from v$sqlarea where sql_id='79cbzd9llmsqa';

OR 

select address,hash_value from v$sqlarea where sql_text like 'select * from employees%'

Clear or purge the SQL ID from the shared pool memory of the Oracle:

exec dbms_shared_pool.purge('<address,hash_value','C');

We can also unpin from the keep pool, if it used:

exec dbms_shared_pool.unkeep('<address,hash_value','C');

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 )

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.