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":标识符无效

相关内容

热门资讯

“前半生是恶霸,后半生是学霸”... 一个人的逆袭叫传奇。一群人的集体转行,叫世道变了。文|张雪莹出品|Vista天下知识局提到日本黑帮,...
若不想成7年来第五个被赶下台的... 【文/观察者网 张菁娟】“这是自2022年保守党前首相特拉斯上任仅数周便仓促辞职以来,英国政局最动荡...
产学研各界代表齐聚一堂,共议A... 封面新闻记者 易弋力 20支战队4小时巅峰对决;三位大咖三个不同视角解读“技术打法+产业路径+数据洞...
评论丨香蕉复仇、蓝莓出轨?警惕... AI技术降低了创作门槛,不等于降低了质量门槛和责任门槛;可以利用AI“手搓”短剧,但不应没下限地制造...
人工智能如何重塑电影行业?中国... 北京5月15日电 (记者 孙自法)人工智能生成内容(AIGC)正为众多行业带来深刻巨变,引发广泛关注...
济南隆超取得便捷式喷涂装置专利... 国家知识产权局信息显示,济南隆超石油机械锻造有限公司取得一项名为“一种便捷式喷涂装置”的专利,授权公...
原创 国... ## 国际空间站宇航员在微重力环境下与新鲜水果合影 维生素C很重要,即使在太空中也是如此。 来源:...
原创 低... 手机厂商的618活动陆续都开启了,在苹果宣布iPhone 17 Pro系列降价千元后,华为也迅速跟进...
微信第一行代码曝光! IT之家 5 月 15 日消息,据 CCF 计算机博物馆官方消息,2026 年 5 月 15 日,中...
光鼎电子取得LED数码管灌胶设... 国家知识产权局信息显示,连云港光鼎电子有限公司取得一项名为“一种LED数码管灌胶设备”的专利,授权公...