您好,登錄后才能下訂單哦!
設置數(shù)據(jù)庫自動內存管理主要是設置兩個參數(shù):
memory_max_target
memory_target
如果這兩個參數(shù)設置為0說明數(shù)據(jù)庫內存采用手動管理,反之則為自動管理。
關閉數(shù)據(jù)庫。
SQL> startup nomount
ORA-00838: Specified value of MEMORY_TARGET is too small, needs to be at least 6384M
--這里之所以報錯是我之前alter system set MEMORY_TARGET='1536M' scope='spfile';
因為之前系統(tǒng)分配給SGA的內存就這么大,我設置的參數(shù)絕對不能超過SGA,這也就是導致修改完參數(shù)重啟數(shù)據(jù)庫出錯的原因。
SQL> create pfile ='/home/oracle/initora11g.ora' from spfile;
File created.
創(chuàng)建pfile文件,然后修改pfile文件設置這兩個參數(shù)大小為7G。
[oracle@TestServer dbhome_1]$ vi /home/oracle/initora11g.ora
atsdb.__db_cache_size=16777216
atsdb.__java_pool_size=16777216
atsdb.__large_pool_size=16777216
atsdb.__oracle_base='/opt/app/oracle'#ORACLE_BASE set from environment
atsdb.__pga_aggregate_target=5083496448
atsdb.__sga_target=1610612736
atsdb.__shared_io_pool_size=0
atsdb.__shared_pool_size=1526726656
atsdb.__streams_pool_size=16777216
*.audit_file_dest='/opt/app/oracle/admin/atsdb/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='/opt/app/oracle/oradata/atsdb/control01.ctl','/opt/app/oracle/flash_recovery_area/atsdb/control02.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_name='atsdb'
*.db_recovery_file_dest='/opt/app/oracle/flash_recovery_area'
*.db_recovery_file_dest_size=4070572032
*.diagnostic_dest='/opt/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=atsdbXDB)'
*.global_names=FALSE
*.memory_max_target=7610612736
*.memory_target=7610612736
*.open_cursors=300
*.pga_aggregate_target=5078253568
*.processes=3000
*.remote_login_passwordfile='EXCLUSIVE'
*.sessions=3555
*.sga_target=1610612736
*.undo_tablespace='UNDOTBS1'
修改完成之后從pfile啟動數(shù)據(jù)庫:
SQL>='/home/oracle startup pfile/initora11g.ora'
ORACLE instance started.
Total System Global Area 7616245760 bytes
Fixed Size 2214496 bytes
Variable Size 6979323296 bytes
Database Buffers 603979776 bytes
Redo Buffers 30728192 bytes
Database mounted.
Database opened.
可以看到數(shù)據(jù)庫已經(jīng)重新啟動,因為剛才是在pfile中修改的參數(shù),現(xiàn)在同步到spfile中:
SQL> create spfile from pfile='/home/oracle/initora11g.ora';
File created.
SQL> show parameter memory
NAME TYPE
------------------------------------ ----------------------
VALUE
------------------------------
hi_shared_memory_address integer
0
memory_max_target big integer
7296M
memory_target big integer
7296M
shared_memory_address integer
0
SQL>
這里也可以看到現(xiàn)在數(shù)據(jù)庫是采用自動內存管理的。
成功。
免責聲明:本站發(fā)布的內容(圖片、視頻和文字)以原創(chuàng)、轉載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權內容。