변태 윈도우즈----OERR: ORA-27100 shared memory realm already exists

10556 단어
어젯밤에 한 친구를 도와서 oracle 메모리 파라미터를 조정했다. 환경은 윈도우즈 2008에 있는oracle 10.2.0.1.0이다. HA 집단이고 한 호스트에 세 개의 데이터베이스를 설치했고 다른 한 호스트는 HA를 만드는 라이브러리를 설치했다.중간에 몇 가지 변태적인 문제에 부딪혔습니다. 1. 저장된 파일이 갑자기 읽기만 하는 것이 되었습니다. 이것은 해결하기 쉽고 명령해야 할 것은 윈도우즈 아래의 서비스가 너무 변태적입니다.alter system set 명령으로 sgatarget 등 매개 변수를 다시 시작하면 다음 이야기가 발생합니다.
    
작업 단계는 다음과 같습니다.
(1) 윈도우즈의 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
인터넷 검색 언급:sgamax_size,sga_target 메모리를 너무 크게 설정하면 오류가 발생합니다. 그래서 수동으로 그를 작게 고칩니다: sgamax_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 ORACLESID=orcl1,
왜 돌린 spfile의dbname은 orcl1이 아닌 다른 라이브러리의 이름입니까?그리고 다른 매개 변수를 자세히 보면 데이터베이스'xxxx'를 설명하는 정보입니다.
아무리 생각해도 이해되지 않는데 설마 수공설의 환경 변수가 효력이 발생하지 않았단 말인가: set ORACLESID=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***
SymptomsORA-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).
ChangesThe parameter sga_max_size was increased, e.g. from 2GB to 3GB.
CauseChanging 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.ora

or with 9i and 10g

sqlplus /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 immediate

Reduce 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.ora

or 

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 open

If you are on a unix machine, you can clean up from last shutdown.

1) Delete $ORACLE_HOME/dbs/sgadef<sid>.dbf files (only applicable for
   versons prior to 8.1.x).

2) Delete $ORACLE_HOME/dbs/lk<sid> files

3) If more than one instance on this box, need to identify only the
   semaphores and shared memory associtated with that instance.
   a) SVRMGR>connect internal
   b) SVRMGR>oradebug ipc  (This will list all shared memory and semaphores
                            for this instance)

or on 9i and 10g

   a) sqlplus /nolog
   b) connect / as sysdba
   c) oradebug ipc

4) 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

메타링크를 참고했지만 유용한 가치를 찾지 못했다.그래서 마음을 가라앉히고 생각을 잘 정리할 수밖에 없었다.
OERR: ORA-27100 shared memory realm already exists, 이 오류로 볼 때 완전히 닫히지 않은 실례지만 shutdown abort를 사용했습니다.
왜 Oralce는 메모리를 계속 방출하지 않습니까?
Oracle 서비스에 문제가 있는지 모르겠지만 제 서비스도 꺼졌습니다. 이 엉터리 윈도우즈는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'안의 sgamax_size=10G,sga_target=8G, 설마 내가 startup pfile='E:\pfile.ora'   nomount;명령은 데이터베이스를 시작하고 Oracle은'E:\oracle10.2.1.0\db_1\dbs\spfileorcl1.오로라
한 호스트에 세 개의 라이브러리(호스트의 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은 윈도우즈 서비스가 시작될 때 자동으로 시작됩니다. 서비스가 시작될 때마다 기본 오류 (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는 이 오류에 대해 먼저 필기를 합니다...앞으로 윈도우즈를 만나는oracle 천성 씨 조심하세요!
       startup pfile='E:\pfile.ora'   nomount;안 돼, 어쨌든 문제는 결국 원인을 찾았어!참고로
매개 변수의 시작 순서는 LINUX에만 적합합니다. 나는 더 이상 윈도우즈를 믿지 않습니다.

좋은 웹페이지 즐겨찾기