V$SHARED_POOL_RESERVED
HI,
I kept some procedure in the reserved area of shared pool by dbms_shared_pool.keep package. When I look the V$SHARED_POOL_RESERVED view so I couldn't see the any change in the view. MY questions is, How can this view populate?
FREE_SPACE AVG_FREE_SIZE FREE_COUNT MAX_FREE_SIZE USED_SPACE AVG_USED_SIZE USED_COUNT MAX_USED_SIZE REQUESTS REQUEST_MISSES LAST_MISS_SIZE ZE
2621440 2621440 1 2621440 0 0 0 0 0 0 0 0
I was expecting USED_SPACE column will show a value because I kept some procedure but It is showing zero.
Thanks.
Asif
asif.maqbool wrote:
HI,
I kept some procedure in the reserved area of shared pool by dbms_shared_pool.keep package. When I look the V$SHARED_POOL_RESERVED view so I couldn't see the any change in the view. MY questions is, How can this view populate?
FREE_SPACE AVG_FREE_SIZE FREE_COUNT MAX_FREE_SIZE USED_SPACE AVG_USED_SIZE USED_COUNT MAX_USED_SIZE REQUESTS REQUEST_MISSES LAST_MISS_SIZE ZE
2621440 2621440 1 2621440 0 0 0 0 0 0 0 0
I was expecting USED_SPACE column will show a value because I kept some procedure but It is showing zero.
Thanks.
Asif
Have I missed some part of the documentation - which version are you using.
As far as I know the KEEP procedure simply marks an object to stop it being discarded from the shared pool, it doesn't allocate an object to the reserved part of the shared pool.
Regards
Jonathan Lewis
Similar Messages
-
Auto size the shared_pool_reserve
Hi,
If we set the value of SHARED_POOL_RESERVE_SIZE=0, will oracle auto size it?
We are running 10.2.0.4 on SunOSHi,
I think it is set to 5% of shared_pool_size parameter at the database start but it is not a dynamic parameter as it is not included in the
select COMPONENT from v$sga_dynamic_components;
Regards -
Hi, all.
"shared pool free memory" from v$sgastat include "SHARED_POOL_RESERVED_SIZE" ??
For example,
select * from v$sgastat
where pool ='shared pool'
and name like 'free memory'
assuming that the result of the above query is about 100Megabytes
and "SHARED_POOL_RESERVED_SIZE" is 50Megabytes,
"100 M free memory" in shared pool includes 50M (reserved area)??
Thanks and Regards.
Message was edited by:
user507290Shortly after the database starts up, some of the 'shared_pool_reserved_size' will probably be in use, although quite a lot of it may still be free; so you cannot say (directly) how much of the "free memory" belongs in the reserved area and how much comes from the rest of the shared pool.
However, there is a view called v$shared_pool_reserved that tells you how much of the reserved area is currently free (and gives various other statisics about the pool's use). There are some versions of Oracle where the definition of this view is wrong, though - possibly in the lower 9i versions.
Regards
Jonathan Lewis
http://jonathanlewis.wordpress.com
http://www.jlcomp.demon.co.uk -
Shared pool request_failures
Hello,
Does any one ever faced the problem of REQUEST_FAILURES in shared pool? If yes, please share your experience(s). We have this issue every now and then, and I am just fed up of this alarm. Sometimes request_failures are over thousand.
This occurs in both 10g (10.2) and 11g DB (11.2.0.3) OS=RHL data guard setup
SYS@db AS SYSDBA> select request_failures from v$shared_pool_reserved; ---Primary DB
REQUEST_FAILURES
52
SYS@db AS SYSDBA> show parameter shared_pool_reserved_size
NAME TYPE VALUE
shared_pool_reserved_size big integer 348966092
SYS@db AS SYSDBA> select free_space,avg_free_size,used_space,request_failures,requests,max_free_size,request_misses from v$shared_pool_reserved;
FREE_SPACE AVG_FREE_SIZE USED_SPACE REQUEST_FAILURES REQUESTS MAX_FREE_SIZE REQUEST_MISSES
236005496 241314,413 5668264 57 0 6713160 0Thanks a lot.
Best Regards
Edited by: K-Saf on Sep 4, 2012 12:46 PM
Edited by: K-Saf on Sep 4, 2012 12:46 PM
Edited by: K-Saf on Sep 4, 2012 1:00 PMHello Kuljeet Pal,
Thanks a lot. Here is the result of your suggested queries. Please have a look and suggest.
- AS SYSDBA> SELECT shared_pool_size_for_estimate, estd_lc_size, estd_lc_time_saved FROM v$shared_pool_advice;
SHARED_POOL_SIZE_FOR_ESTIMATE ESTD_LC_SIZE ESTD_LC_TIME_SAVED
2816 455 819115
3584 1222 819732
4352 1990 824577
5120 2758 837826
5376 3014 848912
5504 3142 854454
5632 3270 860003
5760 3398 865548
5888 3526 871084
6016 3653 876620
6144 3780 882158
6272 3908 887700
6400 4036 893245
6528 4164 898789
6656 4292 904342
6784 4420 904351
6912 4548 904351
7040 4676 904352
7168 4804 904353
7296 4932 904354
7424 5060 904355
7552 5188 904356
7680 5316 904356
7808 5444 904356
8192 5828 904356
8960 5888 904356
9728 5888 904356
10496 5888 904356
11264 5888 904356
12032 5888 904356
12800 5888 904356
13568 5888 904356
32 rows selected.
COMPONENT OPER_TYPE PARAMETER INITIAL_SIZE TARGET_SIZE FINAL_SIZE STARTED ENDED
streams pool GROW streams_pool_size 134217728 268435456 268435456 03-sep-2012:14:07:44 03-sep-2012:14:07:44
DEFAULT buffer cache SHRINK db_cache_size 3,4226E+10 3,4091E+10 3,4091E+10 03-sep-2012:14:07:44 03-sep-2012:14:07:44
java pool STATIC java_pool_size 0 134217728 134217728 30-aug-2012:15:31:27 30-aug-2012:15:31:27
streams pool STATIC streams_pool_size 0 134217728 134217728 30-aug-2012:15:31:27 30-aug-2012:15:31:27
DEFAULT buffer cache INITIALIZING db_cache_size 3,4226E+10 3,4226E+10 3,4226E+10 30-aug-2012:15:31:27 30-aug-2012:15:31:31
ASM Buffer Cache STATIC db_cache_size 0 0 0 30-aug-2012:15:31:27 30-aug-2012:15:31:27
DEFAULT buffer cache STATIC db_cache_size 0 3,4226E+10 3,4226E+10 30-aug-2012:15:31:27 30-aug-2012:15:31:27
DEFAULT 2K buffer cache STATIC db_2k_cache_size 0 0 0 30-aug-2012:15:31:27 30-aug-2012:15:31:27
DEFAULT 4K buffer cache STATIC db_4k_cache_size 0 0 0 30-aug-2012:15:31:27 30-aug-2012:15:31:27
DEFAULT 8K buffer cache STATIC db_8k_cache_size 0 0 0 30-aug-2012:15:31:27 30-aug-2012:15:31:27
DEFAULT 16K buffer cache STATIC db_16k_cache_size 0 0 0 30-aug-2012:15:31:27 30-aug-2012:15:31:27
DEFAULT 32K buffer cache STATIC db_32k_cache_size 0 0 0 30-aug-2012:15:31:27 30-aug-2012:15:31:27
KEEP buffer cache STATIC db_keep_cache_size 0 0 0 30-aug-2012:15:31:27 30-aug-2012:15:31:27
RECYCLE buffer cache STATIC db_recycle_cache_size 0 0 0 30-aug-2012:15:31:27 30-aug-2012:15:31:27
shared pool STATIC shared_pool_size 0 6979321856 6979321856 30-aug-2012:15:31:27 30-aug-2012:15:31:27
large pool STATIC large_pool_size 0 134217728 134217728 30-aug-2012:15:31:27 30-aug-2012:15:31:27
16 rows selectedBest Regards -
How do I reducethe size of sga?
how do I reduce the size of sga so as to relief my heavily used server?
set echo off
set feedback off
set linesize 110
COLUMN a HEADING ' '
COLUMN est_mb FOR 99,999 HEADING 'Shared Pool|Size (MB)'
COLUMN multiplier FOR 9.99 HEADING ' | |Multilpier'
COLUMN LC_MB FOR 9,999 HEADING 'Lib. Cache|(MB)'
COLUMN LC_OBJ FOR 999,999 HEADING 'Lib. Cache|Objects'
COLUMN LC_TS FOR 999,999,999 HEADING 'Parse Time|Saved (Sec)'
COLUMN LC_TSF FOR 999.99 HEADING 'Parse Time|Saved Factor'
COLUMN LC_OH FOR 999,999,999 HEADING 'Lib. Obj.|Hits Change'
COLUMN sys_id NOPRINT new_value system_id
COLUMN sys_startup NOPRINT new_value startup_date
TTITLE Left 'DB :' system_id -
Center 'Shared Pool Tuning Estimates' Skip 1 -
Left 'Up Since: ' startup_date -
Center '~~~~~~~~~~~~~~~~~~~~~~~~~~~~' Skip 2
select d.name AS sys_id,
TO_CHAR(i.startup_time,'dd Mon yyyy hh24:mi') as sys_startup,
p.SHARED_POOL_SIZE_FOR_ESTIMATE AS est_MB,
p.SHARED_POOL_SIZE_FACTOR AS multiplier,
p.ESTD_LC_SIZE AS LC_MB,
p.ESTD_LC_MEMORY_OBJECTS AS LC_OBJ,
p.ESTD_LC_TIME_SAVED - base.ts AS LC_TS,
p.ESTD_LC_TIME_SAVED_FACTOR AS LC_TSF,
p.ESTD_LC_MEMORY_OBJECT_HITS - base.oh AS LC_OH
from V$SHARED_POOL_ADVICE p,
v$database d,
v$instance i,
(SELECT ESTD_LC_TIME_SAVED as ts,
ESTD_LC_MEMORY_OBJECT_HITS as oh
FROM V$SHARED_POOL_ADVICE
WHERE SHARED_POOL_SIZE_FACTOR = 1) base;
set echo off
set feedback off
set heading off
TTITLE Center 'Shared Pool Reserved' Skip 1 -
Center '~~~~~~~~~~~~~~~~~~~~' Skip 2
select 'shared_pool_reserved_size init.ora paramater : '||to_char(value,'999,999,999')
from v$parameter where name = 'shared_pool_reserved_size'
union all
select 'Freespace on reserved list : '||to_char(FREE_SPACE,'999,999,999')
from v$shared_pool_reserved
union all
select 'Avg. size of free memory : ' || to_char(AVG_FREE_SIZE,'999,999,999')
from v$shared_pool_reserved
union all
select 'Num. of free places on reserd list : '|| to_char(FREE_COUNT,'999,999,999')
from v$shared_pool_reserved
union all
select 'Largest piece of free memory on reserved list : ' || to_char(MAX_FREE_SIZE,'999,999,999')
from v$shared_pool_reserved
union all
select 'Total used memory on reserved list : ' ||to_char(USED_SPACE,'999,999,999')
from v$shared_pool_reserved
union all
select 'Average size of used memory on reserved list : '||to_char(AVG_USED_SIZE,'999,999,999')
from v$shared_pool_reserved
union all
select 'Number of used pieces of memory on reserved list : '|| to_char(USED_COUNT,'999,999,999')
from v$shared_pool_reserved
union all
select 'Largest piece of used memory on reserved lsit : ' || to_char(MAX_USED_SIZE,'999,999,999')
from v$shared_pool_reserved
union all
select 'Number of times reserved list searched for free memory : '|| to_char(REQUESTS,'999,999,999')
from v$shared_pool_reserved
union all
select '- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - '
from dual
union all
select 'Number of times could reserved list has to start flushing LRU : ' || to_char(REQUEST_MISSES,'999,999,999')
from v$shared_pool_reserved
union all
select 'Size of last memory request miss : ' || to_char(LAST_MISS_SIZE,'999,999,999')
from v$shared_pool_reserved
union all
select 'Size of the largest memory request miss : ' ||to_char(MAX_MISS_SIZE,'999,999,999')
from v$shared_pool_reserved
union all
select 'Number of times no memory found (ORA-04031) : '||to_char(REQUEST_FAILURES,'999,999,999')
from v$shared_pool_reserved
union all
select 'Size of the last no memory found (ORA-04031) : '|| to_char(LAST_FAILURE_SIZE,'999,999,999')
from v$shared_pool_reserved
union all
select 'Minimum size of request that causes an ORA-04031 W/O flushing LRU: '|| to_char(ABORTED_REQUEST_THRESHOLD,'999,999,999,999')
from v$shared_pool_reserved
union all
select 'Number of requests that signaled ORA-04031 without flushing LRU : '|| to_char(ABORTED_REQUESTS,'999,999,999')
from v$shared_pool_reserved
union all
select 'Size of last request that signaled ORA-04031 : '|| to_char(LAST_ABORTED_SIZE,'999,999,999')
from v$shared_pool_reserved;
TTITLE off
set feedback on
set heading on
set underline off
set feedback off
COLUMN TEXT FOR a96 HEADING ''
SELECT 'V$SHARED_POOL_ADVICE displays information about estimated parse time savings in the shared pool for different sizes.' ||
CHR(10) || '.' ||
CHR(10) || 'SHARED POOL SIZE : Shared pool size for the estimate (in MB).' ||
CHR(10) || 'MULTIPLIER : Size factor with respect to the current shared' ||
CHR(10) || ' pool size. 1.00 = current shared pool size.' ||
CHR(10) || 'LIB. CACHE (MB) : Est. memory in use by the library cache (in MB)' ||
CHR(10) || 'LIB. CACHE OBJECTS: Est. number of library cache memory objects in' ||
CHR(10) || ' the shared pool of the specified size.' ||
CHR(10) || 'PARSE TIME SAVED : Est. elapsed parse time saved (in seconds), owing'||
CHR(10) || ' to library cache memory objects being found in a' ||
CHR(10) || ' shared pool of the specified size. This is the ' ||
CHR(10) || ' time that would have been spent in reloading the' ||
CHR(10) || ' required objects in the shared pool had they been'||
CHR(10) || ' aged out due to insufficient amount of available' ||
CHR(10) || ' free memory.' ||
CHR(10) || 'PARSE TIME SAVED FACTOR: Estimated parse time saved factor with respect' ||
CHR(10) || ' to the current shared pool size.' ||
CHR(10) || 'LIB. OBJ. HITS : Est. number of times a library cache memory object' ||
CHR(10) || ' was found in a shared pool of the specified size.'
as text
FROM dual;
set underline '-'
TTITLE off
set feedback onThis will show you the state of shared pool and help you decide on the proper size. -
Hi everybody;
When execute the cmd BRTOOLS, this error appears.
BR0250I BR_TRACE: level 2, function BrParamGet exit with 'pipe_copy_cmd rsh'
BR0248I BR_TRACE: level 2, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.sap'
BR0250I BR_TRACE: level 2, function BrParamGet exit with 'cpio_flags -ovcB'
BR0248I BR_TRACE: level 2, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.sap'
BR0250I BR_TRACE: level 2, function BrParamGet exit with 'cpio_in_flags -iuvcB'
BR0248I BR_TRACE: level 2, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.sap'
BR0250I BR_TRACE: level 2, function BrParamGet exit with 'cpio_disk_flags -pdcu'
BR0248I BR_TRACE: level 2, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.sap'
BR0250I BR_TRACE: level 2, function BrParamGet exit with 'dd_flags bs=64k'
BR0248I BR_TRACE: level 2, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.sap'
BR0250I BR_TRACE: level 2, function BrParamGet exit with 'dd_in_flags bs=64k'
BR0248I BR_TRACE: level 2, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.sap'
BR0250I BR_TRACE: level 2, function BrParamGet exit with 'saveset_members 1'
BR0248I BR_TRACE: level 2, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.sap'
BR0250I BR_TRACE: level 2, function BrParamGet exit with 'copy_out_cmd dd ibs=8k
obs=64k of=$'
BR0248I BR_TRACE: level 2, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.sap'
BR0250I BR_TRACE: level 2, function BrParamGet exit with 'copy_in_cmd dd ibs=64k
obs=8k if=$'
BR0248I BR_TRACE: level 2, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.sap'
BR0250I BR_TRACE: level 2, function BrParamGet exit with 'rewind mt -f $ rewind'
BR0248I BR_TRACE: level 2, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.sap'
BR0250I BR_TRACE: level 2, function BrParamGet exit with 'rewind_offline mt -f $
offline'
BR0248I BR_TRACE: level 2, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.sap'
BR0250I BR_TRACE: level 2, function BrParamGet exit with 'tape_pos_cmd mt -f $ f
sf $'
BR0248I BR_TRACE: level 2, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.sap'
BR0250I BR_TRACE: level 2, function BrParamGet exit with 'tape_size 400000M'
BR0248I BR_TRACE: level 2, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.sap'
BR0250I BR_TRACE: level 2, function BrParamGet exit with 'exec_parallel 0'
BR0248I BR_TRACE: level 2, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.sap'
BR0250I BR_TRACE: level 2, function BrParamGet exit with 'tape_address /dev/nmt0
BR0248I BR_TRACE: level 2, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.sap'
BR0250I BR_TRACE: level 2, function BrParamGet exit with 'tape_address_rew /dev/
mt0'
BR0248I BR_TRACE: level 2, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.sap'
BR0250I BR_TRACE: level 2, function BrParamGet exit with 'volume_archive LUNDI1'
BR0248I BR_TRACE: level 2, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.sap'
BR0250I BR_TRACE: level 2, function BrParamGet exit with 'volume_backup LUNDI1'
BR0248I BR_TRACE: level 2, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.sap'
BR0250I BR_TRACE: level 2, function BrParamGet exit with 'expir_period 08'
BR0248I BR_TRACE: level 2, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.sap'
BR0250I BR_TRACE: level 2, function BrParamGet exit with 'tape_use_count 100'
BR0248I BR_TRACE: level 2, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.sap'
BR0250I BR_TRACE: level 2, function BrParamGet exit with 'NULL'
BR0249I BR_TRACE: level 1, function BrInitSapRead exit with 0
BR0248I BR_TRACE: level 1, function global_set entry with 'dummy'
BR0249I BR_TRACE: level 1, function global_set exit with 0
BR0248I BR_TRACE: level 1, function BrInstProcess entry with 'SRQ'
BR0248I BR_TRACE: level 2, function BrInitOraRead entry with 'D:\oracle\SRQ\102\
database\initSRQ.ora'
BR0248I BR_TRACE: level 3, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.ora'
BR0250I BR_TRACE: level 3, function BrParamGet exit with '*._b_tree_bitmap_plans
FALSE'
BR0248I BR_TRACE: level 3, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.ora'
BR0250I BR_TRACE: level 3, function BrParamGet exit with '*._in_memory_undo FALS
E'
BR0248I BR_TRACE: level 3, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.ora'
BR0250I BR_TRACE: level 3, function BrParamGet exit with '*._index_join_enabled
FALSE'
BR0248I BR_TRACE: level 3, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.ora'
BR0250I BR_TRACE: level 3, function BrParamGet exit with '*._optim_peek_user_bin
ds FALSE'
BR0248I BR_TRACE: level 3, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.ora'
BR0250I BR_TRACE: level 3, function BrParamGet exit with '*._optimizer_mjc_enabl
ed FALSE'
BR0248I BR_TRACE: level 3, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.ora'
BR0250I BR_TRACE: level 3, function BrParamGet exit with '*._sort_elimination_co
st_ratio 10'
BR0248I BR_TRACE: level 3, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.ora'
BR0250I BR_TRACE: level 3, function BrParamGet exit with '*._table_lookup_prefet
ch_size 0'
BR0248I BR_TRACE: level 3, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.ora'
BR0250I BR_TRACE: level 3, function BrParamGet exit with '*.background_dump_dest
E:\oracle\SRQ\saptrace\background'
BR0248I BR_TRACE: level 3, function BrOraReplace entry with 'E:\oracle\SRQ\saptr
ace\background'
BR0250I BR_TRACE: level 3, function BrOraReplace exit with 'void'
BR0248I BR_TRACE: level 3, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.ora'
BR0250I BR_TRACE: level 3, function BrParamGet exit with '*.compatible 10.2.0'
BR0248I BR_TRACE: level 3, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.ora'
BR0250I BR_TRACE: level 3, function BrParamGet exit with '*.control_file_record_
keep_time 30'
BR0248I BR_TRACE: level 3, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.ora'
BR0250I BR_TRACE: level 3, function BrParamGet exit with '*.control_files E:\ora
cle\SRQ\origlogA\cntrl\cntrlSRQ.dbf'
BR0248I BR_TRACE: level 3, function BrOraReplace entry with 'E:\oracle\SRQ\origl
ogA\cntrl\cntrlSRQ.dbf'
BR0250I BR_TRACE: level 3, function BrOraReplace exit with 'void'
BR0248I BR_TRACE: level 3, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.ora'
BR0250I BR_TRACE: level 3, function BrParamGet exit with '*.core_dump_dest E:\or
acle\SRQ\saptrace\background'
BR0248I BR_TRACE: level 3, function BrOraReplace entry with 'E:\oracle\SRQ\saptr
ace\background'
BR0250I BR_TRACE: level 3, function BrOraReplace exit with 'void'
BR0248I BR_TRACE: level 3, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.ora'
BR0250I BR_TRACE: level 3, function BrParamGet exit with '*.db_block_size 8192'
BR0248I BR_TRACE: level 3, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.ora'
BR0250I BR_TRACE: level 3, function BrParamGet exit with '*.db_cache_size 966210
355'
BR0248I BR_TRACE: level 3, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.ora'
BR0250I BR_TRACE: level 3, function BrParamGet exit with '*.db_files 254'
BR0248I BR_TRACE: level 3, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.ora'
BR0250I BR_TRACE: level 3, function BrParamGet exit with '*.db_name SRQ'
BR0248I BR_TRACE: level 3, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.ora'
BR0250I BR_TRACE: level 3, function BrParamGet exit with '*.dml_locks 4000'
BR0248I BR_TRACE: level 3, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.ora'
BR0250I BR_TRACE: level 3, function BrParamGet exit with '*.event 10191 trace na
me context forever, level 1'
BR0248I BR_TRACE: level 3, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.ora'
BR0250I BR_TRACE: level 3, function BrParamGet exit with '*.filesystemio_options
setall'
BR0248I BR_TRACE: level 3, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.ora'
BR0250I BR_TRACE: level 3, function BrParamGet exit with '*.job_queue_processes
1'
BR0248I BR_TRACE: level 3, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.ora'
BR0250I BR_TRACE: level 3, function BrParamGet exit with '*.log_archive_dest E:\
oracle\SRQ\oraarch\SRQarch'
BR0248I BR_TRACE: level 3, function BrOraReplace entry with 'E:\oracle\SRQ\oraar
ch\SRQarch'
BR0250I BR_TRACE: level 3, function BrOraReplace exit with 'void'
BR0248I BR_TRACE: level 3, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.ora'
BR0250I BR_TRACE: level 3, function BrParamGet exit with '*.log_buffer 1048576'
BR0248I BR_TRACE: level 3, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.ora'
BR0250I BR_TRACE: level 3, function BrParamGet exit with '*.log_checkpoint_inter
val 0'
BR0248I BR_TRACE: level 3, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.ora'
BR0250I BR_TRACE: level 3, function BrParamGet exit with '*.log_checkpoints_to_a
lert true'
BR0248I BR_TRACE: level 3, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.ora'
BR0250I BR_TRACE: level 3, function BrParamGet exit with '*.open_cursors 800'
BR0248I BR_TRACE: level 3, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.ora'
BR0250I BR_TRACE: level 3, function BrParamGet exit with '*.parallel_execution_m
essage_size 16384'
BR0248I BR_TRACE: level 3, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.ora'
BR0250I BR_TRACE: level 3, function BrParamGet exit with '*.pga_aggregate_target
629145600'
BR0248I BR_TRACE: level 3, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.ora'
BR0250I BR_TRACE: level 3, function BrParamGet exit with '*.processes 150'
BR0248I BR_TRACE: level 3, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.ora'
BR0250I BR_TRACE: level 3, function BrParamGet exit with '*.query_rewrite_enable
d false'
BR0248I BR_TRACE: level 3, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.ora'
BR0250I BR_TRACE: level 3, function BrParamGet exit with '*.recyclebin off'
BR0248I BR_TRACE: level 3, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.ora'
BR0250I BR_TRACE: level 3, function BrParamGet exit with '*.remote_login_passwor
dfile exclusive'
BR0248I BR_TRACE: level 3, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.ora'
BR0250I BR_TRACE: level 3, function BrParamGet exit with '*.remote_os_authent tr
ue'
BR0248I BR_TRACE: level 3, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.ora'
BR0250I BR_TRACE: level 3, function BrParamGet exit with '*.replication_dependen
cy_tracking false'
BR0248I BR_TRACE: level 3, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.ora'
BR0250I BR_TRACE: level 3, function BrParamGet exit with '*.sessions 300'
BR0248I BR_TRACE: level 3, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.ora'
BR0250I BR_TRACE: level 3, function BrParamGet exit with '*.sga_max_size 1932420
710'
BR0248I BR_TRACE: level 3, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.ora'
BR0250I BR_TRACE: level 3, function BrParamGet exit with '*.shared_pool_reserved
_size 96621035'
BR0248I BR_TRACE: level 3, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.ora'
BR0250I BR_TRACE: level 3, function BrParamGet exit with '*.shared_pool_size 966
210355'
BR0248I BR_TRACE: level 3, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.ora'
BR0250I BR_TRACE: level 3, function BrParamGet exit with '*.sort_area_retained_s
ize 0'
BR0248I BR_TRACE: level 3, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.ora'
BR0250I BR_TRACE: level 3, function BrParamGet exit with '*.sort_area_size 20971
52'
BR0248I BR_TRACE: level 3, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.ora'
BR0250I BR_TRACE: level 3, function BrParamGet exit with '*.star_transformation_
enabled true'
BR0248I BR_TRACE: level 3, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.ora'
BR0250I BR_TRACE: level 3, function BrParamGet exit with '*.undo_management AUTO
BR0248I BR_TRACE: level 3, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.ora'
BR0250I BR_TRACE: level 3, function BrParamGet exit with '*.undo_retention 43200
BR0248I BR_TRACE: level 3, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.ora'
BR0250I BR_TRACE: level 3, function BrParamGet exit with '*.undo_tablespace PSAP
UNDO'
BR0248I BR_TRACE: level 3, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.ora'
BR0250I BR_TRACE: level 3, function BrParamGet exit with '*.user_dump_dest E:\or
acle\SRQ\saptrace\usertrace'
BR0248I BR_TRACE: level 3, function BrOraReplace entry with 'E:\oracle\SRQ\saptr
ace\usertrace'
BR0250I BR_TRACE: level 3, function BrOraReplace exit with 'void'
BR0248I BR_TRACE: level 3, function BrParamGet entry with 'D:\oracle\SRQ\102\dat
abase\initSRQ.ora'
BR0250I BR_TRACE: level 3, function BrParamGet exit with 'NULL'
BR0249I BR_TRACE: level 2, function BrInitOraRead exit with 0
BR0249I BR_TRACE: level 1, function BrInstProcess exit with 0
BR0248I BR_TRACE: level 1, function stat_mem_allocate entry with 'void'
BR0250I BR_TRACE: level 1, function stat_mem_allocate exit with 'void'
BR0248I BR_TRACE: level 1, function brt_main_menu entry with 'void'
BR0248I BR_TRACE: level 2, function BrNameBuild entry with '39 D:\oracle\SRQ\102
\database\initSRQ.sap NULL'
BR0250I BR_TRACE: level 2, function BrNameBuild exit with 'initSRQ.sap'
BR0248I BR_TRACE: level 2, function BrNameBuild entry with '39 D:\oracle\SRQ\102
\database\initSRQ.sap NULL'
BR0250I BR_TRACE: level 2, function BrNameBuild exit with 'initSRQ.sap'
BR0248I BR_TRACE: level 2, function BrNameBuild entry with '39 D:\oracle\SRQ\102
\database\initSRQ.sap NULL'
BR0250I BR_TRACE: level 2, function BrNameBuild exit with 'initSRQ.sap'
BR0248I BR_TRACE: level 2, function BrNameBuild entry with '39 D:\oracle\SRQ\102
\database\initSRQ.sap NULL'
BR0250I BR_TRACE: level 2, function BrNameBuild exit with 'initSRQ.sap'
BR0248I BR_TRACE: level 2, function BrMenuProcess entry with 1
BR0248I BR_TRACE: level 3, function BrOraSigPatch entry with 'TRUE'
BR0249I BR_TRACE: level 3, function BrOraSigPatch exit with 0
BR0280I BRTOOLS time stamp: 2014-05-12 15.35.17
BR0656I Choice menu 1 - please make a selection
BR*Tools main menu
1 = Instance management
2 - Space management
3 - Segment management
4 - Backup and database copy
5 - Restore and recovery
6 - Check and verification
7 - Database statistics
8 - Additional functions
9 - Exit program
Standard keys: c - cont, b - back, s - stop, r - refr, h - help
BR0662I Enter your choice:
plz your help, ti's very urgentHi,
BR_TRACE: level 2
Message means you've activated brtool trace.It's not an issue,you just deactivate the trace by unset BR_TRACE under environment variable.
Refer SAP Note : 29321
Regards,
Gaurav -
ORA-04031: unable to allocate
hi gurus,
I am getting the following error whenever try to access database from client side or login to SQL*Plus :
ora 04031, 00000, "unable to allocate %s bytes of shared memory (\"%s\",\"%s\",\"%s")"
But i can login on server and working properly.
I am using oracle 9i release 1 on win 2k.
Can any one help me to come out of this problem.
Thanks
Regards,
RaghvThanks Joel to have some time for this post.
Hope these details will help you to understand the problem.
How long is the virtual memory of your OS ?Minimum : 744 MB Maximum : 1488 MB
How long is the RAM memory of the OS ?RAM : 640 MB
Do you have several instances in the same OS ?No,only single instance
Details from init.ora file:
# Cache and I/O
db_block_size=4096
db_cache_size=33554432
# Cursors and Library Cache
open_cursors=300
# Network Registration
instance_name=orcl
# Pools
java_pool_size=33554432
large_pool_size=1048576
shared_pool_size=33554432
# Processes and Sessions
processes=150
# Redo Log and Recovery
fast_start_mttr_target=300
Desired query output :
SQL> select * from v$shared_pool_reserved;
no rows selected
SQL> select * from v$sgastat where name='free memory';
POOL NAME BYTES
shared pool free memory 3301916
large pool free memory 4294613080
java pool free memory 28954624
SQL> select sum(bytes) from v$sgastat where pool = 'shared pool';
SUM(BYTES)
46137344
SQL> select sum(bytes) from v$sgastat where pool = 'java pool';
SUM(BYTES)
33554432
SQL> select sum(bytes) from v$sgastat where pool = 'large pool';
SUM(BYTES)
4.295E+09
Regards,
Raghv -
Shared Pool Statistics - awr report -m 10.2.0.1
Hi,
I'm new to reading awr report and performance tuning.
I have the below in my statspack.
Do i need to increase my shared pool?
Any one can advise and explain "% Memory for SQL w/exec" and "% SQL with executions>1"
Shared Pool Statistics
Begin End
Memory Usage %: 95.78 97.71
% SQL with executions>1: 51.51 80.85
% Memory for SQL w/exec> 1: 67.88 82.46
thanks!user21123 wrote:
The sweet point for the shared pool Memory Usage % is at about ~70%-80% because of aging out. You are at ~90%. It would be advisable to increase the shared pool, but if you're using 10g SGA_TARGET and SGA_MAX_SIZE, then that might require increasing those parameters. It depends how your AWR report looks for the Buffer Cache.
What makes you think this ?
In an OLTP system you hope for 100% shareable SQL, and correct allocation for the other objects, which would lead to 100% usage. In realistic terms, you're likely to get a few percent (which is often the shared_pool_reserved) free because there's a constant turn-over of non-shareable SQL.
If you're always seeing 70% - 80%, then there are several scenraios that might explain the figure. One is that you've simply made shared pool a bit too big. At the opposite extreme you might be constantly flushing 20%-30% of the material from the shared pool because it has become so fragmented that you have to clear a lot of garbage to create a small amount of contiguous space.
The best guideline to follow is to check whether you appear to be losing a significant amount of time on libarary cache and shared pool latches, using up an undesirable amount of CPU on parse time, see lots of reloads (without corresponding invalidations) in v$librarycache.
Without further information, we really can't say how good or bad the situation is. In fact, it's possible that the information that +"50% of your SQL has been shared, 50% has been single use"+ is a possible indicator that the shared_pool_size is too small, and we are filling the excess space with garbage rather than keeping the garbage (and library cache search time) to a minimum.
I would be interested to hear the thinking behind your suggestion, though.
Regards
Jonathan Lewis
http://jonathanlewis.wordpress.com
http://www.jlcomp.demon.co.uk
"The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge." Stephen Hawking. -
ASMM and shared_pool_reserved_size
Hello All,
Setting below parameters would affect memory available to MMAN when ASMM is turned on.
shared_pool_size
java_pool_size
large_pool_size
streams_pool_size
db_cache_size
Is this true for Shared_pool_reserved_size as well?
Thanks
S~SHARED_POOL_RESERVED_SIZE is taken from SHARED_POOL_SIZE
Oracle recommend set it to 10% of SHARED_POOL_SIZE default is 5%,
upper limit of this pool is 50% of SHARED_POOL_SIZE, over that Oracle will signal error.
In ASMM the shared pool size is dynamic so you better not set this pool size too high.
7.3.8.1 Using SHARED_POOL_RESERVED_SIZE
The default value for SHARED_POOL_RESERVED_SIZE is 5% of the SHARED_POOL_SIZE. This means that, by default, the reserved list is configured.
If you set SHARED_POOL_RESERVED_SIZE to more than half of SHARED_POOL_SIZE, then Oracle signals an error. Oracle does not let you reserve too much memory for the reserved pool. The amount of operating system memory, however, might constrain the size of the shared pool. In general, set SHARED_POOL_RESERVED_SIZE to 10% of SHARED_POOL_SIZE. For most systems, this value is sufficient if you have already tuned the shared pool. If you increase this value, then the database takes memory from the shared pool. (This reduces the amount of unreserved shared pool memory available for smaller allocations.)
Statistics from the V$SHARED_POOL_RESERVED view help you tune these parameters. On a system with ample free memory to increase the size of the SGA, the goal is to have the value of REQUEST_MISSES equal zero. If the system is constrained for operating system memory, then the goal is to not have REQUEST_FAILURES or at least prevent this value from increasing.
If you cannot achieve these target values, then increase the value for SHARED_POOL_RESERVED_SIZE. Also, increase the value for SHARED_POOL_SIZE by the same amount, because the reserved list is taken from the shared pool.
SHARED_POOL_RESERVED_SIZE -
Hello Team:
I ran a metalink script to report the shared pool utilization recently. I took this output when the database was on peak load.
SQL> /
Obj mem: 66435759 bytes (63.36MB)
Shared sql: 324219036 bytes (309.2MB)
Cursors: 341207073 bytes (325.4MB)
Free memory: 67228508 bytes (64.11MB)
Shared pool utilization (total): 468785754 bytes (447.07MB)
Shared pool allocation (actual): 754974720bytes (720MB)
Percentage Utilized: 91%
does this mean I have to add more space to shared pool. If so what is the threshold value?
Regards,
BalaBhawani nandan Prasad - Principal DBA -- See a to z diagnostics about Shared pool
1. Memory 2
a. Shared Pool 2
1. Introduction 2
2. Architecture 2
3. Scripts for different DBA tasks: 5
a.Measure object usage inside the shared pool and Tune shared pool 7
b.Check reload problem in library cache 12
c.Find the large queries in the shared pool library cache (using > 4mb each) 13
d.Find objects that can be considered pining into the shared pool 13
e.LRU work and objects were loaded and flushed 13
f.How much are waiting for Library Cache Latch 14
g.Queries identical but aren’t shared. 14
h.Get Biggest chunk of free memory. 14
i.Check the shared pool reserved size status 16
j.When having multiple subheaps: 16
k.Check shared pool at first glance quick diagnostics 17
l.Memory Usage - object list level view 17
m.Loads Number of times object has been loaded 17
n.Check number of times and object has been executed 18
o.Check shared pool in more details 18
p.Library Cache Statistics 18
q.Reserve Pool Settings 19
r.Pinned Objects 19
s.Finding literal SQL 19
t.Finding the Library Cache hit ratio 19
u. Row Cache Misses – Dictionary cache stats 19
v. Checking hash chain lengths 20
w. Checking for high version counts 20
x. Finding statement/s which use lots of shared pool memory 20
y. Allocations causing shared pool memory to be 'aged' out 21
z. Issues in various Oracle Releases 21
4. Terminology 22
5. Oracle 11g Caching and Pooling – SQL Result Cache 27
6. References 37
2. SQL 38
3. Statistics 38
4. Wait events 38
5. Schema 39
6. General 39
a. Scripts 39
1. accept.sql 39
1. Memory
a. Shared Pool
1. Introduction
Shared pool is used to cache different types of data such as textual and executable forms of PL/SQL blocks and SQL statements, dictionary cache data, and other data in SGA. Additional shared memory needed in the SHARED POOL if using ASM storage. Gathering schema/database stats (table/index stats) makes database query performance better and it reduce utilization of shared pool. Hence, practice to schedule job to gather stats regularly which suites your database performance. If you use shared pool effectively you can reduce resource consumption in at least four ways
1. Parse overhead is avoided if the SQL statement is already in the shared pool. This saves CPU resources on the host and elapsed time for the end user.
2. Latching resource usage is significantly reduced, which results in greater scalability.
3. Shared pool memory requirements are reduced, because all applications use the same pool of SQL statements and dictionary resources.
4. I/O resources are saved, because dictionary elements that are in the shared pool do not require disk access.
This sharable area of memory is managed as a sophisticated cache and heap manager rolled into one. It has 3 fundamental problems to overcome:
1. The unit of memory allocation is not a constant - memory allocations from the pool can be anything from a few bytes to many kilobytes
2. Not all memory can be 'freed' when a user finishes with it (as is the case in a traditional heap manager) as the aim of the shared pool is to maximize share of information. The information in the memory may be useful to another session - Oracle cannot know in advance if the items will be of any use to anyone else or not.
3. There is no disk area to page out to so this is not like a traditional cache where there is a file backing store. Only "rewriteable" information can be discarded from the cache and it has to be re-created when it is next needed.
Oracle 10g architecture of Shared pool:
Library Cache Shared SQL Area (Hash Value, SQL source, Execution plan)
Data Dictionary Cache
Enqueues Fixed Area Other
Latches
Oracle 11g architecture of Shared pool:
Library Cache Shared SQL Area (Hash Value, SQL source, Execution plan)
Data Dictionary Cache
Result Cache
Enqueues Fixed Area Other
Latches
1. Library Cache
Shared Sql Area: contains Parsed SQL and execution Plans for statements already run against the database. This area allows SQL execution plans to be reused by many users.
Private SQL Area: Private SQL areas are non-shared memory areas assigned to unique user sessions.
Pl/sql Area: contains the recently executed Procedures, Functions and Packages.
Control Structures: Common control structure information example Memory for Latches and locks, sequence cache.
2. Dictionary cache known as the row cache.
Dictionary cache stores all the metadata info of tables and views in the database, Names and data types of the columns in the database, Object and system privileges of all the Users. Oracle maintains the stats of all the objects in the shared pool, if any of the memory objects are not used from the last 3 seconds, these memory objects will be aged out and will be removed from the cache. All the Shared Pool Structures are maintained by a LRU (least recently Used) algorithm, by which Oracle removes the objects from the shared Pool, until there is enough free space in the shared Pool to keep new Object.
3. Scripts for different DBA tasks:
Dictionary Views for shared POOL:
NON-RAC
V$DB_CACHE_ADVICE
V$DB_OBJECT_CACHE
V$DLM_LATCH
V$DLM_LOCKS
V$LATCH
V$LATCHHOLDER
V$LATCHNAME
V$LATCH_CHILDREN
V$LATCH_MISSES
V$LATCH_PARENT
V$LIBRARYCACHE
V$LOCK
V$LOCKED_OBJECT
V$LOCKS_WITH_COLLISIONS
V$LOCK_ACTIVITY
V$LOCK_ELEMENT
V$OPEN_CURSOR
V$PROCESS
V$PX_PROCESS
V$PX_PROCESS_SYSSTAT
V$PX_SESSION
V$PX_SESSTAT
V$ROWCACHE
V$ROWCACHE_PARENT
V$ROWCACHE_SUBORDINATE
V$SESSION
V$SESSION_CONNECT_INFO
V$SESSION_CURSOR_CACHE
V$SESSION_EVENT
V$SESSION_LONGOPS
V$SESSION_OBJECT_CACHE
V$SESSION_WAIT
V$SESSTAT
V$SESS_IO
V$SGA
V$SGASTAT
V$SGAINFO
V$SGA_DYAMIC_COMPONENTS
V$SGA_DYNAMIC_FREE_MEMORY
V$SGA_RESIZE_OPS
V$SGA_CURRENT_RESIZE_OPS
v$shared_pool_advice
V_$SHARED_POOL_ADVICE
V$SHARED_POOL_RESERVED
V$SHARED_SERVER
V$SORT_SEGMENT
V$SORT_USAGE
V$SQL
V$SQLAREA
V$SQLTEXT
V$SQLTEXT_WITH_NEWLINES
V$SQL_BIND_DATA
V$SQL_BIND_METADATA
V$SQL_CURSOR
V$SQL_SHARED_CURSOR
V$SQL_SHARED_MEMORY
V$STATNAME
V$SUBCACHE
V$SYSSTAT
V$SYSTEM_CURSOR_CACHE
V$SYSTEM_EVENT
V$SYSTEM_PARAMETER
X$KSMSP
RAC
GV$LATCH
GV$LATCHHOLDER
GV$LATCHNAME
GV$LATCH_CHILDREN
GV$LATCH_MISSES
GV$LATCH_PARENT
GV$LIBRARYCACHE
GV$LOCK
GV$LOCKED_OBJECT
GV$LOCKS_WITH_COLLISIONS
GV$LOCK_ACTIVITY
GV$LOCK_ELEMENT
GV$PROCESS
GV$PX_PROCESS
GV$PX_PROCESS_SYSSTAT
GV$PX_SESSION
GV$PX_SESSTAT
GV$ROWCACHE
GV$ROWCACHE_PARENT
GV$ROWCACHE_SUBORDINATE
GV$SESSION
GV$SESSION_CONNECT_INFO
GV$SESSION_CURSOR_CACHE
GV$SESSION_EVENT
GV$SESSION_LONGOPS
GV$SESSION_OBJECT_CACHE
GV$SESSION_WAIT
GV$SESSTAT
GV$SESS_IO
GV$SGA
GV$SGASTAT
gv$shared_pool_advice
GV$SHARED_POOL_RESERVED
GV$SHARED_SERVER
GV$SORT_SEGMENT
GV$SORT_USAGE
GV$SQL
GV$SQLAREA
GV$SQLTEXT
GV$SQLTEXT_WITH_NEWLINES
GV$SQL_BIND_DATA
GV$SQL_BIND_METADATA
GV$SQL_CURSOR
GV$SQL_SHARED_CURSOR
GV$SQL_SHARED_MEMORY
GV$STATNAME
GV$SUBCACHE
GV$SYSSTAT
GV$SYSTEM_CURSOR_CACHE
GV$SYSTEM_EVENT
GV$SYSTEM_PARAMETER
GV$WAITSTAT
GV$_LOCK
a.Measure object usage inside the shared pool and Tune shared pool
set pagesize 132
column owner format a16
column name format a36
column sharable_mem format 999,999,999
column executions format 999,999,999
prompt
prompt Memory Usage of Shared Pool Order - Biggest First
prompt
column name format 45
select owner, name||' - '||type name, sharable_mem from v$db_object_cache
where sharable_mem > 10000
and type in ('PACKAGE', 'PACKAGE BODY', 'FUNCTION', 'PROCEDURE')
order by sharable_mem desc
prompt
prompt Loads into Shared Pool - Most Loads First
prompt
select owner, name||' - '||type name, loads , sharable_mem from v$db_object_cache
where loads > 3
and type in ('PACKAGE', 'PACKAGE BODY', 'FUNCTION', 'PROCEDURE')
order by loads desc
prompt
prompt Executions of Objects in the Shared Pool - Most Executions First
prompt
select owner, name||' - '||type name, executions from v$db_object_cache
where executions > 100
and type in ('PACKAGE', 'PACKAGE BODY', 'FUNCTION', 'PROCEDURE')
order by executions desc
select 'If the values for the EXEC and LOADS close increase SHARED_POOL_SIZE!' from dual ;
set feedback off
set linesize 80
set pagesize 52
clear columns
clear breaks
col executions HEADING EXEC
col sharable_mem heading SHAMEM
col owner format a8
col name format a30
col type format a12
set numwidth 8
ttitle center 'Data Base Objects Owned by All Users Statistics' skip 2
select name, type, sharable_mem, loads, executions, pins
from sys.v_$db_object_cache ;
b.Check reload problem in library cache
select namespace, pins, reloads from v$librarycache;
show parameters shared_pool
select bytes/1024/1024 from v$sgastat where pool='shared pool' and name='free memory';
c.Find the large queries in the shared pool library cache (using > 4mb each)
SELECT sql_text "Stmt", count(*), sum(sharable_mem) "Mem",
sum(users_opening) "Open", sum(executions) "Exec"
FROM v$sql GROUP BY sql_text HAVING sum(sharable_mem) > 4096000;
d.Find objects that can be considered pining into the shared pool
column name format a40
column owner format a15
select owner, name, executions, locks, pins, loads, kept from v$db_object_cache where loads > 10;
create temp table and insert records of candidates to be pinned.
CREATE TABLE LRU_TMP AS SELECT * FROM X$KSMLRU;
INSERT INTO LRU_TMP SELECT * FROM X$KSMLRU;
Use the LRU_TMP table for analysis.
SELECT USERNAME, KSMLRCOM, KSMLRHON, KSMLRNUM, KSMLRSIZ, SQL_TEXT
FROM V$SQLAREA A, LRU_TMP K, V$SESSION S WHERE KSMLRSIZ > 3000
AND A.ADDRESS=S.SQL_ADDRESS AND A.HASH_VALUE = S.SQL_HASH_VALUE
AND SADDR=KSMLRSES;
You can see the candidates to pin from the query below
COL STORED_OBJECT FORMAT A40;
COL SQ_EXECUTIONS FORMAT 999,999;
SELECT /*+ ORDERED USE_HASH(D) USE_HASH(C) */ O.KGLNAOWN||’.'||O.KGLNAOBJ STORED_OBJECT, SUM(C.KGLHDEXC) SQL_EXECUTIONS
FROM SYS.X$KGLOB O, SYS.X$KGLRD D, SYS.X$KGLCURSOR C
WHERE
O.INST_ID = USERENV(’INSTANCE’) AND
D.INST_ID = USERENV(’INSTANCE’) AND
C.INST_ID = USERENV(’INSTANCE’) AND
O.KGLOBTYP IN (7, 8, 9, 11, 12) AND
D.KGLHDCDR = O.KGLHDADR AND
C.KGLHDPAR = D.KGLRDHDL
GROUP BY O.KGLNAOWN, O.KGLNAOBJ
HAVING SUM(C.KGLHDEXC) > 0
ORDER BY 2 DESC;
How to pin object
EXECUTE SYS.DBMS_SHARED_POOL.SIZES(150);
EXECUTE SYS.DBMS_SHARED_POOL.KEEP('SYS.STANDARD');
EXECUTE SYS.DBMS_SHARED_POOL.UNKEEP('SYS.STANDARD');
e.LRU work and objects were loaded and flushed
LRU work in the shared pool KSMLRNUM stores the number of objects that were flushed to load the large object. KSMLRISZ stores the size of the object that was loaded (contiguous memory allocated)
column ksmlrcom format a20
column username format a5
select username,sid,KSMLRCOM,KSMLRSIZ,KSMLRNUM, KSMLRHON, KSMLROHV, KSMLRSES from x$ksmlru , v$session where KSMLRSES=SADDR and KSMLRNUM >2 ;
f.How much are waiting for Library Cache Latch
select count(*),event from v$session_wait where event not like '%SQL%' and event not like '%ipc%' and event not like '%timer%' GROUP BY EVENT;
select count(*),wait_time from v$session_wait where event='latch free' and p2=106 group by wait_time;
select sid,wait_time,seconds_in_wait from v$session_wait where event='latch free' and p2=106 and WAIT_TIME>1;
g.Queries identical but aren’t shared.
SELECT address, hash_value, version_count , users_opening , users_executing,
substr(sql_text,1,240) "SQL" FROM v$sqlarea WHERE version_count > 10;
h.Get Biggest chunk of free memory.
select sysdate, decode( sign(ksmchsiz - 812), -1, (ksmchsiz - 16) / 4,
decode(sign(ksmchsiz - 4012),-1, trunc((ksmchsiz + 11924) / 64),
decode(sign(ksmchsiz - 65548), -1, trunc(1/log(ksmchsiz - 11, 2)) + 238,254))) bucket,
sum(ksmchsiz) free_space, count(*) free_chunks, trunc(avg(ksmchsiz)) average_size,
max(ksmchsiz) biggest from x$ksmsp
where inst_id = userenv('Instance') and ksmchcls = 'free' group by
decode(sign(ksmchsiz - 812),-1, (ksmchsiz - 16) / 4,
decode(sign(ksmchsiz - 4012),-1, trunc((ksmchsiz + 11924) / 64),
decode(sign(ksmchsiz - 65548),-1, trunc(1/log(ksmchsiz - 11, 2)) + 238,254 ))) ;
SELECT KSMCHCLS CLASS, COUNT(KSMCHCLS) NUM, SUM(KSMCHSIZ) SIZ,
To_char( ((SUM(KSMCHSIZ)/COUNT(KSMCHCLS)/1024)),’999,999.00′)||’k’ “AVG SIZE”
FROM X$KSMSP GROUP BY KSMCHCLS;
CLASS NUM SIZ AVG SIZE
freeabl 19010 34519404 1.77k
recr 23581 24967956 1.03k
R-freea 68 1632 .02k
perm 22 39801268 1,766.75k
R-free 34 7238192 207.90k
free 2389 36075980 14.75k
Watch for trends using these guidelines:
a) if ‘free’ memory is low (less than 5mb or so) you may need to increase the shared_pool_size and shared_pool_reserved_size. You should expect ‘free’ memory to increase and decrease over time. Seeing trends where ‘free’ memory decreases consistently is not necessarily a problem, but seeing consistent spikes up and down could be a problem.
b) if ‘freeable’ or ‘perm’ memory continually grows then it is possible you are seeing a memory bug.
c) if ‘freeabl’ and ‘recr’ memory classes are always huge, this indicates that you have a lot of cursor info stored that is not releasing.
d) if ‘free’ memory is huge but you are still getting 4031 errors, the problem is likely reloads and invalids in the library cache causing fragmentation.
-Note says that this query can hang database on HP platforms
See the shared pool parameters
column name format a30
select name,value from v$parameter where name like '%shared_pool%' ;
select x.ksppinm, y.ksppstvl from x$ksppi x , x$ksppcv y where x.indx = y.indx and lower(x.ksppinm) like '%spin%';
SELECT count(*) FROM v$latch_children WHERE NAME = 'library cache';
Shrinking and growing operations from V$SGA_RESIZE_OPS dynamic view:
select to_char(end_time, ‘dd-Mon-yyyy hh24:mi’) end, oper_type, initial_size, target_size, final_size from V$SGA_RESIZE_OPS where component=’shared pool’ order by end;
#shared_pool_summary.sql -get an overview of chunks in the shared pool
select
ksmchcom contents,
count(*) chunks,
sum(decode(ksmchcls, 'recr', ksmchsiz)) recreatable,
sum(decode(ksmchcls, 'freeabl', ksmchsiz)) freeable,
sum(ksmchsiz) total
from
sys.x_$ksmsp
where
inst_id = userenv('Instance') and
ksmchcls not like 'R%'
group by
ksmchcom
#reserved_pool_summary.sql - get an overview of chunks in the reserved pool
select
ksmchcom contents,
count(*) chunks,
sum(decode(ksmchcls, 'R-recr', ksmchsiz)) recreatable,
sum(decode(ksmchcls, 'R-freea', ksmchsiz)) freeable,
sum(ksmchsiz) total
from
sys.x_$ksmspr
where
inst_id = userenv('Instance')
group by
ksmchcom
#save_sqlplus_settings.sql -reset sqlplus settings
set termout off
store set sqlplus_settings replace
clear breaks
clear columns
clear computes
set feedback off
set verify off
set termout on
set define "&"
#restore_sqlplus_settings.sql -reset sqlplus settings
set termout off
@sqlplus_settings
clear breaks
clear columns
clear computes
set termout on
i.Check the shared pool reserved size status
SELECT free_space, avg_free_size, used_space, avg_used_size, REQUEST_MISSES, request_failures, last_miss_size FROM v$shared_pool_reserved;
An ORA-04031 error referencing large failed requests, indicates the Reserved Area is too fragmented. The reserved pool is small when: REQUEST_FAILURES > 0 (and increasing), The DBA should Increase shared_pool_reserved_size and shared_pool_size together. It is possible that too much memory has been allocated to the reserved list. The DBA should Decrease shared_pool_reserved_size, If: REQUEST_MISS = 0 or not increasing
FREE_MEMORY = > 50% of shared_pool_reserved_size minimum
col free_space for 999,999,999,999 head “TOTAL FREE”
col avg_free_size for 999,999,999,999 head “AVERAGE|CHUNK SIZE
col free_count for 999,999,999,999 head “COUNT”
col request_misses for 999,999,999,999 head “REQUEST|MISSES
col request_failures for 999,999,999,999 head “REQUEST|FAILURES”
col max_free_size for 999,999,999,999 head “LARGEST CHUNK”
select free_space, avg_free_size, free_count, max_free_size, request_misses, request_failures from v$shared_pool_reserved;
TOTAL FREE AVERAGE
CHUNK SIZE COUNT LARGEST CHUNK REQUEST
MISSES REQUEST
FAILURES
7,238,192 212,888 34 212,888 0 0
You should also use hidden and unsupported parameter “_shared_pool_reserved_pct” to control reserved pool. This parameter controls the allocated percentage of shared pool for reserved pool. By default it is %5 of the shared pool and if you use ASMM for memory management you can set this value higher like 10 to allocate reserved pool dynamically. When you set the parameter you will see the shared_pool_reserved_size parameter will be adjusted to the new setting. The parameter can not be modified when instance is started. You can use the query below to see the current value
select a.ksppinm “Parameter”, b.ksppstvl “Session Value”, c.ksppstvl “Instance Value” from sys.x$ksppi a, sys.x$ksppcv b, sys.x$ksppsv c where a.indx = b.indx and a.indx = c.indx and a.ksppinm = ‘_shared_pool_reserved_pct’;
Parameter Session Value Instance Value
sharedpool_reserved_pct 10 10
j.When having multiple subheaps:
select KSMCHIDX, ksmchcom ChunkComment,
decode(round(ksmchsiz/1000),0,'0-1K', 1,'1-2K', 2,'2-3K', 3,'3-4K',4,'4-5K',5,'5-6k',6,'6-7k',7,'7-8k',8,'8-9k', 9,'9-10k', '> 10K'), count(*), ksmchcls Status, sum(ksmchsiz) Bytes
from x$ksmsp where KSMCHCOM = 'free memory' group by KSMCHIDX,ksmchcom, ksmchcls, decode(round(ksmchsiz/1000),0,'0-1K', 1,'1-2K', 2,'2-3K', 3,'3-4K',4,'4-5K',5,'5-6k',6,'6-7k',7,'7-8k',8,'8-9k', 9,'9-10k','> 10K');
SubPool SGA_HEAP CHUNKCOMMENT size COUNT(*) STATUS BYTES
1 sga heap(1,0) free memory > 10K 34 R-free 7238192
1 sga heap(1,0) free memory 3-4K 2 free 6284
1 sga heap(1,0) free memory > 10K 241 free 35707400
1 sga heap(1,0) free memory 8-9k 1 free 7712
1 sga heap(1,0) free memory 2-3K 4 free 6752
1 sga heap(1,0) free memory 0-1K 2090 free 133288
1 sga heap(1,0) free memory 9-10k 21 free 188676
1 sga heap(1,0) free memory 1-2K 30 free 25868
If you see lack of large chunks it is possible that you can face with ORA-04031 in near future.
k.Check shared pool at first glance quick diagnostics
select 'You may need to increase the SHARED_POOL_RESERVED_SIZE' Description, 'Request Failures = '||REQUEST_FAILURES Logic
from v$shared_pool_reserved where REQUEST_FAILURES > 0
and 0 != (select to_number(VALUE) from v$parameter
where NAME = 'shared_pool_reserved_size')
union
select 'You may be able to decrease the SHARED_POOL_RESERVED_SIZE' Description,'Request Failures = '||REQUEST_FAILURES Logic
from v$shared_pool_reserved where REQUEST_FAILURES < 5
and 0 != (select to_number(VALUE) from v$parameter
where NAME = 'shared_pool_reserved_size')
l.Memory Usage - object list level view
• Owner - Owner of the object
• Object - Name/namespace of the object
• Sharable Memory - Amount of sharable memory in the shared pool consumed by the object
select OWNER, NAME||' - '||TYPE object,SHARABLE_MEM
from v$db_object_cache where SHARABLE_MEM > 10000
and type in ('PACKAGE','PACKAGE BODY','FUNCTION','PROCEDURE')
order by owner asc ,SHARABLE_MEM desc
SELECT * FROM (SELECT ROW_NUMBER () over (PARTITION BY NAMESPACE ORDER BY SHARABLE_MEM DESC) ROW_within , NAMESPACE, SHARABLE_MEM, SUBSTR(NAME,1,40) NAME FROM V$DB_OBJECT_CACHE ORDER BY SHARABLE_MEM DESC) WHERE ROW_WITHIN <= 2 ORDER BY NAMESPACE, ROW_WITHIN;
ROW_WITHIN NAMESPACE SHARABLE_MEM NAME
1 CLUSTER 2794 C_OBJ#_INTCOL#
2 CLUSTER 1684 SMON_SCN_TO_TIME
1 RSRCPLAN 5117 SYS_GROUP
Maybe you are looking for
-
Need third party software to move photos from iphone 3GS to my PC.
Hi, I'm hoping someone can recommend me a good software package that allows me to use my iphone as an external memeory drive so that I can copy 4000(!) photos from my 'Photo Library' without loosing the quality??? (I'm running Windows 7)
-
FCP 601 unexpectedly quits when attempting AVCHD log and transfer. Others?
Hi, Atttempting to transfer AVCHD from Sony HDR-SR1. Have tried both Prores422 codec and Intermediate codec. Both cause FCP to quit during transfer. I had one successful transfer attempt with intermediate codec, but the resulting clip was covered in
-
Can't delete or retire application because of a (Non-existent) dependent Task sequence
Hello. I am trying to delete an outdated application from my SCCM environment. However when i try to delete I get the warning that the application cannot be deleted because of 1 dependent task sequence. I have been through every single task sequence
-
Error encountered initializing users and groups ... Class not found.
Hi, I am trying to set up the example provided in Frank Nimphius and Duncan Mills great article about 'Declarative J2EE authentication and authorization with JAAS' (http://www.oracle.com/technology/products/jdev/howtos/10g/jaassec/index.htm) on iAS 1
-
BI Publisher Stand Alone Server
HI, where i can download BI Publisher Stand Alone Server for Windows 7 Home Basic. Thanks Naga