Linux 下oracle-27102解决方法
openbian
|
1#
openbian 发表于 2007-09-23 00:01
Linux 下oracle-27102解决方法
数据库oracle10202,内存4G,调整数据库的sga_target,最初sga_target为160M,准备将其调整为2147483648 ,结果出现错误ORA-27102,经过多次试验,发现数据库在sga_target等于160M的情况下启动。
一、生成pfile,并对pfile进行修改 [oracle@CCN-BJ-4-573 dbs]$ vi initorcl.ora orcl.__db_cache_size=50331648 orcl.__java_pool_size=4194304 orcl.__large_pool_size=4194304 orcl.__shared_pool_size=100663296 orcl.__streams_pool_size=0 *.audit_file_dest='/data/cache1/QQdatabase/product/10.2.0/db_1/admin/orcl/adump' *.background_dump_dest='/data/cache1/QQdatabase/product/10.2.0/db_1/admin/orcl/bdump' *.compatible='10.2.0.1.0' *.control_files='/data/cache1/QQdatabase/product/10.2.0/oradata/orcl/control01.ctl','/data/cache1/QQdatabase/product/10.2.0/oradata/orcl/control02.ctl','/data/cache1/QQdatabase/product/10.2.0/oradata/orcl/control03.ctl' *.core_dump_dest='/data/cache1/QQdatabase/product/10.2.0/db_1/admin/orcl/cdump' *.db_block_size=8192 *.db_domain='' *.db_file_multiblock_read_count=16 *.db_name='orcl' *.db_recovery_file_dest='/data/cache1/QQdatabase/product/10.2.0/db_1/flash_recovery_area' *.db_recovery_file_dest_size=2147483648 *.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)' *.job_queue_processes=10 *.open_cursors=300 *.pga_aggregate_target=413138944 *.processes=150 *.remote_login_passwordfile='EXCLUSIVE' *.sga_target=2147483648 *.undo_management='AUTO' *.undo_tablespace='UNDOTBS1' *.user_dump_dest='/data/cache1/QQdatabase/product/10.2.0/db_1/admin/orcl/udump' ~ ~ ~ "initorcl.ora" 27L, 1227C written 二、启动数据库报错 [oracle@CCN-BJ-4-573 dbs]$ sqlplus "/as sysdba" SQL*Plus: Release 10.2.0.1.0 - Production on Fri Sep 21 14:44:30 2007 Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to an idle instance. SQL> startup ORA-27102: out of memory Linux Error: 28: No space left on device SQL> exit Disconnected 三、查看系统参数,发现kernel.shmmax=16777216 太小,于是将其设置为2G [oracle@CCN-BJ-4-573 dbs]$ more /etc/sysctl.conf # Kernel sysctl configuration file for Red Hat Linux # # For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and # sysctl.conf(5) for more details. # Controls IP packet forwarding net.ipv4.ip_forward = 0 # Controls source route verification net.ipv4.conf.default.rp_filter = 1 # Do not accept source routing net.ipv4.conf.default.accept_source_route = 0 # Controls the System Request debugging functionality of the kernel kernel.sysrq = 0 # Controls whether core dumps will append the PID to the core filename. # Useful for debugging multi-threaded applications. kernel.core_uses_pid = 1 # add for squid program # Increase the tcp-time-wait buckets pool size net.ipv4.tcp_max_tw_buckets = 1800000 net.ipv4.tcp_max_syn_backlog = 8192 #2nd try kernel.msgmnb=8192 kernel.msgmni=40 kernel.msgmax=8192 kernel.shmall=2097152 kernel.shmmni=32 kernel.shmmax=16777216 # end of squid ~ [oracle@CCN-BJ-4-573 dbs]$ exit logout [root@CCN-BJ-4-573 ~]# vi /etc/sysctl.conf # Kernel sysctl configuration file for Red Hat Linux # # For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and # sysctl.conf(5) for more details. # Controls IP packet forwarding net.ipv4.ip_forward = 0 # Controls source route verification net.ipv4.conf.default.rp_filter = 1 # Do not accept source routing net.ipv4.conf.default.accept_source_route = 0 # Controls the System Request debugging functionality of the kernel kernel.sysrq = 0 # Controls whether core dumps will append the PID to the core filename. # Useful for debugging multi-threaded applications. kernel.core_uses_pid = 1 # add for squid program # Increase the tcp-time-wait buckets pool size net.ipv4.tcp_max_tw_buckets = 1800000 net.ipv4.tcp_max_syn_backlog = 8192 #2nd try kernel.msgmnb=8192 kernel.msgmni=40 kernel.msgmax=8192 kernel.shmall=2097152 kernel.shmmni=32 kernel.shmmax=2147483648 #kernel.shmmax=16777216 # end of squid ~ ~ ~ "/etc/sysctl.conf" 35L, 918C written 使参数生效 [root@CCN-BJ-4-573 ~]# sysctl -p net.ipv4.ip_forward = 0 net.ipv4.conf.default.rp_filter = 1 net.ipv4.conf.default.accept_source_route = 0 kernel.sysrq = 0 kernel.core_uses_pid = 1 net.ipv4.tcp_max_tw_buckets = 1800000 net.ipv4.tcp_max_syn_backlog = 8192 kernel.msgmnb = 8192 kernel.msgmni = 40 kernel.msgmax = 8192 kernel.shmall = 2097152 kernel.shmmni = 32 kernel.shmmax = 2147483648 最后数据库成功启动。 |