With Oracle SQL Developer I can put / -character to Username and leave password empty and I get connected. I have OP$MYWINDOWSUSERNAME user created in database.
EDIT: SQL Developer does not work if I check OS Authentication-checkbox (empties and disables username + pwd). Moreover Preferences->Database->Advanced->Use Oracle Client is unchecked so I guess what SQL Developer does or doesn't has very little to do with my System.Data.OracleClient.OracleConnection problem.
However when I try to form connection string like this:
string.Format("Data Source={0}; user id=/;password=;Integrated Security=yes", dbName);
I get ORA-01017: invalid username/password: logon denied
with
string.Format("Data Source={0}; user id=/;password=;Integrated Security=no", dbName);
I get ORA-01005.
With
string.Format("Data Source={0};Integrated Security=yes", dbName);
I get ORA-01017: invalid username/password: logon denied
With
string.Format("Data Source={0}; user id=/;", dbName);
I get ORA-01005
With
string.Format("Data Source={0};User Id=/;Integrated Security=yes;", dbName);
I get ORA-01017
Both OracleConnection in my program and Oracle SQL Developer work when I specify Username and password.
EDIT: This works with
string.Format("Data Source={0};Integrated Security=yes", dbName);
when sqlnet.ora line
SQLNET.AUTHENTICATION_SERVICES= (NTS)
is changed to
SQLNET.AUTHENTICATION_SERVICES= (NONE)
If somebody writes short answer what is happening and why, i'm happy to grant bounty to him/her.
The Windows native authentication adapter (automatically installed with Oracle Net Services) enables database user authentication through Windows. This enables client computers to make secure connections to Oracle Database on a Windows server. The server then permits the user to perform database actions on the server.
In short, it's the Windows native operating system authentication which is indicated by NTS.
Once NTS is specified, oracle client identifies the username as workgroup\username or domain\username which does not match your OP$MYWINDOWSUSERNAME database user
In order to have it working with NTS option, you need to include domain/workgroup name in your db username:
CREATE USER "OPS$<DOMAIN_NAME>\<OS_USERNAME>" IDENTIFIED EXTERNALLY;
oracle support document 750436.1 confirms this with detailed steps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With