0

Can any one help me with this query?

I want to change expiry date for db user to 3 days from current date, but I am not getting the query for the same.

I have installed Oracle Express 11g, it is sqlplus.

2

1 Answer 1

4

First, create a password policy (profile) that captures your time period. Then assign that profile to the user.

CREATE PROFILE SHORT_LIFE_PROFILE LIMIT
    PASSWORD_LIFE_TIME 3 
    PASSWORD_GRACE_TIME 1/24;

ALTER USER rdj7 PROFILE SHORT_LIFE_PROFILE;

The password grace time is the number of days the user receives a "soft warning" saying their password will soon expire. During that period, they can still log in with the old password. After that time runs out, the password has expired and they are done. In this case, I've set that to 1 hour.

See the oracle docs for other parameters you can set in this profile.

1
  • Thank you for u r answer.... I created a profile with life_time =3 and Grace time as 3(tried with 1/24)....but it is not showing warning message regarding password expiry on connecting to DB!
    – Raghav
    Commented Aug 8, 2017 at 8:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.