0% found this document useful (0 votes)
139 views3 pages

Online SGA

The document discusses the components that make up the System Global Area (SGA) in Oracle Database and how its size is calculated. It notes that the SGA_MAX_SIZE parameter limits the dynamic sizing of SGA components and is automatically set by Oracle to the total SGA size if smaller than the sum of all components. It also provides queries to view the current sizes of SGA components and the total SGA size.

Uploaded by

anwarbhai
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
139 views3 pages

Online SGA

The document discusses the components that make up the System Global Area (SGA) in Oracle Database and how its size is calculated. It notes that the SGA_MAX_SIZE parameter limits the dynamic sizing of SGA components and is automatically set by Oracle to the total SGA size if smaller than the sum of all components. It also provides queries to view the current sizes of SGA components and the total SGA size.

Uploaded by

anwarbhai
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

SQL> -- What's possible with 9.2.0.1?

SQL> SQL> /* DOC>The SGA_MAX_SIZE parameter is used to limit the dynamic sizing of SGA DOC>parameters. If the SGA_MAX_SIZE parameter value in the spfile is smaller tha n DOC>the addition of all SGA components, then the dynamic value of SGA_MAX_SIZE DOC>instance parameter is automatically set by Oracle to the SGA size. DOC> DOC>Syntax: alter system set "param = value" scope = (spfile|memory); DOC> DOC>Note the term "granual". It is 4MB if the SGA size is less than 128MB, other wise it will be 16MB . DOC> DOC>(Approximate only, refer to Metalink 1008866.6) DOC>SGA = shared_pool_size (dynamic) DOC> + java_pool_size (static) DOC> + large_pool_size (dynamic) used in shared server systems DOC> + db_cache_size (dynamic) size of the DEFAULT buffer pool DOC> + log_buffer (static) redo log buffer (bytes) DOC> + db_keep_cache_size (dynamic) size of the KEEP buffer pool DOC> + db_recycle_cache_size (dynamic) size of the RECYCLE buffer pool DOC> + db_nk_cache_size (dynamic) DOC> + 1m DOC> DOC>From Metalink: DOC>The shared pool contains permanent and dynamic memory.... DOC>SHARED_POOL_SIZE determines the dynamic part of shared pool. DOC>Shared Pool = SHARED_POOL_SIZE+ permenant memory <- this is what you see in v$sgastat DOC> DOC>Trying to figure out the exact SGA size and the sizes of each of its compone nts DOC>may not be a wrothwhile effort. How ORACLE manage memory internal can change from DOC>release to release. I see no point in trying to get the precise sizes of eac h DOC>component. Estimation is good enough. When it comes to SGA, what's important is its DOC>approximate total size and what components can be modified dynamically. DOC>*/ SQL> SQL> select name, value from v$parameter 2 where name in ('sga_max_size', 'shared_pool_size', 'db_cache_size', 3 'large_pool_size', 'java_pool_size'); NAME ---------------------------------------------------------------VALUE -------------------------------------------------------------------------------shared_pool_size 50331648 sga_max_size 135338868 large_pool_size 8388608

NAME ---------------------------------------------------------------VALUE -------------------------------------------------------------------------------java_pool_size 33554432 db_cache_size 25165824 SQL> SQL> select * from v$sga; NAME VALUE -------------------- ---------Fixed Size 453492 Variable Size 109051904 Database Buffers 25165824 Redo Buffers 667648 SQL> select sum(bytes),pool from v$sgastat group by pool; SUM(BYTES) ---------33554432 8388608 67108864 26275700 POOL ----------java pool large pool shared pool

SQL> select * from v$sgastat where pool is null; POOL NAME BYTES ----------- -------------------------- ---------fixed_sga 453492 buffer_cache 25165824 log_buffer 656384 SQL> SQL> SQL> SQL> -- The -- Wht -- Why select difference between the 2 is the difference in the redo buffers. are redo buffers different? is shared_pool_size from v$sgastat different from the init value? sum(value) from v$sga;

SUM(VALUE) ---------135338868 SQL> select sum(bytes) from v$sgastat; SUM(BYTES) ---------135327604 SQL> SQL> -- Why is shared_pool_size from v$sgastat different from the init value? SQL> SQL> alter system set shared_pool_size=24m scope=memory; System altered.

SQL> -- java_pool_size is static SQL> alter system set java_pool_size=10m scope=memory; alter system set java_pool_size=10m scope=memory * ERROR at line 1: ORA-02095: specified initialization parameter cannot be modified SQL> alter system set large_pool_size=4m scope=memory; System altered. SQL> alter system set db_cache_size=10m scope=memory; System altered. SQL>

You might also like