日期:2014-05-16 浏览次数:20545 次
下面用这种方式登录:
$ sqlplus -prelim "/as sysdba" SQL*Plus: Release 11.2.0.1.0 Production on Sat Jul 7 09:34:19 2012 Copyright (c) 1982, 2009, Oracle. All rights reserved. SQL>登录选项-prelim意味着“preliminary connection”,也就是sqlplus登录其实只完成如上步骤的2,并不执行第三个步骤。
SQL> select event,count(*) from v$session; select event,count(*) from v$session * ERROR at line 1: ORA-01012: not logged on Process ID: 0 Session ID: 0 Serial number: 0 SQL> select count(*)from dba_objects; select count(*)from dba_objects * ERROR at line 1: ORA-01012: not logged on Process ID: 0 Session ID: 0 Serial number: 0看到没有,实际上我们没有真正的登录系统,因为没有完成第三个步骤,所以没有建立查询执行所需要的环境。
Hanganalyze: SQL> oradebug setmypid Statement processed. SQL> oradebug unlimit Statement processed. SQL> oradebug hanganalyze 3 Statement processed. Systemstate: SQL> oradebug dump systemstate 266 Statement processed.当然对于大内存的系统,systemstate还是要谨慎,因为很可能出不来结果,而且CPU超高。
SQL> shutdown abort ORACLE instance shut down.