oracle.01081 cannot,ORA-01081: cannot start already-running ORACLE - shut it down first
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.01081 cannot,ORA-01081: cannot start already-running ORACLE - shut it down first的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: C语言求一个数组中第k大的数,leetc
- 下一篇: idea打包meven镜像_Inteli