I have noticed strange interaction between ORACLE_HOME and parameter substitution.
Here is my test.sql
prompt &1
prompt &2
prompt &3
prompt &4
exit
The expected behavior:
C:\cygwin64\home\rejap\subst>sqlplus /nolog @test.sql one two three four five
SQL*Plus: Release 12.2.0.1.0 Production on Sun Jun 16 15:19:16 2019
Copyright (c) 1982, 2017, Oracle. All rights reserved.
one
two
three
four
C:\cygwin64\home\rejap\subst>
however, when ORACLE_HOME is set, things get interesting
C:\cygwin64\home\rejap\subst>set ORACLE_HOME=c:\Program Files (x86)\Oracle\product\12.2.0\client_1
C:\cygwin64\home\rejap\subst>sqlplus /nolog @test.sql one two three four five
SQL*Plus: Release 12.2.0.1.0 Production on Sun Jun 16 15:21:25 2019
Copyright (c) 1982, 2017, Oracle. All rights reserved.
Files
(x86)\Oracle\product\12.2.0\client_1\sqlplus\admin\glogin.sql
three
four
C:\cygwin64\home\rejap\subst>
Am I missing something fundamental here?
Are there any negative effects of not setting ORACLE_HOME at all?
Are there any negative effects of pointing ORACLE_HOME to symlink?
c:
cd \
mklink /D oracle c:\Program Files (x86)\Oracle
set ORACLE_HOME=c:\oracle\product\12.2.0\client_1
And of course I am interested in explanation of what is going on.
c:\Program Files (x86)\Oracle
? Usually the Oracle installer does not permit it. Otherwise you may usec:\PROGRA~2\Oracle
– Wernfried Domscheit Jun 17 '19 at 11:06Error 6 initializing SQL*Plus SP2-0667: Message file sp1<lang>.msb not found SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
– Pawel Jasinski Jun 19 '19 at 21:36c:\Program Files (x86)\...
is a creation of someone from IT department. You are right, the universal installer does not permit it by default. – Pawel Jasinski Jun 21 '19 at 10:19