Skip to content

Instantly share code, notes, and snippets.

@iguissouma
Created November 26, 2015 10:12
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iguissouma/75cf4a6351c035e7ccf4 to your computer and use it in GitHub Desktop.
Save iguissouma/75cf4a6351c035e7ccf4 to your computer and use it in GitHub Desktop.
Here's how to lock or unlock Oracle database user accounts.
SQL> ALTER USER username ACCOUNT LOCK;
SQL> ALTER USER username ACCOUNT UNLOCK;
@iguissouma
Copy link
Author

To unlock a user Run the following sql as administrator user like SYS or SYSTEM

ALTER USER user_name IDENTIFIED BY password ACCOUNT UNLOCK;

here password is your passord which you want to use for your account remember this password for further use.

@0692965054
Copy link

amarildo

@0692965054
Copy link

amarildo1

@0692965054
Copy link

amarildo2

@mohamad7788
Copy link

mohamad7788 commented Oct 12, 2018

Thanks for sharing such command .
in this form , i would like to share a command to create Oracle account & change password
create account : CREATE USER <account-name>IDENTIFIED BY <account-password> password expire DEFAULT TABLESPACE <table-space name> TEMPORARY TABLESPACE TEMP QUOTA UNLIMITED ON <table-space name> PROFILE PERSONAL;
change account password : alter user <account-name> identified by "<accountpassword>"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment