解决oracle之ORA-01075: you are currently logged on

####################

 

1.问题如下:

[oracle@xxx ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Fri Apr 7 08:20:33 2023

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

ERROR:
ORA-01075: you are currently logged on


Enter user-name: ^C
[oracle@xxx ~]$
[oracle@xxx ~]$
[oracle@xxx ~]$
[oracle@xxx ~]$ sqlplus / as sysdba\
> ^C

 

2.使用ipcs和ipcsrm命令释放oracle占用的共享内存

[root@xxx tmp]# ipcs -m | grep oracle | awk '{print $2}' | xargs ipcrm shm
resource(s) deleted
[root@xxx tmp]#

 

若oracle进程没有被kill的话,就先kill掉

# 使用Linux的kill命令杀死所有与oracle有关的进程
[root@xxx tmp]# ps -ef |grep $ORACLE_SID|grep -v grep|awk '{print $2}' | xargs kill -9

 

 

3.再次登录,成功

[oracle@xxx ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Fri Apr 7 08:22:15 2023

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

Connected to an idle instance.

SQL>

 

 

 

 

 

 

 

 

 

 

####################

posted @ 2023-04-07 08:29  igoodful  阅读(911)  评论(0编辑  收藏  举报