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');

This entry was posted in Oracle on by .
Unknown's avatar

About SandeepSingh

Hi, I am working in IT industry with having more than 15 year of experience, worked as an Oracle DBA with a Company and handling different databases like Oracle, SQL Server , DB2 etc Worked as a Development and Database Administrator.

Leave a Reply