I have to question Oracle’s quality control sometimes. Back in the 90’s I remember being shipped an Oracle RDBMS CD that wouldn’t install in the user specified directory. Now we have 12cR2 that won’t run the login.sql in the SQLPATH, which was obvious immediately. At first I wondered if it was intentional, but it seemed such a daft thing to introduce.
Doc 2241021.1 says
From 188.8.131.52.0, SQL*Plus will only search for the User Profile in the directories you specify with the ORACLE_PATH environment variable on Linux and SQLPATH on Windows.
Okay, so it was intentional on Linux, but unintentional on Windows. Why try to make the behaviour different between Windows and Linux?!
There is a hidden bug for %SQLPATH%\login.sql being ignored on Windows.
Bug 25804573 : SQL PLUS 12.2 NOT OBSERVING SQLPATH IN REGISTRY OR ENV VARIABLE FOR LOGIN.SQL.
The patch is now available.
Alternatively, one can work around it by specifying the login.sql explicitly, (ideally in a script eg S+.BAT), ie:
sqlplus / as sysdba @login