Auto logon on oracle database with windows authentification

it should be “you have to adjust…”, I don’t know if you hate it :see_no_evil:

I’ve use the “Domainname” too…if you are on a single device you should try to use the machine name like “Domain\JonW” or “Laptop\JonW” (if “JonW” is your windows user).
The prefix is added automatically, check after that sys.user$

Dont forget localhost\username or 127.0.0.1\username may also be an option, but it depends on how the routing on the computer is setup.

Default gateway route doesn’t appear in Routing Table - Windows Client | Microsoft Learn

route | Microsoft Learn
Dos Cmd

Route Print *

Will show the routing table on the local machine. There is also the LMhost file trick
Can’t modify the Hosts or Lmhosts file - Windows Server | Microsoft Learn
TLDR create a lmhost file with your entries in and then copy it over the existing one and then you can redirect traffic to where ever you like, which is why 127.0.0.1 and localhost doesnt always work.

Yes, I did have the user name including the domain name, like laptop-xxx\jonw as part of the username, and it was matching up the OS user with the oracle user fine, but was still giving me the 1017 error.

authentication = (nts) was already in sqlnet.ora

Does it work in sqlplus?
sqlplus.exe /@dbservice

No it doesn’t. If it did I would have gone on to the next step to try logging on from a clarion app, but no point if it fails with sqlplus.

What result do you get at cmd.exe set userdomain? This is the needed domain name…
Did you check user$ entry?

What I did was follow the instructions here:

Audit Failed Login Attempts in Oracle Database (netwrix.com)

I can see the failed login with os_username = laptop-s3bpvr2j\testing, username (the oracle user) as ops$laptop-s3bpvr2j\testing

so oracle is getting to the point where it recognizes that that os_user would be trying to log on as the matching oracle user, but not sure what fools up after that.