A2oz

How to Unlock Oracle User Account in Linux?

Published in Database Administration 1 min read

Unlocking an Oracle user account in Linux is a straightforward process that involves using the sqlplus command-line utility. Here's how to do it:

  1. Connect to the Oracle database: Open a terminal and use the sqlplus command to connect to the database as the SYS or SYSTEM user.
    sqlplus / as sysdba
  2. Unlock the user account: Once connected, use the ALTER USER command to unlock the desired account. Replace <username> with the actual username:
    ALTER USER <username> ACCOUNT UNLOCK;
  3. Exit sqlplus: After unlocking the account, exit sqlplus using the EXIT command:
    EXIT;

Now, the user account is unlocked, and the user can log in to the Oracle database.

Example:

To unlock the user account "john.doe", you would use the following command:

ALTER USER john.doe ACCOUNT UNLOCK;

Important Note: Always ensure you have the necessary privileges to unlock user accounts.

Related Articles