There are scenarios where you database will be in hung state and we won’t be able to connect to the database using sysdba, even to shutdown the instance also.
In that case, we can connect using PRELIM option. This is the backdoor entry to the database. This prelim option
connects to SGA, but it won’t create a session.
--- Connect as sessionless
$ sqlplus -prelim
--- Analyze the hang issue(using oradebug)
SQL> oradebug setmypid
SQL> oradebug hanganalyze 12
-- You can shutdown abort the instance now( As most of the cases, bouncing the db solves the problem).
SQL> Shutdown abort