--
SQL> show sga
Total System Global Area 268435456 bytes
Fixed Size 1248476 bytes
Variable Size 117441316 bytes
Database Buffers 146800640 bytes
Redo Buffers 2945024 bytes
SQL> show parameter shared_pool
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
shared_pool_reserved_size big integer 5M
shared_pool_size big integer 64M
SQL> show parameter cache_size
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_16k_cache_size big integer 4M
db_2k_cache_size big integer 0
db_32k_cache_size big integer 0
db_4k_cache_size big integer 8M
db_8k_cache_size big integer 0
db_cache_size big integer 52M
db_keep_cache_size big integer 8M
db_recycle_cache_size big integer 12M
SQL> select * from v$sgainfo;
NAME BYTES RES
------------------------------ ---------- ---
Fixed SGA Size 1248476 No
Redo Buffers 2945024 No
Buffer Cache Size 146800640 Yes
Shared Pool Size 104857600 Yes
Large Pool Size 8388608 Yes
Java Pool Size 4194304 Yes
Streams Pool Size 0 Yes
Granule Size 4194304 No
Maximum SGA Size 268435456 No
Startup overhead in Shared Poo 37748736 No
l
NAME BYTES RES
------------------------------ ---------- ---
Free SGA Memory Available 0
已选择11行。
SQL> @c:getp.sql
输入 par 的值: shared_pool
原值 6: and x.ksppinm like '%&par%'
新值 6: and x.ksppinm like '%shared_pool%'
NAME VALUE DESCRIB
------------------------- --------------- ----------------------------------------
__shared_pool_size 104857600 Actual size in bytes of shared pool
shared_pool_size 67108864 size in bytes of shared pool
shared_pool_reserved_size 5242880 size in bytes of reserved area of shared
pool
_shared_pool_reserved_pct 5 percentage memory of the shared pool all
ocated for the reserved area
_shared_pool_reserved_min 4400 minimum allocation size in bytes for res
_alloc erved area of shared pool
_io_shared_pool_size 4194304 Size of I/O buffer pool from SGA
_shared_pool_max_size 0 shared pool maximum size when auto SGA e
nabled
_dm_max_shared_pool_pct 1 max percentage of the shared pool to use
for a mining model
已选择8行。
SQL> @c:getp.sql
输入 par 的值: db_cache_size
原值 6: and x.ksppinm like '%&par%'
新值 6: and x.ksppinm like '%db_cache_size%'
NAME VALUE DESCRIB
------------------------- --------------- ----------------------------------------
__db_cache_size 113246208 Actual size of DEFAULT buffer pool for s
tandard block size buffers
db_cache_size 54525952 Size of DEFAULT buffer pool for standard
block size buffers
SQL> host echo ==============This is the value of start=============
SQL> alter system set shared_pool_size=56M;
系统已更改。
SQL> alter system set db_cache_size=36M;
系统已更改。
SQL> host echo =================check cache change===============
SQL> show sga
Total System Global Area 268435456 bytes
Fixed Size 1248476 bytes
Variable Size 117441316 bytes
Database Buffers 146800640 bytes
Redo Buffers 2945024 bytes
SQL> show parameter shared_pool
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
shared_pool_reserved_size big integer 5M
shared_pool_size big integer 56M
SQL> show parameter cache_size
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_16k_cache_size big integer 4M
db_2k_cache_size big integer 0
db_32k_cache_size big integer 0
db_4k_cache_size big integer 8M
db_8k_cache_size big integer 0
db_cache_size big integer 36M
db_keep_cache_size big integer 8M
db_recycle_cache_size big integer 12M
SQL>
SQL> select * from v$sgainfo;
NAME BYTES RES
------------------------- ---------- ---
Fixed SGA Size 1248476 No
Redo Buffers 2945024 No
Buffer Cache Size 146800640 Yes
Shared Pool Size 104857600 Yes
Large Pool Size 8388608 Yes
Java Pool Size 4194304 Yes
Streams Pool Size 0 Yes
Granule Size 4194304 No
Maximum SGA Size 268435456 No
Startup overhead in Share 37748736 No
d Pool
Free SGA Memory Available 0
已选择11行。
SQL> @c:getp.sql
输入 par 的值: shared_pool
原值 6: and x.ksppinm like '%&par%'
新值 6: and x.ksppinm like '%shared_pool%'
NAME VALUE DESCRIB
------------------------- --------------- ---
Tag:
Oracle
Oracle优化
Oracle内存
Oracle笔记
TTTBLOG