How To Change An Account Password Even If It Has Expired
(Doc ID 743402.1)
Last updated on MARCH 04, 2022
Applies to:Oracle Database - Enterprise Edition - Version 126.96.36.199 and later
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Cloud Exadata Service - Version N/A and later
Information in this document applies to any platform.
This sample code uses OCIPasswordChange to change the schema password. For demonstration purposes, it is coded such that it connects to the local instance and hard codes the user and password information. Modification to connect to a remote instance using SQLNET and/or passing in the connection information is left for the reader.
This note is different from <Note:139748.1> which uses OCILogon and thus it can't be used to change the password once it expires. This code has been tested to work even when the password has expired.
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!
In this Document