- 3,716,003 Users
- 2,242,928 Discussions
- 7,845,734 Comments
Forum Stats
Discussions
Categories
- 17 Data
- 362.2K Big Data Appliance
- 7 Data Science
- 1.6K Databases
- 476 General Database Discussions
- 3.7K Java and JavaScript in the Database
- 22 Multilingual Engine
- 487 MySQL Community Space
- 5 NoSQL Database
- 7.6K Oracle Database Express Edition (XE)
- 2.8K ORDS, SODA & JSON in the Database
- 417 SQLcl
- 42 SQL Developer Data Modeler
- 184.9K SQL & PL/SQL
- 21K SQL Developer
- 1.9K Development
- 3 Developer Projects
- 32 Programming Languages
- 135.1K Development Tools
- 9 DevOps
- 3K QA/Testing
- 256 Java
- 6 Java Learning Subscription
- 10 Database Connectivity
- 67 Java Community Process
- 1 Java 25
- 9 Java APIs
- 141.1K Java Development Tools
- 6 Java EE (Java Enterprise Edition)
- 153K Java Essentials
- 135 Java 8 Questions
- 86.2K Java Programming
- 270 Java Lambda MOOC
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 10 Java SE
- 13.8K Java Security
- 3 Java User Groups
- 22 JavaScript - Nashorn
- 18 Programs
- 125 LiveLabs
- 30 Workshops
- 9 Software
- 3 Berkeley DB Family
- 3.5K JHeadstart
- 5.7K Other Languages
- 2.3K Chinese
- 3 Deutsche Oracle Community
- 11 Español
- 1.9K Japanese
- 2 Portuguese
ORA-01017: invalid username/password; logon denied when trying to connect via ODP.NET (Oracle.Manage
Following code throws: ORA-01017: invalid username/password; logon denied
<span class="pln" style="font-style: inherit; font-weight: inherit; font-family: inherit; color: #303336;">string constr </span><span class="pun" style="font-style: inherit; font-weight: inherit; font-family: inherit; color: #303336;">=</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-family: inherit; color: #303336;"> </span><span class="str" style="font-style: inherit; font-weight: inherit; font-family: inherit; color: #7d2727;">"User Id=Name;Password=Password;Data Source=server:1521/service"</span><span class="pun" style="font-style: inherit; font-weight: inherit; font-family: inherit; color: #303336;">;</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-family: inherit; color: #303336;"><br/>OracleConnection con </span><span class="pun" style="font-style: inherit; font-weight: inherit; font-family: inherit; color: #303336;">=</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-family: inherit; color: #303336;"> new OracleConnection</span><span class="pun" style="font-style: inherit; font-weight: inherit; font-family: inherit; color: #303336;">(</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-family: inherit; color: #303336;">constr</span><span class="pun" style="font-style: inherit; font-weight: inherit; font-family: inherit; color: #303336;">);</span><span class="pln" style="font-style: inherit; font-weight: inherit; font-family: inherit; color: #303336;"><br/>con</span><span class="pun" style="font-style: inherit; font-weight: inherit; font-family: inherit; color: #303336;">.</span><span class="kwd" style="font-style: inherit; font-weight: inherit; font-family: inherit; color: #101094;">Open</span><span class="pun" style="font-style: inherit; font-weight: inherit; font-family: inherit; color: #303336;">();</span>
SQL Developer, DBeaver connects without problems.
A connection by the deprecated "System.Data.OracleClient" namespace works also without problems.
FIPS is disabled.
System:
- Oracle Server 11g (11.2.0.3.0)
- Oracle.ManagedDataAccess 19.6.0
- .Net Framework 4.8
- Windows 10 1909
I would be very thankful for any help!
Answers
-
Are there any special characters in your password? If so, check if you need to use an escape character for the .NET string.
-
Thanks, for your answer, but my password only contains ASCII characters (lowercase letters and numbers).
-
The only thing that stands out is that you are using 11.2.0.3, which is no longer supported and ODP.NET 19.6 wasn't tested with. 11.2.0.4 is what is certified and tested. However, I'm not aware of anything with password authentication changing between 11.2.0.3 and 11.2.0.4.
At this point, I usually ask customers to share their ODP.NET trace (level 7) and DB server side trace (level 16). That will provide more info on why the error is occurring. If nothing comes of that, we would look at your login details and DB setup details and perhaps recreate your setup to see if we could reproduce. It's up to you if you'd like to share on these on the forum. Most customers opt to open a service request.
Something else you could try is to log in with another user's credentials and even another DB instance. That will help identify whether it's something with the app or something specific to the user credentials.
-
I've tested ODP.net connecting with Oracle XE 18c -> works fine.
I tested ODP.net connecting with an other production Oracle 19c -> also works fine.
I tested all ODP.net versions, available on NuGet connecting to Oracle 11.2.0.3 -> NOT working.
It seems, it is really the version Oracle 11.2.0.3 in combination with each version of ODP.net, which does not work.
Could you please test and verify, if you can connect to version 11.2.0.3 via ODP.net.
A version update would be a very large effort for us.
-
If I tested with 11.2.0.3 and verified your error, it would not change the fact the recommendation would be to upgrade or patch your DB server.
If it's possible for you to downgrade your managed ODP.NET version to 18c or 12.2, it's much more likely one of those works with DB 11.2.0.3.
-
I'm not able to upgrade the DB server - others depend on the version.
I've already tried ALL managed ODP.NET versions from NuGet (12.1.12 ... 19.6.0) without success.
-
If the base managed ODP.NET 12.2 version doesn't work with DB 11.2.0.3, then the only other solution I can think of is to use unmanaged ODP.NET 11.2.
-
4190195 wrote:I'm not able to upgrade the DB server - others depend on the version.
I've already tried ALL managed ODP.NET versions from NuGet (12.1.12 ... 19.6.0) without success.Can you share the sqlnet.ora parameters used by the DB and the client. Can you also check what password version is used for this user by checking dba_users in the DB. Are you able to test with a new user or another database to confirm that the problem is not just in your syntax or genuinely using the wrong password