Home » Other » Client Tools » login.sql not running automatically?! Win10
login.sql not running automatically?! Win10 [message #662077] Mon, 17 April 2017 09:52 Go to next message
GusGF
Messages: 10
Registered: July 2015
Location: UK
Junior Member
I've setup the registry entry SQLPATH in Win10 with the directory containing my scripts. I've pasted the directory location in the registry into file explorer and the correct location is opened up!

But when I open up a command prompt and start a SQLPlus session the login.sql script doesn't automatically run.
C:\Users\username>sqlplus codd/codd@orcl

When I explicitly run the login script within the session above it runs fine!
@login

So why doesn't it run when I call SQLPlus?
Re: login.sql not running automatically?! Win10 [message #662078 is a reply to message #662077] Mon, 17 April 2017 10:48 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
Did you open a new session after the changes were made?
Re: login.sql not running automatically?! Win10 [message #662081 is a reply to message #662077] Mon, 17 April 2017 12:38 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Which version of SQL*Plus?
I never saw it not working from version 8.0 (I didn't remember if this key existed in version 7) to 12.1 and from Windows NT 3.51 to Windows 7, so I tend to think you did something wrong.
Did you modify the key before or after starting SQL*Plus?
Did you modify the key before or after starting the DOS box if you are running in DOS mode?

[Updated on: Mon, 17 April 2017 13:33]

Report message to a moderator

Re: login.sql not running automatically?! Win10 [message #662083 is a reply to message #662077] Mon, 17 April 2017 13:16 Go to previous messageGo to next message
thatjeffsmith
Messages: 81
Registered: July 2009
Location: Raleigh, NC
Member

is this 12cR2 version of SQL*Plus?
Re: login.sql not running automatically?! Win10 [message #662156 is a reply to message #662083] Wed, 19 April 2017 04:24 Go to previous messageGo to next message
GusGF
Messages: 10
Registered: July 2015
Location: UK
Junior Member
The version of SQLPlus is 12.2.0

I modified the key and started a new sqlplus session via the Win10 command prompt and also tried sqlplus.

I'm running Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

As for me doing something wrong, quite likely but what?

What I don't understand is I can call the login.sql script from the console and it runs so why it doesn't run when a new sqlplus session starts I can't figure out.
Re: login.sql not running automatically?! Win10 [message #662166 is a reply to message #662156] Wed, 19 April 2017 10:02 Go to previous messageGo to next message
thatjeffsmith
Messages: 81
Registered: July 2009
Location: Raleigh, NC
Member

Because Security
Re: login.sql not running automatically?! Win10 [message #662236 is a reply to message #662166] Fri, 21 April 2017 02:43 Go to previous message
GusGF
Messages: 10
Registered: July 2015
Location: UK
Junior Member
Okay thanks for making me aware of this as I'm on Windows10

Quote:
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

[Updated on: Fri, 21 April 2017 06:12]

Report message to a moderator

Previous Topic: Create XML from Master Detail
Next Topic: SQL Developer
Goto Forum:
  


Current Time: Thu Mar 28 12:11:18 CDT 2024