How to Flush Single SQL Plan out of Shared Pool


select ADDRESS, HASH_VALUE from V$sqlarea where SQL_ID ='sqlid';

BEGIN
DBMS_SHARED_POOL.PURGE('C0000008F304C620',2219163920,'C');
END;
/

Set linesize 120

select 'on Inst '||inst_id||'   execute DBMS_SHARED_POOL.PURGE('||''''||ADDRESS||','|| HASH_VALUE ||''''||','||''''||'C'||''''||');' "Execute Below to flush PLAN" from GV$SQLAREA where SQL_ID like 'adpk6gy24bh8h'
/

Execute Below to flush PLAN
----------------------------------------------------------------------------------
on Inst 1   execute DBMS_SHARED_POOL.PURGE('C0000008F304C620,2219163920','C');
on Inst 2   execute DBMS_SHARED_POOL.PURGE('C0000008E71CE550,2219163920','C');
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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: