ORA-01005 error connecting with ODP.Net

前端 未结 3 1009
北恋
北恋 2021-01-20 16:50

I am trying to access an Oracle database (version 10.2.0.4.0) using the following code but an \"ORA-01005: Null password given; logon denied\" exception is raised by the con

3条回答
  •  北恋
    北恋 (楼主)
    2021-01-20 16:57

    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");
    

    Which version of ODP.NET do you use? There are known issues when you connect to a "new" Oracle database with case-sensitive passwords using an "old" ODP.NET provider, see here: https://community.oracle.com/message/2198228

    In order to verify run this command on your database:

    ALTER SYSTEM SET SEC_CASE_SENSITIVE_LOGON = FALSE;
    

提交回复
热议问题