0

I have Oracle XE running in a container, in which I can connect using the command:

podman exec -it oracle-container_oracle-db_1 sqlplus sap/sap@//localhost:1521/xepdb1

or simply (without specifying the host):

podman exec -it oracle-container_oracle-db_1 sqlplus sap/sap@xepdb1

In both cases, I am logged in to SQLPLUS and can execute queries.

Now I have the following Blazor App (Server Side, .Net Core 8.0) using Oracle.ManagedDataAccess.Core nugget package:

//var _connectionString = "DATA SOURCE=127.0.0.1:1521/XEPDB1;USER ID=SAP;PASSWORD=SAP;";
var _connectionString = "DATA SOURCE=localhost:1521/XEPDB1;USER ID=SAP;PASSWORD=SAP;";
var con = new OracleConnection(_connectionString);

con.Open();   // Oracle.ManagedDataAccess.Client.OracleException: 
              // 'ORA-01017: invalid username/password; logon denied
              // https://docs.oracle.com/error-help/db/ora-01017/'

For some reason, the connection is refused. I can't understand what is the cause of such error. I already confirmed that the database can be connected to using VS Code extension:

Oracle Extension Works fine

Test is successful

I also tried to connect to the database using IP address 127.0.0.1 instead of localhost, but that didn't work.

am I using the wrong Oracle data access provider?

3
  • 2
    Oracle usernames and passwords are case-sensitive. Please make sure you are using correct case in connection string Commented Oct 30 at 5:58
  • 1
    I have been working with Oracle 11 and earlier versions, and the assumption was: it was not case sensitive. I am not sure when Oracle decided to change that. Anyways, it turned out that the username password had to be lowercase. Thanks @SainPradeep Commented Oct 30 at 6:14
  • I think it was introduced in Oracle 10 but as long as password does not change, it remains case-insensitive Commented Oct 30 at 14:00

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.