0

I am using Visual studio 2019 and the .Net framework 4.5, I am trying to read an old database made with Oracle 9i but it does not work. I used two libraries

  • Oracle.ManagedDataAccess:

I receive an error which says "ORA-01017: invalid username / password; logon denied" indeed I tried all the solutions already announced: Desable Fips, Install ODAC but it does not work.

  • Oracle.DataAccess.dll :

I receive an error message that says "this provider is not longer supported"

Below the used code:

oracleConnection = new OracleConnection();
    try 
    {
        oracleConnection = new OracleConnection(connectionString);
        oracleConnection .Open();
    }
    catch (Exception ex)
    {
        
    }

Thanks for your help

Emanuele
  • 648
  • 12
  • 33
devjelop anje
  • 169
  • 1
  • 8

2 Answers2

0

I receive an error which says "ORA-01017: invalid username / password; logon denied" indeed I tried all the solutions already announced: Desable Fips, Install ODAC but it does not work.

You are connected to the database. If you were not then you would not get an Oracle error message.

To be able to login, you need to follow the instructions in the error message and provide a valid username / password combination. If you do not know the correct username / password then talk to the DBA and get the correct credentials or, if you are the DBA, then login as a SYSDBA user and change the password.

MT0
  • 143,790
  • 11
  • 59
  • 117
  • The login and password are correct, I tested the connection with those credentials under xp and the connection is established, now under windows 10 and with visual studio 2019, it does not work – devjelop anje Nov 05 '21 at 10:57
  • 1
    @devjelopanje You connected to an Oracle database otherwise you would not have got the error. Next step would be to check that you connected to the correct database on the correct server; if you are connected to a different database or a different server then it would not be surprising that the username/password is not correct. – MT0 Nov 05 '21 at 11:16
  • Your idea seems logical but remember that with toad and Oracle .Net manager I connect properly with these credentials to the specefic database – devjelop anje Nov 05 '21 at 11:26
  • I tested the code with Oracle.DataAccess.dll in a console application and it was connected but when i use Oracle.DataAccess.dll in asp.net application, this generate an error: Could not load file or assembly 'Oracle.DataAccess' or one of its dependencies. Attempt to load an incorrectly formatted program. – devjelop anje Nov 05 '21 at 13:37
0

After investigation, the problem is resolved.

It seems that Oracle.ManagedDataAccess does not work well with Oracle 9i and we receive the message "ORA-01017: invalid username / password; logon denied".

Using Oracle.DataAccess.dll, the connection is perfectly established.

If with Oracle.DataAccess.dll we get an error that says "Could not load file or assembly 'Oracle.DataAccess' or one of its dependencies. Attempt to load an incorrectly formatted program", then try to run IIsExpress under 64bits mode as described here

thanks for help

devjelop anje
  • 169
  • 1
  • 8