Oracle11g修改MEMORY_TARGET
預設情況下,Oracle 11g是使用AMM(Automatic Memory Management,自動記憶體管理)的。我們在安裝資料庫過程中,指定Oracle使用記憶體的百分比,這個取值就作為MEMORY_TARGET和MEMORY_MAX_TARGET的初始取值使用。如果這兩個引數設定為非零取值,那麼Oracle就是採用AMM管理策略的。
下面演示一下如何修改MEMORY_TARGET的值。
1.測試環境
我們在Oracle11g中進行操作。
點選(此處)摺疊或開啟
-
SQL>
-
SQL> select * from v$version;
-
-
BANNER
-
--------------------------------------------------------------------------------
-
-
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
-
PL/SQL Release 11.2.0.3.0 - Production
-
CORE 11.2.0.3.0 Production
-
TNS for Linux: Version 11.2.0.3.0 - Production
-
NLSRTL Version 11.2.0.3.0 - Production
-
- SQL>
2.檢視MEMORY_TARGET和相關引數值
我們通過show parameter來檢視初始化引數值,其他相關的引數包括MEMORY_MAX_TARGET、sga_max_size、sga_target、pga_aggregate_target等。
點選(此處)摺疊或開啟
-
SQL>
-
SQL> show parameter memory
-
-
NAME TYPE VALUE
-
------------------------------------ ----------- ------------------------------
-
-
hi_shared_memory_address integer 0
-
memory_max_target big integer 500M
-
memory_target big integer 400M
-
shared_memory_address integer 0
-
SQL>
-
SQL> show parameter sga
-
-
NAME TYPE VALUE
-
------------------------------------ ----------- ------------------------------
-
-
lock_sga boolean FALSE
-
pre_page_sga boolean FALSE
-
sga_max_size big integer 500M
-
sga_target big integer 0
-
SQL>
-
SQL> show parameter pga
-
-
NAME TYPE VALUE
-
------------------------------------ ----------- ------------------------------
-
-
pga_aggregate_target big integer 0
- SQL>
3.修改MEMORY_TARGET
我們通過alter system語句來修改MEMORY_TARGET,需要注意的是,MEMORY_TARGET是個動態引數,而MEMORY_MAX_TARGET是個靜態引數。
這樣一來,當修改值<=MEMORY_MAX_TARGET時,我們可以隨意修改MEMORY_TARGET值;但是,當修改值>MEMORY_MAX_TARGET時,我們必須首先修改MEMORY_MAX_TARGET引數值,重啟資料庫使靜態引數生效後再去修改MEMORY_TARGET值,否則,資料庫會報錯。
3.1修改值<=MEMORY_MAX_TARGET
我們嘗試將MEMORY_TARGET引數值由400M修改為500M。
點選(此處)摺疊或開啟
-
SQL>
-
SQL> alter system set memory_target=500m;
-
-
System altered.
-
-
SQL>
-
SQL>
-
SQL> show parameter memory
-
-
NAME TYPE VALUE
-
------------------------------------ ----------- ------------------------------
-
-
hi_shared_memory_address integer 0
-
memory_max_target big integer 500M
-
memory_target big integer 500M
-
shared_memory_address integer 0
- SQL>
3.2修改值>MEMORY_MAX_TARGET
我們嘗試將MEMORY_TARGET引數值由500M修改為700M。由於修改值>MEMORY_MAX_TARGET,資料庫會報錯;我們必須首先修改MEMORY_MAX_TARGET引數值,重啟資料庫使靜態引數生效後再去修改MEMORY_TARGET值。
點選(此處)摺疊或開啟
-
SQL>
-
SQL> alter system set memory_target=600m;
-
alter system set memory_target=600m
-
*
-
ERROR at line 1:
-
ORA-02097: parameter cannot be modified because specified value is invalid
-
ORA-00837: Specified value of MEMORY_TARGET greater than MEMORY_MAX_TARGET
-
-
-
SQL>
-
SQL> alter system set memory_max_target=800m scope=spfile;
-
-
System altered.
-
-
SQL> shu immediate
-
Database closed.
-
Database dismounted.
-
ORACLE instance shut down.
-
SQL>
-
SQL> startup
-
ORACLE instance started.
-
-
Total System Global Area 732352512 bytes
-
Fixed Size 1347456 bytes
-
Variable Size 603979904 bytes
-
Database Buffers 121634816 bytes
-
Redo Buffers 5390336 bytes
-
Database mounted.
-
Database opened.
-
SQL>
-
SQL> show parameter memory
-
-
NAME TYPE VALUE
-
------------------------------------ ----------- ------------------------------
-
-
hi_shared_memory_address integer 0
-
memory_max_target big integer 700M
-
memory_target big integer 500M
-
shared_memory_address integer 0
-
SQL>
-
SQL> alter system set memory_target=600m;
-
-
System altered.
-
-
SQL> show parameter memory
-
-
NAME TYPE VALUE
-
------------------------------------ ----------- ------------------------------
-
-
hi_shared_memory_address integer 0
-
memory_max_target big integer 700M
-
memory_target big integer 600M
-
shared_memory_address integer 0
-
SQL>
- SQL>
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/30162081/viewspace-1742293/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle11g ORA-00845: MEMORY_TARGET not supported on this systemOracle
- Oracle11g啟動報:ORA-00845: MEMORY_TARGET not supported on this systemOracle
- oracle11g修改控制檔案路徑Oracle
- oracle11g安裝部分引數修改Oracle
- 關於oracle11G的自動記憶體管理MEMORY_TARGET和MEMORY_MAX_TARGETOracle記憶體
- oracle11g修改資料檔案路徑Oracle
- oracle11g修改使用者名稱Oracle
- Linux下安裝Oracle11g , MEMORY_TARGET(AMM)小於/dev/shm處理(ORA-00845)LinuxOracledev
- MEMORY_TARGET not supported on this system
- 11.1資料庫版本修改memory_target引數應避開4的倍數資料庫
- oracle11g要求在作業系統層設定共享記憶體/dev/shm,且大於MEMORY_TARGETOracle作業系統記憶體dev
- 如何啟用oracle11g的全自動記憶體管理以及計算memory_max_target及memory_targetOracle記憶體
- 如何基於pfile啟動oracle11g全自動記憶體管理與memory_max_target及memory_targetOracle記憶體
- 修改Oracle11g使用者密碼不區分大小寫Oracle密碼
- ORA-00845: MEMORY_TARGET
- SGA PGA MEMORY_TARGET 關係
- MEMORY_TARGET not supported on this system for linuxLinux
- IMP-00019錯誤與修改oracle11g字符集Oracle
- ORA-00845 MEMORY_TARGET not supported
- Oracle11g修改預設使用者密碼有效期時間Oracle密碼
- ORA-00845 MEMORY_TARGET not supported on this system
- ORA-00845: MEMORY_TARGET not supported on this system
- startup ORA-00845: MEMORY_TARGET not supported on this system
- ORA-00838: Specified value of MEMORY_TARGET is too small
- ORA-00845 memory_target needs larger /dev/shmdev
- Oracle報錯:ORA-00845: MEMORY_TARGET not supported on this systemOracle
- 11g的MEMORY_TARGET和MEMORY_MAX_TARGET
- memory_target、sga_target、pga_target的設定
- ORA-00845: MEMORY_TARGET not supported on this system - Linux ServersLinuxServer
- 解決辦法:ORA-00845: MEMORY_TARGET not supported on thi
- ORA-00845: MEMORY_TARGET not supported on this system報錯解決
- ORA-00845 MEMORY_TARGET not supported on this system報錯解決
- oracle11g增加profileOracle
- oracle11g審計Oracle
- alert log on Oracle11gOracle
- Oracle11g Data GuardOracle
- oracle11g dataguard切換Oracle
- Docker安裝Oracle11gDockerOracle