• Home
  • About
  • Disclaimer
VAS Feeds

A Knowledge Corner for Value Added Service Engineers & Managers

  • VAS
  • Interviews
  • Databases
  • Operating Systems
Feb
20

How to unlock the users in Oracle

Usually, we use the SCOTT/tiger account to login to the system after installing the database but that account is locked in the beginning for security reasons. So, if you try to enter using that user, you get the following error:

C:\Documents and Settings\Administrator>sqlplus

SQL*Plus: Release 10.1.0.2.0 – Production on Sun Feb 20 21:15:21 2011

Copyright (c) 1982, 2004, Oracle.  All rights reserved.

Enter user-name: SCOTT
Enter password:
ERROR:
ORA-28000: the account is locked

As you see, we get error code 28000. To unlock your accounts, you can use the following method:

C:\Documents and Settings\Administrator>sqlplus /NOLOG

SQL*Plus: Release 10.1.0.2.0 – Production on Sun Feb 20 21:17:20 2011

Copyright (c) 1982, 2004, Oracle.  All rights reserved.

SQL>
SQL>
SQL> connect / as sysdba
Connected.
SQL>
SQL>
SQL>
SQL>
SQL> ALTER USER SCOTT IDENTIFIED BY tiger ACCOUNT UNLOCK;

User altered.

SQL>

So, I can change the password and unlock the user at the same time by a single SQL statement. Some more statements that can be used here are given as under:

Unlock the password

ALTER USER username ACCOUNT UNLOCK;

Lock the password

ALTER USER username ACCOUNT LOCK;

Change the password of an unlocked account

ALTER USER username IDENTIFIED BY password;

Change the password of a locked account

ALTER USER username IDENTIFIED BY password ACCOUNT UNLOCK;

Adnan Khurshid

Adnan Khurshid, the author of this article, has been working in a telecommunication sector since 2007. He has worked there as a VAS (Value Added Services) engineer and has excelled remarkably in the field. Working in this field has been his passion and he has always made efforts to keep himself up to date. Find more about him on LinkedIn

More Posts

Tags: sqlplus /NOLOG, unlock oracle account

Posted by Adnan Khurshid Databases Subscribe to RSS feed

4 Comments on How to unlock the users in Oracle

  1. purnima says:
    May 8, 2011 at 6:11 pm

    this was excellent.. thanks for this post.. really helped alot.. 🙂

    Reply
  2. Anandi says:
    October 24, 2011 at 8:12 pm

    Thank u 🙂 it works…

    Reply
  3. surekha gupta says:
    May 1, 2013 at 5:53 am

    i am unable to open my account…there is a ERROR that account is locked.can you please provide me an alternate option to open my account

    Reply
  4. Abhimanyu sapra says:
    January 12, 2015 at 5:37 pm

    Thankyou it is really useful.

    Reply

Leave a Reply Cancel reply

Categories

  • Categories
    • Databases
    • Operating Systems
    • Value Added Services
    • vmware

Archive

  • January 2015
  • December 2014
  • June 2011
  • May 2011
  • April 2011
  • March 2011
  • February 2011
  • January 2011

Blogroll

  • Documentation
  • Plugins
  • Suggest Ideas
  • Support Forum
  • Themes
  • WordPress Blog
  • WordPress Planet

Meta

  • Log in
  • Comments RSS

Recent Posts

  • How to install Python on CentOS
  • How to access internet from VMWARE (Linux)
  • How to modify the timestamp of files in Linux
  • Understanding background and foreground jobs in Linux
  • All you need to know about Crontab
  • How to get rid of scrolling for long SQL output in Oracle
  • How to run SQL commands with an input variable
  • How to remove the backspace ^H character from Unix session
  • How to resolve Oracle Error “shared memory realm does not exist”
  • How to delete environment variables in SUN Solaris
  • Adding permanent and temporary routes to SUN Solaris
  • Basics of Oracle System Processes
  • How to find large files and directories in Unix/Linux
  • How to unlock the users in Oracle
  • How to determine which processes are taking most of your CPU and Memory in Linux
  • How to get columns from editor segregated by a delimiter in Linux
  • Short Message Center – Message Flows
  • How to login to ISQL*PLUS as sysdba in Oracle
  • How to change the port number for iSQL*PLUS in Oracle
  • How to retrieve command history in Linux/Unix servers
  • How to sort files in Linux
  • How to add environment variables in Linux/Unix
  • How to capture packets on Ethernet interface in SUN Solaris
  • How to retrieve SQL script for table creation from Informix
  • How to check shared libraries dependencies in Linux
  • How to backup the critical partition data in Linux servers
  • How to design a hard drive layout (partitioning) on Linux servers
  • How to switch between GUI and command line interface in Linux
  • How to shutdown/restart the Linux/Unix servers
  • Changing run levels for Linux/Unix
  • How to view startup kernel messages after system boot in SuSE Linux
  • How to change IP Address in SUN Solaris server
  • How to enable FTP on SuSE Linux 9

Tags

    -host -net /etc/rc3.d/S98route arc background backspace bg change timestamp ckpt core files dbw delete environment variable delete env variables display du -sk fg find large directory find large files foreground install python install python on centos jobs kill % lgwr nohup No such file or directory ORA-01034 ORA-27101 oracle process pmon ps -aux python route add S98route shared memory realm does not exist smon sort memory usage sqlplus /NOLOG stty erase timestamp tnslsnr touch -m touch -t unlock oracle account unsetenv
RSS
Copyright © 2025 VAS Feeds All rights reserved.