ODP Method OpenWithNewPassword not working [message #659918] |
Fri, 03 February 2017 15:23 |
|
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 #668778 is a reply to message #659940] |
Wed, 14 March 2018 05:39 |
|
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.
|
|
|