deXter
deXter

Reputation: 354

"ORA-1017: invalid username/password; logon denied" while trying to log in using sys

try
{
  OracleConnection con = new OracleConnection();
  con.ConnectionString = "Data Source=TNSName;User Id=sys;Password=password;DBA Privilege=sysdba;";
  con.Open();
}
catch (Exception ex )
{
  MessageBox.Show(ex.Message);
}

I am trying to create a connection as sysdba but getting the exception:

"ORA-1017: invalid username/password; logon denied"

whereas i am able to log in into the same user using SQLDBX from the same machine.I am also able to create a connection using the same code omitting "DBA Privilege=sysdba" and using a normal user.

Upvotes: 0

Views: 7701

Answers (2)

Mitz
Mitz

Reputation: 561

if you are tring to connect to 11g database with lower version of oracle driver (ie. 10g ODP.NET or lower version) you receive the above error.

because whenever we send the passwords using 10g ODP.NET ,it converts them into all upper cases. The passwords are case-insensitive. click here or here to see the details.

Upvotes: 2

ivan.sim
ivan.sim

Reputation: 9268

Looking at the Oracle 11g docs, I think the DB privilege is case sensitive. So try with:

con.ConnectionString = "Data Source=TNSName;User Id=sys;Password=password;DBA Privilege=SYSDBA;";

assuming that the specified user id and password are correct.

Upvotes: 0

Related Questions