Home » Infrastructure » Windows » ODP Method OpenWithNewPassword not working (ODP 12c Release 4 on Microsoft Windows 10 Professional)
ODP Method OpenWithNewPassword not working [message #659918] Fri, 03 February 2017 15:23 Go to next message
mabelair
Messages: 4
Registered: February 2017
Junior Member
I am trying to change an Expired Oracle password using the ODP.Net method OpenWithNewPassword in C# under Visual Studio 2015. I have created a connection string where I supply the current Password in Password= and when I execute the OracleConnection.Open() method I catch the "Password has Expired!" exception and then try to run the OpenWithNewPassword method supplying the new password as the only parameter. Even though I know that the OracleConnection is in the Closed state and the existing password is correct, I always get "ORA-01017: invalid username/password; login denied". I'm assuming that error is referring to the existing password being incorrect. Anyone have any ideas what's up?

Thanks,

Mike
Re: ODP Method OpenWithNewPassword not working [message #659919 is a reply to message #659918] Fri, 03 February 2017 15:54 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
Welcome to this forum

Please read and follow the forum guidelines, to enable us to help you:
OraFAQ Forum Guide
How to use {code} tags and make your code easier to read

ORA-01017 says what it means & means what it says.
I have never seen where ORA-01017 was incorrectly thrown.

Starting with V11, Oracle passwords are CaSeSenSitiVe
Re: ODP Method OpenWithNewPassword not working [message #659920 is a reply to message #659918] Sat, 04 February 2017 01:06 Go to previous messageGo to next message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Quote:
I'm assuming that error is referring to the existing password being incorrect.
Or account name.

Re: ODP Method OpenWithNewPassword not working [message #659921 is a reply to message #659920] Sat, 04 February 2017 09:10 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Mind letter case; passWORD <> password.

[EDIT] Ah, sorry, BlackSwan, I'm repeating what you've already said.

[Updated on: Sat, 04 February 2017 16:32]

Report message to a moderator

Re: ODP Method OpenWithNewPassword not working [message #659936 is a reply to message #659921] Sun, 05 February 2017 20:20 Go to previous messageGo to next message
mabelair
Messages: 4
Registered: February 2017
Junior Member
Say what you want, but I can use the exact same Connection string to connect and run multiple queries without issue (if I have my DBA unexpired my account). Once I have the DBA mark the account as Expired I use the exact same connection string ( complete with hard-coded username and password - same as before that worked) and I catch the exception that tells me that my password has expired and then, without fail, I get the ORA-01017 when I issue the OpenWithNewPassword method. I'm 99.99999999999999% sure this is a bug. Have any of you actually run this method in Visual C# on an account that is expired???????

Thanks,

Mike
Re: ODP Method OpenWithNewPassword not working [message #659937 is a reply to message #659936] Sun, 05 February 2017 21:51 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
mabelair wrote on Sun, 05 February 2017 18:20

I'm 99.99999999999999% sure this is a bug.

So proceed to submit Bug Report, because nobody here can change how Oracle responds for you.
Re: ODP Method OpenWithNewPassword not working [message #659938 is a reply to message #659937] Sun, 05 February 2017 21:55 Go to previous messageGo to next message
mabelair
Messages: 4
Registered: February 2017
Junior Member
Ok, I will! I was just hoping that someone might have tried this or would be willing to.

Thanks,

Mike
Re: ODP Method OpenWithNewPassword not working [message #659939 is a reply to message #659938] Sun, 05 February 2017 22:23 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
BTW - We have NO idea what version or Edition of Oracle DB that you have.
It may be a bug that is already fixed in a later version.

Thanks for not reading the Posting Guidelines or ignoring them.
Re: ODP Method OpenWithNewPassword not working [message #659940 is a reply to message #659939] Sun, 05 February 2017 22:50 Go to previous messageGo to next message
mabelair
Messages: 4
Registered: February 2017
Junior Member
BlackSwan,

Sorry, I am using the latest version of the ODP.NET library for C#.Net, 12c Release 4. I am running the Community version of Visual Studio 2015 with all current patches applied. My version of Windows is 10 professional Anniversary addition with all current patches applied. I have tried the same call in the last 4 versions of the ODP.Net library with the same results. The database I am connecting to is an Oracle 12c database with all current patches applied. I am asking if any of you have tried this call with an expired account and had it work anywhere on any version at any time. If so I'd love to know the version of the library you are using.

Thanks,

Mike
Re: ODP Method OpenWithNewPassword not working [message #668778 is a reply to message #659940] Wed, 14 March 2018 05:39 Go to previous message
David_L
Messages: 3
Registered: March 2018
Junior Member
I know this problem from the normal Oracle client. Here the change expired password doesn`t work with certain combinations of Oracle client and Oracle Server. We see this problem for years and with several combinations of client and server. It seems that it allways fails when the Oracle client has a lower version than the server, but there is no strict rule to reproduce... but if the combination is odd it never works.

Now with the managerd odp for .NET I was hoping this problem is solved for all times. But I tried to implement the functionality this morning and I ran into the same issue discussed in this thread... unfortunately there is no solution and no final answer from Oracle.

Problme is: Connection.Open works for all users (connection string is ok). When password is expired Connection.Open throws an Exception with ORA-28001. Then I call Connection.OpenWithNewPassword (with the same connection string) and this ALLWAYS throws an exception with ORA-01017! -> NO SOLUTION

The calls stack of the exception shows that the client seems to try to change the password and oracle server has a problem (same like in old oci times):

System.Reflection.TargetInvocationException: Ein Aufrufziel hat einen Ausnahmefehler verursacht. ---> Oracle.ManagedDataAccess.Client.OracleException: ORA-01017: Benutzername/Kennwort ungültig; Anmeldung abgelehnt
bei OracleInternal.ConnectionPool.PoolManager`3.CreateNewPR(Int32 reqCount, Boolean bForPoolPopulation, ConnectionString csWithDiffOrNewPwd, CriteriaCtx criteriaCtx, String instanceName, List`1 switchFailedInstNames)
bei OracleInternal.ConnectionPool.PoolManager`3.GetUsingDiffPassword(ConnectionString csWithDiffOrNewPwd, CriteriaCtx criteriaCtx)
bei OracleInternal.ConnectionPool.OraclePoolManager.GetUsingDiffPassword(ConnectionString csWithDiffPassword, CriteriaCtx criteriaCtx)
bei OracleInternal.ConnectionPool.OracleConnectionDispenser`3.Get(ConnectionString cs, PM conPM, ConnectionString pmCS, SecureString securedPassword, SecureString securedProxyPassword, CriteriaCtx criteriaCtx)
bei Oracle.ManagedDataAccess.Client.OracleConnection.Open()
bei Oracle.ManagedDataAccess.Client.OracleConnection.OpenWithNewPassword(String newPassword)
--- Ende der internen Ausnahmestapelüberwachung ---
bei System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
bei System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
bei System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
bei System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
bei CreateCtrl.NH.Service.Base.RealDbUserLogin(String userName, String password, String newPassword)

I use the latest Oracle.ManagedDataAccess V4.122.1.0 (runtime version v4.0.30319). I have several customer databases which i have to access and i have no influence on the version installed. There are several servers with V11 and V12 in diferent versions.
Previous Topic: ora-01031: insufficient Privileges
Next Topic: ManagedDataAccess Method OpenWithNewPassword not working
Goto Forum:
  


Current Time: Thu Mar 28 05:29:44 CDT 2024