ORA-01005 error related to ODP.Net

I am trying to access an Oracle database (version 10.2.0.4.0) using the following code, but the exception "ORA-01005: Null password given; logon denied" is raised, caused by the connection when the open method is called.

var connBuilder = new OracleConnectionStringBuilder(); connBuilder.DataSource = "(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = MyHost.Address)(PORT = ####)) )(CONNECT_DATA =(SERVICE_NAME = MyService)))"; connBuilder.UserID = "validUserId"; connBuilder.Password = "validPassword"; connBuilder.PersistSecurityInfo = true; var connString = connBuilder.ToString(); using (var con = new OracleConnection(connString)) { con.Open(); } 

If I change the username, instead I get the following: "ORA-01017: invalid username / password, registration denial", and this also happens if I change the open call to the connection with con.OpenWithNewPassword("validPassword");

If I try to use an outdated Oracle client, it will cope without problems:

  using (var depCon = new System.Data.OracleClient.OracleConnection ("Data Source=MyHost.Address:####/MyService;Persist Security Info=True; User ID=validUsername;Password=validPassword;Unicode=True")) { depCon.Open(); } 

I would (obviously) like to use the latest Odp.Net drivers, but it seems like it can't get past this problem. Does anyone have any idea?

+2
c # oracle
Aug 03 '15 at 11:06
source share
3 answers

Take a look at this topic for FIPS compliance:

https://community.oracle.com/thread/2557592?start=0&tstart=0

also: Oracle.ManagedDataAccess and ORA-01017: invalid username / password; logon denied

+2
Aug 04 '15 at 17:23
source share

Does it work when you do it like this:

 var connBuilder = new Common.DbConnectionStringBuilder(); connBuilder.Add("Data Source", "(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = MyHost.Address)(PORT = ####)) )(CONNECT_DATA =(SERVICE_NAME = MyService)))"; connBuilder.Add("User Id", "validUserId"); connBuilder.Add("Password", "validPassword"); 

What version of ODP.NET are you using? There are known problems connecting to the "new" Oracle database with case-sensitive passwords using the "old" ODP.NET provider, see here: https://community.oracle.com/message/2198228

To verify the launch of this command in your database:

 ALTER SYSTEM SET SEC_CASE_SENSITIVE_LOGON = FALSE; 
+1
Aug 03 '15 at 11:52
source share

A case with case sensitivity and ODP.Net drivers and various versions of the database should be a simple solution. Attach your password to the connection string in quotation marks ("), for example Password=\"password\"; and this should contain a password case

+1
Mar 21 '16 at 10:22
source share



All Articles