How to flush shared pool?

0.        Check the components of SGA

ttitle left "SGA Memory Allocation"

set linesize 200

set pagesize 30

col name format a40

col size_in_mb format 9,999.99

col RESIZEABLE format a20

clear scr

select

        name,

        round(bytes/1024/1024,2) size_in_MB,

        RESIZEABLE

from

        v$sgainfo

order by

        2 desc;

set pagesize 14

set linesize 80

ttitle off

1.        Check the Shared_pool Size

SELECT

        Pool,

        name,

        bytes as Free_in_Bytes,

        round(bytes/1024/1024,2) as Free_in_MB

FROM

        V$SGASTAT

WHERE

        name = 'free memory'

        AND

        pool = 'shared pool';

2.        Flush the shared pool

alter system flush shared_pool;

3.         Check the size again.

SELECT

        Pool,

        name,

        bytes as Free_in_Bytes,

        round(bytes/1024/1024,2) as Free_in_MB

FROM

        V$SGASTAT

WHERE

        name = 'free memory'

        AND

        pool = 'shared pool';

Hope this helps.

Moid Muhammad