对于绝大部分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_SIZE等9i引入的内存参数都不支持的话,就更不要说10G的SGA_TARGET了,尝试去掉SGA_TARGET和DB_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博客 ” ,链接:https://blog.itpub.net/4227/viewspace-616466/ ,如需转载,请注明出处,否则将追究法律责任。