Why ?
For
certain reason you may need to update the password record for the Oracle user ,
for example if the user will be expired soon and you want to update the
expiration period by change the password however you may want to keep the same
password and you don’t know the password as well, in this case if you run
Oracle 11g and more you can use the below query to get the alter and use the
hash value as input thus the same old password will be kept however Oracle will
update all dependencies like you enter a new password , that is mean expiration
and graceful period all will be updated..
How ?
Below
is scripts I used to generated all user under graceful message and update their
password to same current password (no change) , you may change the where ( like
) with any situation that you may need to list,:
select
'alter user ' || su.name ||
' identified by values'
|| ' ''' || spare4 || ';' || su.password || ''';'
from sys.user$ su
join dba_users du on
ACCOUNT_STATUS like 'EXPIRED(GRACE)%' and su.name = du.username;
No comments:
Post a Comment