您的位置:首页 > 数据库

活跃进程连接导致数据库迟迟未关闭

2013-08-28 12:38 148 查看
关闭数据库时,在sqlplus里面输入shutdown immediate迟迟无响应
所以查看了alertlog文件
$ cd $ORACLE_BASE
$ ls
admin product
$ cd admin
$ ls
nbcs
$ cd *
$ ls
adump bdump cdump dpdump pfile scripts udump
$ cd bdump
$ tail -f al*
PMON failed to acquire latch, see PMON dump
PMON failed to acquire latch, see PMON dump
Tue Jul 31 19:19:39 2012
PMON failed to acquire latch, see PMON dump
PMON failed to acquire latch, see PMON dump
PMON failed to acquire latch, see PMON dump
PMON failed to acquire latch, see PMON dump
PMON failed to acquire latch, see PMON dump
Tue Jul 31 19:19:49 2012
PMON failed to acquire latch, see PMON dump
PMON failed to acquire latch, see PMON dump
PMON failed to acquire latch, see PMON dump
PMON failed to acquire latch, see PMON dump
PMON failed to acquire latch, see PMON dump
Tue Jul 31 19:20:00 2012
PMON failed to acquire latch, see PMON dump
PMON failed to acquire latch, see PMON dump
PMON failed to acquire latch, see PMON dump
PMON failed to acquire latch, see PMON dump
发现以上错误不断产生
查看相应trc

$ ls -al | grep pmon
-rw-r----- 1 ora10g oinstall 19882 Jul 31 19:20 nbcs_pmon_1253768.trc
-rw-r----- 1 ora10g oinstall 12426 Nov 21 2011 nbcs_pmon_1364212.trc
-rw-r----- 1 ora10g oinstall 33267 Mar 02 17:00 nbcs_pmon_1384882.trc
-rw-r----- 1 ora10g oinstall 54817 Sep 15 2011 nbcs_pmon_1581172.trc
-rw-r----- 1 ora10g oinstall 24477 Mar 02 17:15 nbcs_pmon_2048376.trc
-rw-r----- 1 ora10g oinstall 19608 Nov 21 2011 nbcs_pmon_286748.trc
-rw-r----- 1 ora10g oinstall 15475 Nov 21 2011 nbcs_pmon_291196.trc
-rw-r----- 1 ora10g oinstall 50030 Sep 04 2011 nbcs_pmon_438492.trc
-rw-r----- 1 ora10g oinstall 7313 Sep 06 2011 nbcs_pmon_458978.trc
-rw-r----- 1 ora10g oinstall 7223 Sep 20 2011 nbcs_pmon_483574.trc
-rw-r----- 1 ora10g oinstall 9227 Nov 21 2011 nbcs_pmon_618992.trc
-rw-r----- 1 ora10g oinstall 11546 Oct 24 2011 nbcs_pmon_635012.trc
-rw-r----- 1 ora10g oinstall 19727 Aug 26 2011 nbcs_pmon_712864.trc
-rw-r----- 1 ora10g oinstall 22074 Jan 16 2012 nbcs_pmon_839930.trc
找到第一个当时的pmon trc文件
$ more nbcs_pmon_1253768.trc
/oracle/ora10g/admin/nbcs/bdump/nbcs_pmon_1253768.trc
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning and Data Mining options
ORACLE_HOME = /oracle/ora10g/product/10.2.0
System name: AIX
Node name: p550b
Release: 3
Version: 5
Machine: 00CBFF064C00
Instance name: nbcs
Redo thread mounted by this instance: 1
Oracle process number: 2
Unix process pid: 1253768, image: oracle@p550b (PMON)
*** 2012-07-31 19:18:54.923
*** SERVICE NAME:(SYS$BACKGROUND) 2012-07-31 19:18:54.899
*** SESSION ID:(280.1) 2012-07-31 19:18:54.899
PMON unable to acquire latch 700000010007490 process allocation level=1
Location from where latch is held: ksukia:
Context saved from call: 0
state=busy, wlstate=free
gotten 1800379 times wait, failed first 46 sleeps 8
gotten 900174 times nowait, failed: 37
possible holder pid = 46 ospid=3060032
----------------------------------------
SO: 700000106255df8, type: 2, owner: 0, flag: INIT/-/-/0x00
(process) Oracle pid=46, calls cur/top: 0/70000010286c688, flag: (0) -
int error: 0, call error: 0, sess error: 0, txn error 0
(post info) last post received: 1089 8 12
last post received-location: ksusig
last process to post me: 700000106255df8 25 0
last post sent: 0 0 200
last post sent-location: kmmpsh
last process posted by me: 70000010624dff8 1 0
(latch info) wait_event=0 bits=2
holding (efd=4) 700000010007490 process allocation level=1
Location from where latch is held: ksukia:
Context saved from call: 0
state=busy, wlstate=free
Process Group: DEFAULT, pseudo proc: 7000001062881a8
O/S info: user: ogg, term: pts/20, ospid: 3060032
OSD pid info: Unix process pid: 3060032, image: oracle@p550b (TNS V1-V3)
Short stack dump:
ksdxfstk+002c<-ksdxcb+04e4<-sspuser+0068<-000044C0<-skgpwwait+0094<-ksliwat+05a4<-kslwaitns+001c<-kskthbwt+01f8<-kslwait+0058<-ksupetrm+0260<-ksupxtrm+0020<-ksukia+00e0
<-opistp_real+1838<-opistp+0300<-opiodr+0adc<-ttcpip+1004<-opitsk+1000<-opiino+0990<-opiodr+0adc<-opidrv+0474<-sou2o+0090<-opimai_real+01bc<-main+0098<-__start+0098
Dump of memory from 0x070000010623D9A8 to 0x070000010623DBB0
70000010623D9A0 00000010 00000000 [........]
70000010623D9B0 07000001 06D2BCA8 00000007 0003139D [................]
70000010623D9C0 07000001 06D2BD88 00000007 0003139D [................]
70000010623D9D0 07000001 06D2BE80 00000007 0003139D [................]
70000010623D9E0 07000001 06D2BF60 00000007 0003139D [.......`........]
70000010623D9F0 07000001 06D2C040 00000007 0003139D [.......@........]
70000010623DA00 07000001 06D2C120 00000007 0003139D [....... ........]
70000010623DA10 07000001 06D2C200 00000007 0003139D [................]
70000010623DA20 07000001 06D2C2E0 00000007 0003139D [................]
70000010623DA30 07000001 06D2C3C0 00000007 0003139D [................]
70000010623DA40 07000001 06D2C4A0 00000007 0003139D [................]
70000010623DA50 07000001 06D2C580 00000007 0003139D [................]
70000010623DA60 07000001 06D2C660 00000007 0003139D [.......`........]
70000010623DA70 07000001 06D2C740 00000007 0003139D [.......@........]
70000010623DA80 07000001 06D2C820 00000007 0003139D [....... ........]
70000010623DA90 07000001 06D2C900 00000007 0003139D [................]
可以看见latch info信息,正在holding,state=busy,继续可看见相关进程:
O/S info: user: ogg, term: pts/20, ospid: 3060032
OSD pid info: Unix process pid: 3060032, image: oracle@p550b (TNS V1-V3)
$ su - root
root's Password:
root:/>ps -ef | grep 3691000
ogg 3060032 3691000 0 18:40:42 - 0:12 oraclenbcs (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
ogg 3691000 4035010 0 18:40:40 pts/20 0:00 sqlplus
root 4510132 4325500 0 19:21:42 pts/24 0:00 grep 3691000
root:/>
root:/>ps -ef | grep 4035010
ogg 3691000 4035010 0 18:40:40 pts/20 0:00 sqlplus
root 3891694 4325500 0 19:22:11 pts/24 0:00 grep 4035010
ogg 4035010 4026704 0 17:40:54 pts/20 0:00 -ksh
找到了对应进程,发现是由于一个连接sqlplus未退出导致。。最后将此连接推出,数据库成功关闭。

本文出自 “DBA的随笔记录” 博客,请务必保留此出处http://ck1985.blog.51cto.com/4539614/1284294
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐