Search This Blog

Total Pageviews

Saturday 14 December 2013

How to use prelim option in sqlplus....

How to use prelim option in sqlplus....  


what is sqlplus -prelim : This is the backdoor entry method to access database (only SGA) in a hung situation 
 where no other methods are allowing to create new sessions in database.
 This will not create any session in DB rather connect to SGA directly ...

1) 

   sqlplus -prelim / as sysdba
   sqlplus system/mypass -prelim /nolog 

2) 

SQL> set _prelim on
SQL> conn / as sysdba
Prelim connection established

SQL> oradebug setmypid
Statement processed.

SQL> oradebug unlimit
Statement processed.

SQL> oradebug dump hanganalyze 1
Statement processed.

SQL> oradebug dump systemstate 10
Statement processed.

SQL> oradebug tracefile_name
/oracle/admin/diag/rdbms/demo11g/demo11g/trace/demo11g_ora_25010.trc


sqlplus -prelim / as sysdba
oradebug setmypid
oradebug unlimit;
oradebug dump systemstate 10


Note: 215858.1 – "Interpreting HANGANALYZE trace files to diagnose hanging and performance problems"

Note: 310830.1 – "How to Use Oradebug to Get Trace File Name and Location"

Note: 417879.1 – "-prelim Option When Running System State Dump"

1 comment:

Anuj Singh said...

sqlplus -prelim / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Sat Mar 19 17:36:37 2016

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

SQL> shutdown immediate ;
ORA-01012: not logged on


SQL> shutdown abort ; <<<<<<< only abort option valid
ORACLE instance shut down.

Oracle DBA

anuj blog Archive