Home  >  Article  >  Database  >  ORA-01075: you are currently logged on

ORA-01075: you are currently logged on

WBOY
WBOYOriginal
2016-06-07 17:11:251836browse

手工杀掉oracle进程和手工释放共享内存是非常危险的,不到万不得已,千万不要使用,容易造成数据不一致。这个方法是作为没有办法

我的dataguard因为ora-600错误导致备机hang住,使其无法登陆Oracle数据库

参考: 

现象
[root@skate01 ~]# su - oracle
[oracle@skate01 ~]$ sqlplus "/as sysdba"

SQL*Plus: Release 11.2.0.2.0 Production on Tue Feb 21 00:26:35 2012

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

ERROR:
ORA-01075: you are currently logged on

[oracle@skate01 ~]$

 

为了快速登录oracle,,好迅速启动oracle,这里提供一种超暴力的方法

1.使用Linux的kill命令杀死所有与oracle有关的进程
$ ps -ef |grep $ORACLE_SID|grep -v grep|awk '{print $2}' | xargs kill -9

2.使用Linux的ipcs和ipcsrm命令释放oracle占用的共享内存
$ ipcs -m | grep oracle | awk '{print $2}' | xargs ipcrm shm

 

操作步骤:
[root@skate01 ~]# su - oracle
[oracle@skate01 ~]$ sqlplus "/as sysdba"
SQL*Plus: Release 11.2.0.2.0 Production on Tue Feb 21 00:35:11 2012

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

ERROR:
ORA-01075: you are currently logged on


Enter user-name: sys
Enter password:
ERROR:
ORA-00600: internal error code, arguments: [KGHLKREM1], [0x838000020], [], [],
[], [], [], [], [], [], [], []
ORA-00600: internal error code, arguments: [KGHLKREM1], [0x838000020], [], [],
[], [], [], [], [], [], [], []

[oracle@skate01 ~]$
[oracle@skate01 ~]$


kill和oracle有关的进程
[oracle@skate01 ~]$ ps -ef |grep $ORACLE_SID|grep -v grep|awk '{print $2}'
1562
1564
1566
1570
1572
1574
1576
1578
1580
1582
1584
1586
1588
1592
1594
1596
3781
3862
3864
3866
3868
10085
10861
12321
12325
12327
12329
12331
12333
12335
12337
12339
12341
25253
25255
25311
29661


[oracle@skate01 ~]$ ps -ef |grep $ORACLE_SID|grep -v grep
oracle    1562     1  0  2011 ?        00:01:38 ora_pmon_skate01
oracle    1564     1  0  2011 ?        00:00:05 ora_psp0_skate01
oracle    1566     1  0  2011 ?        00:00:00 ora_vktm_skate01
oracle    1570     1  0  2011 ?        00:00:00 ora_gen0_skate01
oracle    1572     1  0  2011 ?        00:00:15 ora_diag_skate01
oracle    1574     1  0  2011 ?        00:00:00 ora_dbrm_skate01
oracle    1576     1  0  2011 ?        05:27:59 ora_dia0_skate01
oracle    1578     1  0  2011 ?        00:00:04 ora_mman_skate01
oracle    1580     1 21  2011 ?        14-07:36:04 ora_dbw0_skate01
oracle    1582     1  0  2011 ?        00:04:16 ora_lgwr_skate01
oracle    1584     1  0  2011 ?        00:13:26 ora_ckpt_skate01
oracle    1586     1  0  2011 ?        00:00:38 ora_smon_skate01
oracle    1588     1  0  2011 ?        00:00:00 ora_reco_skate01
oracle    1592     1  0  2011 ?        00:32:15 ora_mmnl_skate01
oracle    1594     1  0  2011 ?        00:00:00 ora_d000_skate01
oracle    1596     1  0  2011 ?        00:00:00 ora_s000_skate01
avahi     3781     1  0  2011 ?        00:00:00 avahi-daemon: registering [skate01.local]
oracle    3862     1  0  2011 ?        01:21:24 ora_arc0_skate01
oracle    3864     1  0  2011 ?        01:20:30 ora_arc1_skate01
oracle    3866     1  0  2011 ?        00:00:19 ora_arc2_skate01
oracle    3868     1  0  2011 ?        01:20:49 ora_arc3_skate01
oracle   10861     1  0 Feb20 ?        00:00:00 ora_mmon_skate01
oracle   12321     1  0  2011 ?        00:00:01 ora_mrp0_skate01
oracle   12325     1  4  2011 ?        3-00:19:33 ora_pr00_skate01
oracle   12327     1  0  2011 ?        02:39:29 ora_pr01_skate01
oracle   12329     1  0  2011 ?        02:21:16 ora_pr02_skate01
oracle   12331     1  0  2011 ?        02:29:30 ora_pr03_skate01
oracle   12333     1  0  2011 ?        02:30:53 ora_pr04_skate01
oracle   12335     1  0  2011 ?        02:34:36 ora_pr05_skate01
oracle   12337     1  0  2011 ?        02:17:54 ora_pr06_skate01
oracle   12339     1  0  2011 ?        02:24:47 ora_pr07_skate01
oracle   12341     1  0  2011 ?        02:22:16 ora_pr08_skate01
oracle   25253     1  1  2011 ?        18:28:18 oracleskate01 (LOCAL=NO)
oracle   25255     1  0  2011 ?        00:00:03 oracleskate01 (LOCAL=NO)
oracle   25311     1  0  2011 ?        00:02:45 oracleskate01 (LOCAL=NO)
oracle   29661     1  0 Jan24 ?        00:00:08 oracleskate01 (LOCAL=NO)


[oracle@skate01 ~]$ ipcs -m | grep oracle | awk '{print $2}'
2818055
[oracle@skate01 ~]$ ps -ef |grep $ORACLE_SID|grep -v grep|awk '{print $2}' | xargs kill -9
kill 3781: Operation not permitted

linux

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn