ORA-01081: "cannot start already-running ORACLE - shut it down first"
admin
2023-05-15 01:02:08
0

                                                           

	Applies to: 
Oracle Server - Enterprise Edition - Version: 8.1.7.4 to 11.2.0.2.0 - Release: 8.1.7 to 11.2
Generic UNIX

当检查oracle实例后台进程不存在这时启动启动数据库报错: 
 

  ORA-01081: "cannot start already-running ORACLE - shut it down first" 

造成此种原因是

Orphaned shared memory segments and semaphores did not get cleared properly 
from the last instance shutdown.

在oracle实例最后一次shutdown时,某一个孤立的共享内存段和信号没有被清理干净

解决方法


可以利用ipcs来找出共享内存段或者信号,利用ipcrm来手动清除
orphaned shared memory segments(孤立的共享内存段) 和semaphores(信号量)


[root@rac01 ~]# ipcs -a 

------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status      
           
0x4e44b264 557069     oracle    640        287309824  25                      
0xd06e774c 524302     oracle    640        132120576  16                      

------ Semaphore Arrays --------
key        semid      owner      perms      nsems     
0x000000a7 0          root      600        1         
0x2e7fd0cc 131073     oracle    640        44        
0x334b5294 262146     oracle    640        154    



[root@rac01 ~]# ipcs -m 

------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status      
       
0x4e44b264 557069     oracle    640        287309824  25                      
0xd06e774c 524302     oracle    640        132120576  16                      


ipcs: 检查分配的共享内存
ipcrm:手动释放共享内存段

取得ipc信息:

ipcs [-m|-q|-s]
-m       输出有关共享内存(shared memory)的信息
-q       输出有关信息队列(message queue)的信息
-s       输出有关“信号量”(semaphore)的信息
-a       使用所有打印选项. (针对 -b, -c, -o, -p, and -t的速记符)


Example:
 
	ipcrm -m    shmid 号   - for shared memory 
	ipcrm -s    semid  号      - for semaphores 
 

OR

Shutdown all the instances belonging to the user. Next, run "ipcs -b" to find the remaining IPC 
facilities, owned by the same user, and remove them.  However, if you're running multiple production 
instances, this may not be  acceptable. 

在多实例的情况下
 
 
1. 运行 
  	 ipcs -a > /tmp/ipcs_before.out  
 
2. 用 SQL*Plus 连接所有实例做一个简单的查询 
         
	 select * from dual; 
 
3. 再次运行 
  	  ipcs -a > /tmp/ipcs_after.out  
 
4. 对比 "/tmp/ipcs_before.out" 与 "/tmp/ipcs_after.out"  文件
  查找 LPID 没有改变的共享内存段
  
   These are the orphaned shared memory segments you are looking for:  
  
 
    LPID 显示最后过程中附加或者分立共享内存段的进程 ID


     因为,通过在每一个活着的实例中执行查询,你会涉及到属于各自实例的共享内存段,
   但是未涉及的共享内存段将变成孤立的一个
 
5. After identifying the orphaned shared memory segments, you can find  
   the orphaned semaphores by locating the semaphores with the same  
   value of CTIME in "ipcs -a" output as the value of CTIME for the  
   orphaned shared memory segments: CTIME shows the time when the  
   associated entry was created or changed. 

   在识别孤立的共享内存段后,可以通过ipcs -a的输出确定具有相同CTIME值的信号找到孤立的共享内存段
   作为相关孤立共享内存段的值
 
   NOTE:  This step may not be necessary on the platforms implementing 
          post-wait kernel extension (AT&T Unix, AIX), when semaphores  
          are not used by Oracle at all.

更多相关内容:

解决oracle数据库ORA-01081: cannot start already-running ORACLE - shut it down first的方法

ORA-00904:"WM_CONCAT":标识符无效

相关内容

热门资讯

以军士兵集体丢掉武器抗命,大喊... 据凤凰卫视报道,以色列国防军一军事基地7月30日发生士兵抗命事件,约120名士兵抗议指挥官做法,将武...
蒋成华任商务部副部长 国务院任免国家工作人员。任命蒋成华为商务部副部长。免去蒋成华的商务部国际贸易谈判副代表职务。
伊朗驻华大使:在军事威胁下,不... 新华社北京7月31日电(记者刁慧琳) 伊朗驻华大使法兹里7月28日表示,伊美回到谈判桌的前提是美国必...
伊朗革命卫队在霍尔木兹海峡击中... 当地时间31日,伊朗伊斯兰革命卫队发布声明称,革命卫队海军当天在霍尔木兹海峡击中并扣留了两艘违反禁令...
美媒:特朗普,遇到了一个更强硬... 据《纽约时报》7月29日报道,就在特朗普总统看似放弃战事升级计划几天后,美国再次与伊朗交火。上周末,...
女子做气管镜时不幸身亡,丈夫称... 7月29日,西安刘先生反映妻子在当地医院做支气管镜检查时死亡,看监控时发现医生疑有违规操作。刘先生表...
全网“帮卖西瓜”,然后呢? 近日,河南部分地区西瓜滞销的消息在网上热度很高。很多地方也伸出援手:有景区收购千斤西瓜、免费赠予游客...
美媒:乌克兰袭击伊朗船只,险引... 据《纽约时报》7月28日报道,据伊朗和西方官员称,伊朗曾考虑攻击乌克兰的一个港口,以报复乌克兰对一艘...
20年里,他只画美女,用东方风... 迈进KIM在上海的工作室,迎面是一整墙的美女们。她们像是刚从一场时髦的沙龙里退场,或倚或立,眉宇间是...
Google在港推出AI代理G... 观点网讯:7月29日,Google在香港推出AI代理Gemini Spark,该代理可全天候在后台运...