Skip to content

Instantly share code, notes, and snippets.

@uilian
Created August 25, 2014 14:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uilian/f5f714e4f9e5431a6155 to your computer and use it in GitHub Desktop.
Save uilian/f5f714e4f9e5431a6155 to your computer and use it in GitHub Desktop.
Oracle - Dealing with locked accounts and password expiration
-- Identify and change profile life_time
select profile from DBA_USERS where username = '<username>';
alter profile <profile_name> limit password_life_time UNLIMITED;
select resource_name,limit from dba_profiles where profile='<profile_name>';
-- Identify which accounts are about to expire (or expired), change password and unlock
select username,expiry_date,account_status from dba_users ORDER BY expiry_date DESC;
alter user <username> identified by <new_password> account unlock;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment