Sometimes there are tiny little changes in a new release – and sometimes they are not documented very well yet. One of these changes is the new behavior of login.sql for SQL*Plus in Oracle Database 220.127.116.11.
Behavior before Oracle Database 12.2
In all releases until Oracle Database 18.104.22.168 by default SQL*Plus searches for the user profile (login.sql) in your current directory first, and then in the directories you specify with the ORACLE_PATH environment variable.
Please be aware that this change can be introduced with a PSU or a BP from 2017 as well.
Behavior since Oracle Database 12.2
Since Oracle Database 22.214.171.124 SQL*Plus will only search for the user profile (login.sql) in the directories you specify with the ORACLE_PATH environment variable on Linux (or SQLPATH on Windows). That means, you have a login.sql in your working directory – but it will be silently ignored unless you set explicitly ORACLE_PATH or SQLPATH to point to this directory. I’d just blindly guess that the same behavior change applies to SQLcl as well.
Users currently using a login.sql to customize a session will need to set the ORACLE_PATH variable accordingly, and move login.sql to the directory defined in ORACLE_PATH.
If that doesn’t work for you maybe using a prologue for scripts, including it explicitly with @@ calls would be a doable workaround.
On Windows please be aware of (credits to Tim Hall):
- Bug 25804573
SQL PLUS 12.2 NOT OBSERVING SQLPATH IN REGISTRY OR ENV VARIABLE FOR LOGIN.SQL
- MOS Note 2241021.1
SQL*Plus 126.96.36.199.0 Change in Behavior for Search Path of Login.sql
- Franck Pachot (dbi services):
earlier it was easy for us to remember the urls like this.
but now looks like most of you are getting move out, ( like Maria colgan got moved into sqlmaria.com and now you into this new site ) – it is hard to remember the website name these days.
I apologize – and I see your point. Hopefully you’ll remember MikeDietrichDE.com as well as it is my twitter handle 🙂 MikeDietrich.com was open for an offer at roughly $3000 😉 But the blogs.oracle.com will undergo a migration to a more marketing look&feel which is not appropriate for a tech blog. Therefore the move – and I’m just guessing that others will follow.
Is it possible for you to add the notification about a new blog post from this blog to appear under the “Blogs” section of this link. ( like how you do previously with blogs.oracle.com/upgrade, when a new post got published it get reflected in “Blogs” of this OTN link )
that would help us to keep track of new things coming up in this blog.
Hope you would help us on this.
thanks for this hint – but unfortunately I have no influence on this page – and the people owning it will strictly enforce only Oracle-hosted content to be displayed. Furthermore I checked some links and they are pretty outdated. For instance, my “Hitchhiker’s Guide” presentation dates from April 2014 😉
But you can subscribe on the blog directly – see on the main page at https://MikeDietrichDE.com and scroll down a bit on the right side to SUBSCRIBE. That should work pretty straight forward – and you will ONLY notified when a new post gets published.
We just completed an upgrade to 12.2 (from 12.1) and ran into a strange problem.
With sec_case_sensitive_logon=TRUE (the default), the password sensitivity must match. I created a test user naveen with password Naveen, and it gives an error when I login as naveen/naveen. Which is expected.
Next I changed sec_case_sensitive_logon=FALSE and now I cannot login as user naveen. I tried both naveen/Naveen and naveen/naveen and in both cases I get ORA-01017: invalid username/password; logon denied.
Not sure what is going on here??
the secret is first the SQLNET.ALLOWED_LOGON_VERSION_SERVER in your sqlnet.ora – it defaults to 12, and in order to have this working you will have to lower it to 11 and potentially restart the listener. Furthermore you will have to ALTER the user, e.g. ALTER USER naveen identified by Naveen;. Once you do that you can connect now with naveen/naveen or naveen/NAVEEN etc.
Is it applicable in 19c Env as well? I have a customer who has this issue 19c client: SQL*PLUS does not consistently load the login.sql file from the SQLPATH. They are on 188.8.131.52.0
As far as I know, yes.
I am in 19.15 at linux and also met that issue. The suggested workaround/solution doesn’t work…
Could you please detail the idea of “If that doesn’t work for you maybe using a prologue for scripts, including it explicitly with @@ calls would be a doable workaround.” ?
please check with Oracle Support if the proposed w/a does not work for you.