DB startup failed with error: ORA-01012: not logged on
Background:
==============
Database is taking more time to stop say almost one hour and its hung so killed background process using below command
$ kill -9 <PID>
OR
$kill -9 -1
Problem:
==========
Now while starting the DB instance.
$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Tue Sep 25 07:23:45 2018
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected.
SQL> startup
ORA-01012: not logged on
SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup
ORA-01012: not logged on
So whenever we forcefully shut down the DB this issue may occurs
“SYSRESV” shows a shared memory segment for a non-existing instance
Solution:
=======
At OS level remove the orphaned shared memory segment using this utility
$ sysresv
IPC Resources for ORACLE_SID “SID” :
Shared Memory:
ID KEY
11345673 0xffffffff
46 0xffffffff
59 0x6767020c
Oracle Instance not alive for sid “SID”
$ ipcrm -m 11345673
$ ipcrm -m 46
$ ipcrm -m 59
Now tried to start DB
$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Tue Sep 25 07:29:17 2018
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 7482626048 bytes
Fixed Size 2236048 bytes
Variable Size 3271557488 bytes
Database Buffers 4194304000 bytes
Redo Buffers 14528512 bytes
Database mounted.
Database opened.
SQL>