shutdown数据库后提示数据库处于running状态

     今天shutdown immediate业务数据库后,发现重启数据库报数据库running的故障,分析处理如下:

首先shutdown数据库的时候,挂死十几分钟,检查oracle后台进程已经没有了,郁闷一下后,决定强制结束该进程。

sys@TEST_SQL> shutdown immediate

Database closed.

Database dismounted.

 

ORA-03113: end-of-file on communication channel

 

尝试重新连接数据库

cq2-2[/oracle]$sqlplus '/ as sysdba'

SQL*Plus: Release 10.2.0.5.0 - Production on Sun Apr 3 17:47:28 2011

 

Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.

 

Connected.

显示connected,怎么不是idel?检查oracle进程,发现没有任何进程

cq2-2[/]#ps -ef|grep ora

    root 28397 27397  0 17:50:07 pts/ta    0:00 grep ora

  oracle 27856 27821  0 17:44:08 pts/tb    0:00 –ksh

尝试启动,报ORA-01081错误

cq2-2[/oracle]$sqlplus '/ as sysdba'

 

SQL*Plus: Release 10.2.0.5.0 - Production on Sun Apr 3 17:48:02 2011

 

Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.

 

Connected.

SQL> startup

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

SQL> exit

Disconnected

 

尝试再次shutdown immediate 数据库

cq2-2[/oracle]$sqlplus '/ as sysdba'

 

SQL*Plus: Release 10.2.0.5.0 - Production on Sun Apr 3 17:48:55 2011

 

Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.

 

Connected.

SQL> startup

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

SQL> shutdown immediate

ORA-24324: service handle not initialized

ORA-24323: value not allowed

ORA-01089: immediate shutdown in progress - no operations are permitted

SQL> exit

Disconnected

 

ORA-01089这个错误说明还在进行shutdown进程中。

通过现象和经验,我怀疑是oracle的共享内存段未得到释放所致,使用ipcs检查共享内存段信息,果然oracle的内存段还在。

cq2-2[/oracle]$ipcs

IPC status from /dev/kmem as of Sun Apr  3 17:53:08 2011

T         ID     KEY        MODE        OWNER     GROUP

Message Queues:

q          0 0x3c1c085b -Rrw--w--w-      root      root

q          1 0x3e1c085b --rw-r--r--      root      root

Shared Memory:

m          0 0x411c0805 --rw-rw-rw-      root      root

m          1 0x4e0c0002 --rw-rw-rw-      root      root

m          2 0x41201350 --rw-rw-rw-      root      root

m          3 0x00a5c581 --rw-------     sfmdb     users

m          4 0x411c0439 --rw-------      root      root

m          5 0x06347849 --rw-rw-rw-      root      root

m    1933318 0x491802c9 --rw-r--r--      root      root

m          7 0x0c6629c9 --rw-r-----      root      root

m    7077896 0x128d22a8 --rw-r-----    oracle  oinstall

Semaphores:

s          0 0x4f1c015c --ra-------      root      root

s          1 0x411c0805 --ra-ra-ra-      root      root

s          2 0x4e0c0002 --ra-ra-ra-      root      root

s          3 0x41201350 --ra-ra-ra-      root      root

s          4 0x01090522 --ra-r--r--      root      root

s          5 0x00a5c581 --ra-------     sfmdb     users

s          6 0x00a5c582 --ra-------     sfmdb     users

s          7 0x00a5c583 --ra-------     sfmdb     users

s          8 0x00a5c584 --ra-------     sfmdb     users

s          9 0x00a5c585 --ra-------     sfmdb     users

s         10 0x00a5c586 --ra-------     sfmdb     users

s         11 0x00a5c587 --ra-------     sfmdb     users

s         12 0x411c0439 --ra-------      root      root

s         13 0x6120016a --ra-ra-ra-      root      root

s         14 0x7320016a --ra-ra-ra-      root      root

s         15 0x7020016a --ra-ra-ra-      root      root

s         16 0x6920016a --ra-ra-ra-      root      root

s         17 0x7520016a --ra-ra-ra-      root      root

s         18 0x6320016a --ra-ra-ra-      root      root

s         19 0x6420016a --ra-ra-ra-      root      root

s         20 0x6620016a --ra-ra-ra-      root      root

s         21 0x6c20016a --ra-ra-ra-      root      root

s         22 0x6d20016a --ra-ra-ra-      root      root

s         23 0x6f20016a --ra-ra-ra-      root      root

s         24 0x31200d83 --ra-ra-ra-      root      root

s         25 0x491802c9 --ra-r--r--      root      root

s         26 0x410c048a --ra-ra-ra-      root      root

s         27 0x7120003c --ra-ra-ra-      root      root

s       8220 0x5220016a --ra-ra-ra-      root      root

s     450589 0xe6cf9a40 --ra-r-----    oracle  oinstall

 

采取shutdown abort处理

cq2-2[/oracle]$  sqlplus '/ as sysdba'

 

SQL*Plus: Release 10.2.0.5.0 - Production on Sun Apr 3 17:55:13 2011

 

Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.

 

Connected.

SQL> conn / as sysdba

Connected to an idle instance.

SQL> shutdown abort

ORACLE instance shut down.

SQL> exit

Disconnected

 

再次检查共享内存段,发现已经不存在oracle的共享内存段了

cq2-2[/oracle]$ipcs

IPC status from /dev/kmem as of Sun Apr  3 17:55:37 2011

T         ID     KEY        MODE        OWNER     GROUP

Message Queues:

q          0 0x3c1c085b -Rrw--w--w-      root      root

q          1 0x3e1c085b --rw-r--r--      root      root

Shared Memory:

m          0 0x411c0805 --rw-rw-rw-      root      root

m          1 0x4e0c0002 --rw-rw-rw-      root      root

m          2 0x41201350 --rw-rw-rw-      root      root

m          3 0x00a5c581 --rw-------     sfmdb     users

m          4 0x411c0439 --rw-------      root      root

m          5 0x06347849 --rw-rw-rw-      root      root

m    1933318 0x491802c9 --rw-r--r--      root      root

m          7 0x0c6629c9 --rw-r-----      root      root

Semaphores:

s          0 0x4f1c015c --ra-------      root      root

s          1 0x411c0805 --ra-ra-ra-      root      root

s          2 0x4e0c0002 --ra-ra-ra-      root      root

s          3 0x41201350 --ra-ra-ra-      root      root

s          4 0x01090522 --ra-r--r--      root      root

s          5 0x00a5c581 --ra-------     sfmdb     users

s          6 0x00a5c582 --ra-------     sfmdb     users

s          7 0x00a5c583 --ra-------     sfmdb     users

s          8 0x00a5c584 --ra-------     sfmdb     users

s          9 0x00a5c585 --ra-------     sfmdb     users

s         10 0x00a5c586 --ra-------     sfmdb     users

s         11 0x00a5c587 --ra-------     sfmdb     users

s         12 0x411c0439 --ra-------      root      root

s         13 0x6120016a --ra-ra-ra-      root      root

s         14 0x7320016a --ra-ra-ra-      root      root

s         15 0x7020016a --ra-ra-ra-      root      root

s         16 0x6920016a --ra-ra-ra-      root      root

s         17 0x7520016a --ra-ra-ra-      root      root

s         18 0x6320016a --ra-ra-ra-      root      root

s         19 0x6420016a --ra-ra-ra-      root      root

s         20 0x6620016a --ra-ra-ra-      root      root

s         21 0x6c20016a --ra-ra-ra-      root      root

s         22 0x6d20016a --ra-ra-ra-      root      root

s         23 0x6f20016a --ra-ra-ra-      root      root

s         24 0x31200d83 --ra-ra-ra-      root      root

s         25 0x491802c9 --ra-r--r--      root      root

s         26 0x410c048a --ra-ra-ra-      root      root

s         27 0x7120003c --ra-ra-ra-      root      root

s       8220 0x5220016a --ra-ra-ra-      root      root

 

下面就是重启数据库了,成功!!

cq2-2[/oracle]$sqlplus '/ as sysdba '

 

SQL*Plus: Release 10.2.0.5.0 - Production on Sun Apr 3 17:55:44 2011

 

Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.

 

Connected to an idle instance.

 

SQL> startup

ORACLE instance started.

 

Total System Global Area 2.5770E+10 bytes

Fixed Size                  2114592 bytes

Variable Size            2701134816 bytes

Database Buffers         2.3052E+10 bytes

Redo Buffers               14659584 bytes

Database mounted.

Database opened.

 

 

 

 

 

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/11088128/viewspace-691840/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/11088128/viewspace-691840/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值