利用USE_INDIRECT_DATA_BUFFERS突破32位的2G記憶體限制(二)

yangtingkun發表於2009-10-13

對於絕大部分32位系統上的32位資料庫,記憶體最大的設定都不能超過2G,有的系統最大值甚至不能超過1.7G左右。

不過有的系統可以利用USE_INDIRECT_DATA_BUFFERS引數來突破這個限制。

這篇文章介紹設定這引數過程中碰到的錯誤。

利用USE_INDIRECT_DATA_BUFFERS突破32位的2G記憶體限制(一):http://yangtingkun.itpub.net/post/468/492617

 

 

最早碰到的錯誤是由於設定了SGA_TARGET,導致了啟動時報錯:

SQL> create pfile='/home/oracle/initcis.ora'                            
  2  from spfile='/data/ora10g/product/10.2.0/db_1/dbs/spfilecis.ora';

File created.

SQL> host echo "use_indirect_data_buffers=true" >> /home/oracle/initcis.ora

SQL> host more /home/oracle/initcis.ora
cis.__db_cache_size=1711276032
cis.__java_pool_size=16777216
cis.__large_pool_size=16777216
cis.__shared_pool_size=452984832
cis.__streams_pool_size=0
*.audit_file_dest='/data/ora10g/admin/cis/adump'
*.background_dump_dest='/data/ora10g/admin/cis/bdump'
*.compatible='10.2.0.1.0'
*.control_files='/webdata/oracle/oradata/cis/control01.ctl','/webdata/oracle/oradata/cis/control02.ctl','/webdata/oracle/oradata/cis
/control03.ctl'
*.core_dump_dest='/data/ora10g/admin/cis/cdump'
*.db_block_size=16384
*.db_domain=''
*.db_file_multiblock_read_count=16
*.db_name='cis'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=cisXDB)'
*.job_queue_processes=10
*.open_cursors=300
*.pga_aggregate_target=1048576000
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=2621440000
*.undo_management='AUTO'
*.undo_tablespace='UNDOTBS1'
*.user_dump_dest='/data/ora10g/admin/cis/udump'
use_indirect_data_buffers=true

SQL> startup pfile=/home/oracle/initcis.ora
ORA-00385: cannot enable Very Large Memory with new buffer cache parameters

查詢ORA-385錯誤,發現Oracle的錯誤文件上描述的十分清晰:

ORA-00385: cannot enable Very Large Memory with new buffer cache parameters
Cause: User specified one or more of { db_cache_size , db_recycle_cache_size, db_keep_cache_size, db_nk_cache_size (where n is one of 2,4,8,16,32) } AND use_indirect_data_buffers is set to TRUE. This is illegal.
Action: Very Large Memory can only be enabled with the old (pre-Oracle_8.2) parameters.

DB_CACHE_SIZE9i引入的記憶體引數都不支援的話,就更不要說10GSGA_TARGET了,嘗試去掉SGA_TARGETDB_CACHE_SIZE引數:

SQL> alter system set sga_target = 0 scope = spfile;

System altered.

SQL> alter system set shared_pool_size = 300m scope = spfile;

System altered.

SQL> alter system set java_pool_size = 0 scope = spfile;

System altered.

SQL> alter system set large_pool_size = 0 scope = spfile;

System altered.

SQL> alter system set streams_pool_size = 0 scope = spfile;

System altered.

SQL> alter system set db_cache_size = 1400m scope = spfile;

System altered.

SQL> alter system set sga_max_size = 0 scope = spfile;

System altered.

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 1811939328 bytes
Fixed Size                  1219952 bytes
Variable Size             318767760 bytes
Database Buffers         1476395008 bytes
Redo Buffers               15556608 bytes
Database mounted.
Database opened.
SQL> alter system set db_cache_size = 2000m scope = spfile;

System altered.

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 2432696320 bytes
Fixed Size                  1220844 bytes
Variable Size             318770964 bytes
Database Buffers         2097152000 bytes
Redo Buffers               15552512 bytes
Database mounted.
Database opened.
SQL> show parameter use_indi

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
use_indirect_data_buffers            boolean     FALSE
SQL> alter system set db_cache_size = 2100m scope = spfile;

System altered.

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORA-27102: out of memory
Linux Error: 12: Cannot allocate memory
Additional information: 1
Additional information: 1835011
SQL> create pfile='/home/oracle/initcis.ora'
  2  from spfile='/data/ora10g/product/10.2.0/db_1/dbs/spfilecis.ora';

File created.

SQL> host echo "use_indirect_data_buffers=true" >> /home/oracle/initcis.ora

SQL> host vi initcis.ora

*.audit_file_dest='/data/ora10g/admin/cis/adump'
*.background_dump_dest='/data/ora10g/admin/cis/bdump'
*.compatible='10.2.0.1.0'
*.control_files='/webdata/oracle/oradata/cis/control01.ctl','/webdata/oracle/oradata/cis/control02.ctl','/webdata/oracle/oradata/cis/control03.ctl'
*.core_dump_dest='/data/ora10g/admin/cis/cdump'
*.db_block_size=16384
#*.db_cache_size=2202009600
db_block_buffers=134400
*.db_domain=''
*.db_file_multiblock_read_count=16
*.db_name='cis'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=cisXDB)'
*.java_pool_size=0
*.job_queue_processes=10
*.large_pool_size=0
*.open_cursors=300
*.pga_aggregate_target=1048576000
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_max_size=0
*.sga_target=0
*.shared_pool_size=314572800
*.streams_pool_size=0
*.undo_management='AUTO'
*.undo_tablespace='UNDOTBS1'
*.user_dump_dest='/data/ora10g/admin/cis/udump'
use_indirect_data_buffers=true
~
~
~
"initcis.ora" 27L, 902C written

SQL> startup pfile=initcis.ora
ORA-27103: internal error
Linux Error: 11: Resource temporarily unavailable

構成這個錯誤的原因就是由於作業系統上面沒有進行設定。

這時alert檔案中對應的錯誤資訊為:

Wed Sep 23 07:39:47 2009
ERROR: Unable to attach to VLM segment at (nil): window size=0x20000000 size=0x83400000

這時,只需要根據上一篇文章介紹的步驟進行配置,就可以最終啟動資料庫。

 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/4227/viewspace-616466/,如需轉載,請註明出處,否則將追究法律責任。

相關文章