时间:2021-07-01 10:21:17 帮助过:58人阅读
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身份登录,具体报错随笔 详细说明;
SQL*Plus工具使用 sqlplus / as sysdba登录
标签:with 变量 报错 文件名 database erp sys app connect