今天有时间对ORACLE_HOME环境变量进行了如下测试
[oracle@linux ~]$ export ORACLE_HOME=/u/app/oracle//product//db_
[oracle@linux ~]$ sqlplus / as sysdba
SQL*Plus: Release Production on Mon Jun ::
Copyright (c) Oracle All Rights Reserved
Connected to an idle instance
SQL> Disconnected
[oracle@linux ~]$ export ORACLE_HOME=//u/app/oracle/product//db_
[oracle@linux ~]$ sqlplus / as sysdba
SQL*Plus: Release Production on Mon Jun ::
Copyright (c) Oracle All Rights Reserved
Connected to an idle instance
SQL> Disconnected
[oracle@linux ~]$ export ORACLE_HOME=/u/app/oracle/product//db_/
[oracle@linux ~]$ sqlplus / as sysdba
SQL*Plus: Release Production on Mon Jun ::
Copyright (c) Oracle All Rights Reserved
Connected to an idle instance
SQL> Disconnected
[oracle@linux ~]$ export ORACLE_HOME=/u/app/oracle/product//db_
[oracle@linux ~]$ sqlplus / as sysdba
SQL*Plus: Release Production on Mon Jun ::
Copyright (c) Oracle All Rights Reserved
Connected to:
Oracle Database g Enterprise Edition Release Production
With the Partitioning and Data Mining options
SQL>
测试结果显示ORACLE_HOME环境变量中对/符号要求严格不能在该字符串变量的值中出现多余/符号(虽然这样写在linux下是合法的)否则可能引起连接数据库异常对于初学者需要提高警惕