sqlplus, command line parameters and ORACLE_HOME with spaces I have noticed strange interaction between ORACLE_HOME and parameter substitution.
Here is my test.sql

prompt &amp;1
prompt &amp;2
prompt &amp;3
prompt &amp;4
exit


The expected behavior:

C:\cygwin64\home\rejap\subst&gt;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&gt;


however, when ORACLE_HOME is set, things get interesting

C:\cygwin64\home\rejap\subst&gt;set ORACLE_HOME=c:\Program Files (x86)\Oracle\product\12.2.0\client_1

C:\cygwin64\home\rejap\subst&gt;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&gt;


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.
sqlplus and many other programs do not require ORACLE_HOME to be set.

In this documentation 9.2 Oracle states:


  Oracle Corporation recommends that you never set the ORACLE_HOME
  environment variable, because it is not required for Oracle products
  to function properly. If you set the ORACLE_HOME environment variable,
  then Oracle Universal Installer will unset it for you.


I did not find similar statement for never releases of Oracle, so it might be outdated. Newer installation guides for Windows do not mention ORACLE_HOME environment variable at all, so most likely it is really not needed.