A: 正常情況下
[oracle@hukou admin]$ sqlplus / as sysdba
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance. ---連接到一個空閑的實例,實例未打開,數據庫未啟動
[oracle@hukou admin]$ !sql
sqlplus / as sysdba
Connected to: --連接到Oracle數據庫版本,OLAP聯機事務型數據庫
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
B:非正常 01=> 操作系統SID名稱錯誤或者為空
[oracle@hukou admin]$ export ORACLE_SID=abc
[oracle@hukou admin]$ !sql
Connected to an idle instance.
[oracle@hukou admin]$ ps -ef |grep ora_pmon |grep -v grep
oracle 3382 1 0 12:33 ? 00:00:00 ora_pmon_hukou
---實例明明在,卻連接一個空實例;
[oracle@hukou admin]$ echo $ORACLE_SID
abc
[oracle@hukou admin]$ cat /home/oracle/.bash_profile |grep ORACLE_SID
export ORACLE_SID=hukou
---指明操作系統SID=》 export ORACLE_SID=hukou
非正常2:=> 環境變量指明錯誤: 提示找不到命令
-bash-3.2$ sqlplus / as sydba
-bash: sqlplus: command not found
---測試 修改文件名稱
-bash-3.2$ mv .bash_profile.bak .bash_profile
-bash-3.2$ source .bash_profile --重新修改后,生效
--測試 指明錯誤
[oracle@hukou ~]$ export PATH=$HOME
[oracle@hukou ~]$ !sql
sqlplus / as sydba
-bash: sqlplus: command not found
--刪除軟件目錄,能達到一樣的效果
非正常3:審計文件無法創建報錯,無法以 sysdba身份登錄,具體報錯隨筆 詳細說明;