昨天晚上帮一个朋友调oracle内存参数,环境是在windows 2008下的oracle 10.2.0.1.0 ,是HA集群,一台主机上装了三个数据库,另一台是装了一个库做HA。 中间碰到了几个比较变态的问题,1、存储的文件突然变成只读了,这个好解决,更要命令的是windows下的服务太变态了。。。当我用alter system set命令改好sga_target等参数后,再重启,发生了下面的故事。。。
    
   操作步骤是:
    (1)先重启windows的Oracle服务。
    (2)在DOS命令窗口设Orcle环境变量set ORACLE_SID=orcl1
    (3)sqlplus sys/oracle as sysdba
    (4)startup pfile='E:\pfile.ora' nomount;
        报错:OERR: ORA-27100 shared memory realm already exists

开始尝试如下操作:
    shutdown abort;
    startup pfile='E:\pfile.ora'   nomount;

依然报错:OERR: ORA-27100 shared memory realm already exists

网上搜索提到:sga_max_size,sga_target内存设的太大了,也会报错,于是手工把他改小改成:sga_max_size=800M,sga_target=800M;重启依然报错。。。。。

主机上装了三个数据库,是不是因为其它库的原因呢,于是把其它库全部关闭掉。再次登录
    set ORACLE_SID=orcl1
    sqlplus sys/oracle as sysdba
    startup pfile='E:\pfile.ora'   nomount;

OERR: ORA-27100 shared memory realm already exists

操,还是报错,到底什么原因呢?在LINUX几乎没碰到这样的错误。。。。
    好吧,我把当前的spfile给转出来:
    create pfile='E:\gyj.ora' from spfile;
    发现里面的db_name='xxxxxx',而不是orcl1,我明明手功设置了实例的环境 set ORACLE_SID=orcl1,

为啥转出的spfile的db_name是其它库的名称而并非orcl1呢?而且细看其它参数也都是描述数据库'xxxxx'的信息。

百思不得其解,难道手功设的环境变量没生效:set ORACLE_SID=orcl1
    接下来,去查了查metalink ,搜索ORA-27100

第二参考文档:

Applies to:

Oracle Server - Enterprise Edition - Version: 9.2.0.6 to 11.2.0.3 - Release: 9.2 to 11.2
z*OBSOLETE: Microsoft Windows Server 2003
***Checked for relevance on 19-Dec-2011***

Symptoms

ORA-27100 is reported during a manual startup of the database .

C:\> sqlplus / as sysdba
SQL*Plus: Release 10.2.0.4.0 - Production on Mon Dec 19 09:29:20 2011
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

Connected to an idle instance.

SQL> startup
ORA-27100: shared memory realm already exists

SQL> shutdown immediate
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
SQL>

Restarting the service, the same error is encountered.
Rebooting the server does not help as well (because that also restarts the service).

Changes

The parameter sga_max_size was increased, e.g. from 2GB to 3GB.

Cause

Changing the parameter sga_max_size (from OEM or directly on the SQL prompt) will make the change in the spfile.

ORA-27100 is received as a result of changes made to parameters affecting the SGA size.
The service was created to start with an spfile.
When the service is restarted, it will use the spfile and the error occurs due to the SGA parameter change.

Test Case:


--  Check the current value of sga_max_size

SQL> show parameter sga_max_size

NAME TYPE VALUE
------------------------------------ ----------- -------
sga_max_size                         big integer 308M

--  Save the spfile to a pfile in order to restore the original values
SQL> create pfile from spfile;
--  Increase sga_max_size to a value that is actually too large for the system, e.g.
SQL> alter system set sga_max_size=3G scope=spfile;
SQL> shutdown immediate
SQL> exit
--  Now restart the service that is configured to automatically start
--  the instance/database using the (default) spfile
--  Note that the servcie startup is now very quick as compared to
--  successful attempts where the SGA is actually created
--  Trying to start (and shutdown) the database now from the SQL prompt
--  shows the error messages:
C:\> sqlplus / as sysdba
SQL*Plus: Release 10.2.0.4.0 - Production on Mon Dec 19 09:29:20 2011
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to an idle instance.
SQL> startup
ORA-27100: shared memory realm already exists

SQL> shutdown immediate
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
SQL>

The actual root cause is in fact the limitation of physical memory.
When the service is not restarted but the instance is stopped and restarted after increasing sga_max_size, the next errors can be observed:

SQL> startup
ORA-27102: out of memory
OSD-00022: additional error information
O/S-Error: (OS 8) Not enough storage is available to process this command.
SQL>

Solution

To be able to start the instance/database again, please use the next steps:

C:\> sqlplus / as sysdba

...
Connected to an idle instance.
SQL> create pfile from spfile;
--  Edit the pfile to correct the too large sga_max_size value
--  to a value fitting the available physical memory
SQL> create spfile from pfile;
--  Restart the service
--  This uses the corrected spfile to automatically start the instance
--  (with ORA_<SID>_AUTOSTART=TRUE in the Windows Registry)



第二参考文档:
Problem Description:
==================== You are trying to start an Oracle instance when ORA-27100 is reported.ORA-27100: shared memory realm already exists Cause: Tried to start duplicate instances, or tried to restart an instance that had not been properly shutdown Action: Use a different instance name, or cleanup the failed instance's SGA The instance does not come up successfully and instance recovery is required.
However, instance recovery cannot complete because the instance is requiring
too much memory and will not start.Bringing the database up in stages reveals ORA-27102 during a startup nomount.Solution Description:
===================== The size of the SGA must be reduced so the instance can startup or the new
software must be removed. To determine if the problem is memory related:1. Start svrmgr30 or connect as the internal SYSDBA user.SVRMGR> Connect as internal/userpassword@SID
SVRMGR> shutdown immediate
SVRMGR> startup nomount pfile=C:\ORANT\DATABASE\initSID.oraor with 9i and 10gsqlplus /nolog
SQL> connect / as sysdba
SQL> shutdown immediate
SQL> startup nomount pfile='C:\ORANT\DATABASE\initiSID.ora'ORA-27102 will be reported if the problem is memory related. The instance
cannot start. Proceed to step 2.2. shutdown immediateReduce one or more of the following initSID.ora parameter values using a text
editor:   shared_pool_size   (affects the library and data dictionary cache)
db_block_buffers   (affects the database buffer cache)
log_buffer         (affects the redo log buffer area)3. Return to Server Manager or SQL*Plus and try to start the instance again.SVRMGR> startup nomount pfile=C:\ORANT\DATABASE\initSID.oraor SQL>  startup nomount pfile='C:\ORANT\DATABASE\initSID.ora'If the instance startup still fails with ORA-27102 repeat steps 1-3
until the instance starts. Once it starts proceed to step 4.4. At the Server Manager prompt or in SQL*Plus issue:alter database mount
alter database openIf you are on a unix machine, you can clean up from last shutdown.1) Delete $ORACLE_HOME/dbs/sgadef<sid>.dbf files (only applicable forversons prior to 8.1.x).2) Delete $ORACLE_HOME/dbs/lk<sid> files3) If more than one instance on this box, need to identify only thesemaphores and shared memory associtated with that instance.a) SVRMGR>connect internalb) SVRMGR>oradebug ipc  (This will list all shared memory and semaphoresfor this instance)or on 9i and 10ga) sqlplus /nologb) connect / as sysdbac) oradebug ipc4) Remove shared memory and semaphores for this instance.a) ipcs (Lists all Interprocesses)b) ipcrm -m <id> (Removes Shared Memory Processes)c) ipcrm -s <id> (Removes Semaphores)After these steps the database should be able to startup without
any errors and without reducing the size of the SGA.Explanation:
============ ORA-27100 is received as a result of changes made to initSID.ora parameters
affecting the SGA size, or a new software was recently installed on the
database server which requires additional memory.Reducing the size of the SGA allows the instance to start and recover. The
database can then be mounted and opened successfully.References:
=========== Administrators Guide
Reference Guide
Concepts Guide

参考了metalink也没有找到很有用的价值。于是只能静下心来,好好理一下思路。

OERR: ORA-27100 shared memory realm already exists ,从这个错误上来看,是实例没有完全关闭,但是我已用了shutdown abort了,

为啥oralce还一直不释放内存呢?

是不是Oracle的服务有问题,但我服务也关闭了,这操蛋的windows,在LINUX不会发生这样的事,我用命令startup pfile='E:\pfile.ora'   nomount;
 报错,同时换成startup nomount;一样也报同样的借误。这个命令的启动只会去读参数文件,我去查了查参数文件到$ORACLE_HOME\database\,看到了initorcl1.ora,initorcl1.ora就是pfile里面只有一条记录spfile='E:\oracle10.2.1.0\db_1\dbs\spfileorcl1.ora'。

我查了查spfileorcl1.ora'里面的sga_max_size=10G,sga_target=8G ,难道我用startup pfile='E:\pfile.ora'   nomount;命令启动数据库,Oracle去调'E:\oracle10.2.1.0\db_1\dbs\spfileorcl1.ora',而导致的?

一台主机上有三个库(主机的CPU是16个,内存是16G),是不是sga_max_size=10G,sga_target=8G作怪呢》是不是这个原因呢?

下面来验证一下,我把'E:\oracle10.2.1.0\db_1\dbs\spfileorcl1.ora'文件给移走了,然后startup pfile='E:\pfile.ora'   nomount;  成功了!!!

难道是缺省安装时,oracle在windows服务启动时会自动启动实例,每次启动服务都会自动用默认的错误(spfileorcl1.ora'里面的sga_max_size=10G,sga_target=8G)的spfile('E:\oracle10.2.1.0\db_1\dbs\spfileorcl1.ora)启动实例,导至内存错误。

OERR: ORA-27100 shared memory realm already exists 对这个错误先做个笔记。。。以后碰到windows的oracle千成要注意一下!

startup pfile='E:\pfile.ora'   nomount;不好使,不管怎么样,问题终于找到原因!  呵呵仅供参考。

参数的启动顺序只合适于LINUX,我再也不相信windows了。。。。

变态的windows----OERR: ORA-27100 shared memory realm already exists相关推荐

  1. Oracle在Windows系统中出现的ORA-27100: shared memory realm already exists 的奇怪现象

    整理这篇文章的原因是前段时间帮网友远程解决一个问题时,用startup pfile='d:/1.ora';时总是报错ORA-27100,最后是用oradim删除了服务后再创建服务后解决. 一直比较郁闷 ...

  2. 解决ORA--27100 shared memory realm already exists报错

    OS环境:windows PC 数据库版本:oracle 10.0.2.1 这是一次小打小闹的报错,原因是帮同事改他自己玩的测试库sga,原sga_max_size大小为600M,我修改为2G,重启时 ...

  3. 简单解决“ORA-27100: shared memory realm already exists”的问题

    折腾Oracle时,出现了"ORA-27100: shared memory realm already exists"的问题.上网查问题根源,乃是32位机SGA及PGA不能大于1 ...

  4. 处理错误:ORA-27101: shared memory realm does not exist

    2019独角兽企业重金招聘Python工程师标准>>> 我试图连接数据库时的ORA-01034 和 ORA-27101错误信息,它总是显示这样的信息,"ORA-01034 ...

  5. ORA-27101 shared memory realm does not exist 错误处理

    ORA-27101 错误处理 racle Database的主机被异常关机,重新启动电脑,Database报ORA-27101 shared memory realm does not exist 错 ...

  6. “ORA-01034 - Oracle not available”和“ORA-27101 - shared memory realm does not exist”

      今天打开虚拟机中Oracle数据库,显示如下错误:"ORA-01034 - Oracle not available"和"ORA-27101 - shared mem ...

  7. 解决oracle11g连接失败 ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist

    今天在使用ORACLE数据库时出现这样一个错误,登录时连接失败. 服务器提示: ORA-01034: ORACLE not available ORA-27101: shared memory rea ...

  8. 记录一次ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exis故障【已解决】

    本地ORACLE数据库使用了很久了,一直没问题,但是,昨天突然就无法登陆. 报错信息为:ORA-01034: ORACLE not available ORA-27101: shared memory ...

  9. ORA-27101: shared memory realm does not exist 错误的处理(ORA-01034 - Oracle not available )

    ORA-27101: shared memory realm does not exist 错误的处理 试图连接数据库时的ORA-01034 和 ORA-27101错误信息,它总是显示这样的信息, & ...

最新文章

  1. python 格式化字符串_Python格式化字符串常用操作
  2. AndroidStudio自定义属性xmlns无法识别问题解决in Gradle projects,always use http://schemas.android.com/apk/res-auto
  3. 计算机学科技术前沿:互联网上信息可信性的现状
  4. Kubernetes 日志查询分析实践
  5. server_u文件服务器已停止,Serv-U停止服务怎么解决
  6. python自助电影售票机_Spring Cloud版——电影售票系统六使用 Spring Cloud Config 统一管理微服务配置...
  7. 阿里云产品汇总及解释
  8. C#调用C++编写的dll库
  9. php读取doc pdf文件,PHP读取创建txt,doc,xls,pdf类型文件
  10. React骚操作——jsx遇到template-directive
  11. Atitit 前端测试最简化内嵌web服务器 php 与node.js 目录 1.1. php内置Web Server 1 1.2. Node的 2 Node的比较麻烦些。。Php更加简单
  12. J2EE框架学习经典总结
  13. windows使用放大镜快速放大屏幕局部
  14. c语言矩阵键盘控制四个led灯,51单片机矩阵键盘与左右流水灯控制C程序
  15. 多个版本的BIND DNS软件都存在一个严重漏洞
  16. 毕业论文参考文献格式及引用设置
  17. 芯片行业相关公司及就业岗位汇总
  18. 计算机监控系统sacad,太阳能热泵多功能复合机(sahpm)计算机监控系统实现方法研究-机械电子工程专业论文.docx...
  19. Third season twenty-third episode,Ross‘s thing on his butt???
  20. c语言大小写字母互换1005,1005 Jugs,1005jugs

热门文章

  1. bat批量剪切命令_Windows批量搜索并复制/剪切文件的批处理程序实例
  2. linux查看cpupower模式,Linux - cpupower调整CPU主频
  3. 深度linux15.3桌面版,深度操作系统15.3 官方下载
  4. Excel VBA-批量将多个sheet表另存为单独的工作薄文件
  5. 安装erlang没有bin文件夹_Erlang安装简介
  6. linux中使用串口(dnw)下载程序到jz2440开发板
  7. UPC-排课表+玉米田(容斥原理+组合数学公式)
  8. js 汉字拼音转换工具。
  9. 【其他】Beyond Compare 4 授权密钥被吊销的解决办法,超简单!!!!
  10. solr的多条件组合查询