ORA-27300 ORA-27301 ORA-27302

 

ORA-27300: OS 系统相关操作: spcdr:9261:4200 失败, 状态为: 997
要命的Oracle bug ,耗尽内存,导致数据库挂掉
这个问题用Oracle10.2.0.1.0版本安装在32位的Windows系统上,非常常见。随便在google就找到很多。
通常会导致系统耗尽内存,导致Oracle数据库挂掉。
把Oracle数据库重启可以临时解决,但过几天还会发生ORA-04030内存耗尽的情况。最好还是打上补丁。

 

连接数据库时出现,
ORA-12518: TNS: 监听程序无法分发客户机连接


1、用sysdba连接不是数据库,数据库已经挂了

2、alert_sid.log
Sun Apr 19 10:05:56 2009
Process startup failed, error stack:
Sun Apr 19 10:05:56 2009
Errors in file e:/oracle/product/10.2.0/admin/xboms/bdump/xboms_psp0_3124.trc:
ORA-27300: OS 系统相关操作: spcdr:9261:4200 失败, 状态为: 997
ORA-27301: OS 故障消息: 重叠 I/O 操作在进行中。
ORA-27302: 错误发生在: skgpspawn

 

由此导致频繁的报下面的错误:
Sun Apr 19 10:24:08 2009
Errors in file e:/oracle/product/10.2.0/admin/xboms/bdump/xboms_arc0_3032.trc:
ORA-04030: 在尝试分配 82444 字节 (pga heap,control file i/o buffer) 时进程内存不足


查看:http://**/viewthread.php?tid=129216
and  http://www.itpub.net/thread-1146317-1-1.html


this is a bug !
oracle承认这是一个bug(10.2.0.2.0之前10g版本),BUG 5607984 - ORACLE DOES NOT CLOSE TCP CONNECTIONS. REMAINS IN CLOSE_WAIT STATE. [On Windows 32-bit].
可打补丁patch number 5639232 ,该补丁有100多MB大。

 

在操作系统的boot.ini文件中增加'/3G',然后降低SGA。metalink上的解释如下:
ChangesThe '/3GB'  switch was added to the  'boot.ini'  file at the OS level but the errors are eventually encountered when the database is under heavy load. CauseOS resource issue.
The maximum amount of addressable memory by a process ('oracle.exe' for example) running in a
32-Bit Windows environment has been reached.

In a 32-Bit Windows environment, the total addressable memory by a single process is a 4GB. On Windows, the OS reserves half of this memory by default for kernel memory, leaving 2GB of addressable memory for a user process. By placing the '/3GB' switch in the 'boot.ini'  file, this changes the ratio of kernel memory and user memory. When he  '/3GB'  switch is in place, processes (such as 'oracle.exe’) can address 3GB of virtual memory out of the total 4GB of addressable memory. However, once the 3GB of virtual memory is depleted, the process will fail. SolutionTo implement the solution, please execute the following steps:

Tune the application running on the 32-bit environment so that it will not consume greater than 2.7GB of virtual memory when the  '/3GB'  switch is set in the  'boot.ini'  file. In the case of Oracle encountering the OS resource issue, the options are:

1) Reduce the amount of SGA needed to be allocated for the database.
2) Limit the number of dedicated connections to the database and the amount of memory each user process will consume.
3) Change from dedicated connections to multi-threaded server (MTS) connections as MTS only uses a fraction of the amount of memory allocated to each user process when initial connection to the database is established.

See Metalink Note 225349.1 for an in depth discussion regarding memory usage in a 32-bit Windows environment

===========================

ORA-27300 ORA-27301 ORA-27302 in alert log. Cannot connect to database.
  文档 ID:  注释:371074.1 类型:  PROBLEM
  上次修订日期:  30-JAN-2008 状态:  MODERATED

In this Document
  Symptoms
  Changes
  Cause
  Solution
  References

 

--------------------------------------------------------------------------------


This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process, and therefore has not been subject to an independent technical review.

 

Applies to: Oracle Server - Enterprise Edition - Version: 8.1.7.4 to 10.2.0.3
Oracle Server - Personal Edition - Version: 8.1.7.4 to 10.2.0.3
Oracle Server - Standard Edition - Version: 8.1.7.4 to 10.2.0.3
Microsoft Windows 2000
Microsoft Windows XP
Microsoft Windows Server 2003


Microsoft Windows (32-bit)
SymptomsNo new connections are allowed to the database.

Database appears to be in a hang state.
Errors:

Mon May 22 14:00:46 2006
Errors in file d:/ecomdb/bdump/ecomdb_psp0_1192.trc:
ORA-27300: OS system dependent operation:spcdr:9261:4200 failed with status: 997
ORA-27301: OS failure message: Overlapped I/O operation is in progress.
ORA-27302: failure occurred at: skgpspawn

written to alert log.


.
Verified the issue by the RDA output provided, which displays errors:

Mon May 22 14:00:46 2006
Errors in file d:/ecomdb/bdump/ecomdb_psp0_1192.trc:
ORA-27300: OS system dependent operation:spcdr:9261:4200 failed with status: 997
ORA-27301: OS failure message: Overlapped I/O operation is in progress.
ORA-27302: failure occurred at: skgpspawn

in the alert log included in RDA output.

ChangesThe '/3GB'  switch was added to the  'boot.ini'  file at the OS level but the errors are eventually encountered when the database is under heavy load. CauseOS resource issue.
The maximum amount of addressable memory by a process ('oracle.exe' for example) running in a
32-Bit Windows environment has been reached.

In a 32-Bit Windows environment, the total addressable memory by a single process is a 4GB. On
Windows, the OS reserves half of this memory by default for kernel memory, leaving 2GB of
addressable memory for a user process. By placing the '/3GB' switch in the 'boot.ini'  file, this
changes the ratio of kernel memory and user memory. When the  '/3GB'  switch is in place, processes (such as 'oracle.exe’) can address 3GB of virtual memory out of the total 4GB of addressable memory. However, once the 3GB of virtual memory is depleted, the process will fail. SolutionTo implement the solution, please execute the following steps:

Tune the application running on the 32-bit environment so that it will not consume greater than
2.7GB of virtual memory when the  '/3GB'  switch is set in the  'boot.ini'  file.
In the case of Oracle encountering the OS resource issue, the options are:

1) Reduce the amount of SGA needed to be allocated for the database.
2) Limit the number of dedicated connections to the database and the amount of memory each user
process will consume.
3) Change from dedicated connections to multi-threaded server (MTS) connections as MTS only
uses a fraction of the amount of memory allocated to each user process when initial connection to
the database is established.


See Metalink Note 225349.1 for an in depth discussion regarding memory usage in a 32-bit Windows environment.

ReferencesNote 225349.1 - Implementing Address Windowing Extensions (AWE) or VLM on Windows Platforms

 

 

 

FROM:http://space.itpub.net/12778571/viewspace-591155

 

 

AIX系统maxuproc太小导致ORA-27300错:

 

AIX系统maxuproc太小导致ORA-27300错
--王珏

    AIX5.3上的Oracle10g系统报错:
ORA-27300: OS system dependent operation:fork failed with status: 11
ORA-27301: OS failure message: Resource temporarily unavailable
ORA-27302: failure occurred at: skgpspawn5
Tue Jul  7 09:00:06 2009
Process m001 died, see its trace file
Tue Jul  7 09:00:06 2009
ksvcreate: Process(m001) creation failed

    看报错的第一行就能看到:fork failed.视乎是fork进程错,这视乎是和系统参数的最大进程数有关。

    用Oracle用户登陆,发现执行任何命令都出错。
bash-3.2$ lsnrctl start
bash: fork: 资源暂时不可用
bash-3.2$ clear
bash: fork: 资源暂时不可用
bash-3.2$ ls
bash: fork: 资源暂时不可用
bash-3.2$ ls
bash: fork: 资源暂时不可用

    但是用root可以执行命令,这进一步确定是由于错误的“用户级别的系统参数”导致的问题。(放“google”搜,很容易找到
[精彩] AIX 系统参数配置- ChinaUnix.net
    问题很容易定位到:maxuproc--每个用户的最大进程数。按照下列步骤很容易搞定这个问题:

  1. 确定当前系统的进程数量。由于oracle用户已经没法使用,故使用root用户执行
    • #ps -ef|wc -l          粗略的统计进程数量,为1073个。
  2. 查看当前系统maxuproc值
    • #lsattr -Elsys0        得出本系统maxuproc配置参数为1024
  3. 修改maxuproc值
    • # smitty chgsys      由1024改为8192
      • Maximum number of PROCESSES allowed per user       [1024]
  4. 验证系统是否正常
    • 用Oracle登陆,所有问题全部解决。


问题迎刃而解

 

 

 

from:http://blog.sina.com.cn/s/blog_592060b50100e1hu.html

 

 

 

XXXXXX的Oracle参数调整:

 

SQL> startup nomount
ORA-27302: failure occurred at: skgpwreset1
ORA-27303: additional information: invalid shared ctx
ORA-27146: post/wait initialization failed
ORA-27300: OS system dependent operation:semget failed with status: 28
ORA-27301: OS failure message: No space left on device
ORA-27302: failure occurred at: sskgpcreates

 

 

 

XXXXXX的Oracle参数调整

1 概述

XXXXXX用户SUN平台HACMP环境下ORACLE软件安装部署完毕,需要优化关键数据库系统参数并创建用户、表空间部署应用。

2 问题描述

XXXXXX用户SUN平台HACMP环境下ORACLE软件安装部署完毕,需要创建用户、表空间等并调整数据库系统参数,和现场的同事对业务需求、用户数量等进行分析,最后整理出以下脚本并执行:

 

--创建表空间

CREATE TABLESPACE BPM_DATA LOGGING DATAFILE '/oracle/oracle/oradata/cmdidb/BPM_DATA.dbf' SIZE 2048M

AUTOEXTEND ON NEXT 20480K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;

 

CREATE TABLESPACE BPM_INDEX LOGGING DATAFILE '/oracle/oracle/oradata/cmdidb/BPM_INDEX.dbf' SIZE 2048M

AUTOEXTEND ON NEXT 20480K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;

 

--创建临时表空间

CREATE TEMPORARY TABLESPACE BPM_TEMP TEMPFILE '/oracle/oracle/oradata/cmdidb/BPM_TEMP.dbf' SIZE 1024M

AUTOEXTEND ON NEXT 20480K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M;

 

--创建用户

CREATE USER BPM50 PROFILE DEFAULT IDENTIFIED BY bpmtest DEFAULT TABLESPACE BPM_DATA

TEMPORARY TABLESPACE BPM_TEMP ACCOUNT UNLOCK;

 

--授权用户

GRANT CONNECT,EXP_FULL_DATABASE,IMP_FULL_DATABASE,RESOURCE TO BPM50;

 

--修改数据库系统参数

alter system set pga_aggregate_target=640m scope=spfile;

alter system set db_cache_size=1440m scope=spfile;

alter system set shared_pool_size=800m scope=spfile;

alter system set java_pool_size=320m scope=spfile;

alter system set log_buffer=3145728 scope=spfile;

Alter system set open_cursors=1000 scope=spfile;

Alter system set processes=800 scope=spfile;

 

本来工作到了这里就该接近尾声了,但是遇到一个小小的插曲,执行完以上脚本后,关闭数据库重新启动,数据库无法启动,报错如下:

 

SQL> startup nomount

ORA-27302: failure occurred at: skgpwreset1

ORA-27303: additional information: invalid shared ctx

ORA-27146: post/wait initialization failed

ORA-27300: OS system dependent operation:semget failed with status: 28

ORA-27301: OS failure message: No space left on device

ORA-27302: failure occurred at: sskgpcreates

 

3 分析

这些错误大部分和操作系统有关,ORACLE启动的时候检查操作系统的各项配置是否满足需求,如磁盘空间、内核参数等能否满足自己的需要,回头看看我们做过的操作:创建表空间、临时表空间、修改系统参数,然后分析上面个错误和那些操作有关。

 

ORA-27301: OS failure message: No space left on device

创建表空间、临时表空间可能引起该错误,df检查磁盘空间472G可用懦?/span>错误。

ORA-27300: OS system dependent operation:semget failed with status

无法获得操作系统的信号量。信号量相当于OS的内存锁,类似于oracle中的latch,每个进程要获取操作系统内存时(不是PGASGA),需要先获取到信号量才能申请内存。为了能保证每个进程不被阻塞,所以最好每个进程能分配到2个信号量。由于我们修改了oracleprocesses参数,oracle安装建议这个参数一般设置为processes*2+15比较保险的。检查该参数发现为300多,调整该参数为set semsys:seminfo_semmns=1024数据库正常启动。感谢fuyuncat帮助详细分析信号量的作用。

4 总结

 

建议各位同事以后在各个平台安装ORACLE软件的时候都要先按照ORACLE安装文档先把操作系统的各个内核参数(最大共享内存段、信号量等)进行相应的调整。然后再开始安装ORACLE。

5 附录

from:http://zhouwf0726.itpub.net/post/9689/297078

refer:http://space.itpub.net/16158219/viewspace-590998

你可能感兴趣的:(Oracle,Oracle,EBS)