Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

OCI_SUCCESS_WITH_INFO: ORA-28002: the password will expire

ddevienneMay 23 2008 — edited Jun 10 2008
When I use SQL*Plus, connecting to a user whose password has expired and entered the grace period (11g), I get an error message but the connect is still successful:
SQL> connect lob_demo
Enter password:
ERROR:
ORA-28002: the password will expire within 7 days


Connected.
SQL> select SYS_CONTEXT('USERENV', 'SESSION_USER') whoami from dual;

WHOAMI
---------------------------------------------------------------------

LOB_DEMO
On the other hand, in my OCI code doing a OCILogon2, if I connect to this same user, I get an OCI_SUCCESS_WITH_INFO with the same error, but if I continue, the OCISvcCtx* I got seems to be invalid (even though it's not null), since trying to do a OCIAttrGet on it gives me an OCI_INVALID_HANDLE error.

So how come SQL*Plus can connect OK, when I get a bad handle? Shall I be attempting to connect a different way?

A related question would be to know if it's possible to prompt the user to enter a new password if it has expired, and how to send that to the server?

Thanks, --DD
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 8 2008
Added on May 23 2008
4 comments
9,019 views