---查看shared_pool使用情况
column shared_pool_used format 9,999.99
column shared_pool_size format 9,999.99
column shared_pool_avail format 9,999.99
column shared_pool_pct format 999.99
select
shared_pool_used,
(shared_pool_used/shared_pool_size)*100 Shared_pool_per,
shared_pool_size,
(shared_pool_size-shared_pool_used) shared_pool_avail from
(
select
sum(a.bytes)/(1024*1024) shared_pool_used
from v$sgastat a
where a.name in
( 'table definiti',
'dictionary cache',
'library cache',
'sql area',
'PL/SQL DIANA')
),
(
select
sum(b.bytes)/(1024*1024) shared_pool_size
from v$sgastat b
where pool='shared pool'
);