Set oracle password expiration for user / grace period

I have an application that stores data in an Oracle 11g Express Edition database. When the Oracle user password begins to expire (grace period entry), the application throws an exception (ORA-28002) and simply stops working. I need to find a way to save the application during this period and inform the administrator about it so that the password can be changed before it expires.

However, my real problem is that I need to install the database user during this grace period so that I can program and test my application and see if my code works. I tried to change the expiration date in dba_users, but I do not have the necessary rights to do this. I'm not even sure if this is the right approach.

What can I do to make the database server think that my user account will end soon, so I can write code to handle this event?

+1
source share
3 answers

. . ( , , )

, , ( ), - , .

DBA, , .

dba_users, . , .

, DBA_USERS. PASSWORD_GRACE_TIME DEFAULT, "ALTER PROFILE". ALTER PROFILE. , DBA .

+3

USER_USERS

, .

+2

: - DEFAULT EXPIREPROFILE. :

ALTER PROFILE EXPIREPROFILE LIMIT PASSWORD_LIFE_TIME 1;
ALTER PROFILE EXPIREPROFILE LIMIT PASSWORD_GRACE_TIME 21;

I have expired my account and changed my password. When I looked at dba_users, the password expired tomorrow. But after that, the bill did not expire immediately, he entered the grace period of 21 days.

Now I can write code to handle this particular situation and test it. Thank you all for your help :)

0
source

Source: https://habr.com/ru/post/1671686/


All Articles