Catt Solutions

Search
Skip to content

Daily Archives: July 15, 2009

11g, Oracle, Oracle 10g, oracle 9i, SQL

Account Status within a Oracle RDBMS

July 15, 2009 Larry Catt Leave a comment

Oracle provides the column ACCOUNT_STATUS in the dictionary view DBA_USERS to determine the current status of an Oracle user account. I have recently come across several DBA using this column to incorrectly determine the status of an Oracle user and how their account could be placed back into a workable status. This article addresses the ACCOUNT_STATUS and what a DBA should do with the information.

There are 6 basic types of account status and various combinations of the types. The typical system will contain the following ACCOUNT_STATUS values and each is explained in detail with its meaning and examples.

EXPIRED
EXPIRED & LOCKED
EXPIRED(GRACE)
LOCKED
LOCKED(TIMED)
OPEN

EXPIRED

Meaning – The EXPIRED status indicates one of three events.
1. The DBA has created a new account and expired the password, so the user must change their password on the first logon. An example of this situation is the create user statement below: An example of this situation is the create user statement below:

SQL> Create user TEST identified by test password expire
Default tablespace user_data
Quota unlimited on user_data;
2 3
User created.

SQL> Grant create session to test;
Grant succeeded.
SQL>Grant resource to test;
Grant succeeded.
SQL>
SQL> connect test/test
ERROR:
ORA-28001: the password has expired

Changing password for test
New password:
Retype new password:
Password changed
Connected.
SQL>

2. The password has exceeded the profile limit of PASSWORD_LIFE_TIME and the password must be changed.
3. The administrator alter the user with clause “password expire” to force a password change. An example of this can be seen in the SQL below:

SQL> alter user test password expire;

User altered.

SQL>

EXPIRED & LOCKED

Meaning – An account status of EXPIRED & LOCKED means the password is no longer valid and the account is locked. This is normally caused by the password not being changed before the PASSWORD_LIFE_TIME profile limit is exceeded and the administrator has locked the account.

EXPIRED(GRACE)

Meaning – An account status of EXPIRED(GRACE) indicates that the account password is locked due to the password not being changed before the PASSWORD_LIFE_TIME profile parameter pasted, however you have the additional time defined by the PASSWORD_GRACE_TIME profile parameter to actually change your password. If you do not change the password within the grace time the status will be changed to EXPIRED.

NOTE: The status of the account will not change until you attempt to connect with that username. The example below demonstrates the occurrence of EXPIRED(GRACE).

SQL> select account_status from dba_users where username=’TEST’;

ACCOUNT_STATUS
——————————–
OPEN

SQL> connect test/pass
ERROR:
ORA-28002: the password will expire within 0 days

Connected.
SQL> connect / as sysdba
Connected.

SQL> select account_status from dba_users where username=’TEST’;

ACCOUNT_STATUS
——————————–
EXPIRED(GRACE)

SQL> connect test/pass
ERROR:
ORA-28001: the password has expired

Changing password for test
New password:
Retype new password:
ERROR:
ORA-00988: missing or invalid password(s)

Password unchanged
Warning: You are no longer connected to ORACLE.
SQL> connect / as sysdba
Connected.
SQL> select account_status from dba_users where username=’TEST’;

ACCOUNT_STATUS
——————————–
EXPIRED

SQL>

LOCKED

Meaning – The account was locked by a DBA with the SQL statement:

Alter user “username” account lock;

LOCKED(TIMED)

Meaning – The account was locked by a user trying to access the username with the incorrect password beyond the profile limit of FAILED_LOGIN_ATTEMPTS. The account will remained locked until the profile limit of PASSWORD_LOCK_TIME is reached. PASSWORD_LOCK_TIME is a definition of time in minutes.

OPEN

Meaning – The account status of OPEN means the account is open for logon and the user can perform any task defined by his granted rights.

Larry J Catt, OCP 9i, 10g
oracle@allcompute.com
www.allcompute.com

accountaccount_statusdba_usersdefinitionexpiredexpired(grace)lockedmeaningOraclestatus

Recent Posts

  • OpenJDK JVM not supported while installing Oracle Fusion Middleware on Linux 7
  • Changing command prompt in LINUX
  • Determining SID(s) from Database Server
  • Determining ORACLE_HOME(s) from Database Server
  • Determine the release of linux you are using

Categories

  • 11g (98)
  • 12c (159)
  • ADDM (6)
  • Administration (40)
  • ADR (2)
  • alert / logs (5)
  • archiving (1)
  • ASH (3)
  • ASM (7)
  • audit (19)
  • backup/recovery (18)
  • CDB (30)
  • Cloud Control (5)
  • data pump (8)
  • dbca (8)
  • EM (7)
  • EM Express (5)
  • error (16)
  • flashback (8)
  • FMW (1)
  • hp-ux (47)
  • ILM (2)
  • installer (35)
  • itanium (33)
  • linux (71)
  • listener (6)
  • Multitenant (25)
  • network (20)
  • OPatch (12)
  • ORA- (1)
  • Oracle (169)
  • Oracle 10g (122)
  • oracle 9i (97)
  • PDB (25)
  • Performance (24)
  • perl (2)
  • privileges (7)
  • RAC (37)
  • redaction (2)
  • replay (1)
  • RMAN (19)
  • RMAN (12)
  • script (13)
  • security (5)
  • SQL (32)
  • SQLLoader (2)
  • sqlplus (13)
  • storage (7)
  • tablespaces (6)
  • testing (3)
  • tnsnames (3)
  • troubleshooting (1)
  • uncategorized (376)
  • unix (49)
  • Users (10)
  • utility (14)
  • VM (3)
  • watches (9)
  • windows (18)
  • windows 7 (13)

Oracle tips and tricks.

July 2009
S M T W T F S
 1234
567891011
12131415161718
19202122232425
262728293031  
« May   Aug »

Archive

  • July 2017 (7)
  • June 2017 (5)
  • May 2017 (5)
  • April 2017 (8)
  • March 2017 (7)
  • February 2017 (6)
  • January 2017 (6)
  • December 2016 (6)
  • November 2016 (7)
  • October 2016 (5)
  • September 2016 (7)
  • August 2016 (7)
  • July 2016 (7)
  • June 2016 (8)
  • May 2016 (4)
  • April 2016 (7)
  • March 2016 (7)
  • February 2016 (7)
  • January 2016 (7)
  • December 2015 (7)
  • November 2015 (7)
  • October 2015 (5)
  • September 2015 (7)
  • August 2015 (7)
  • July 2015 (3)
  • June 2015 (2)
  • May 2015 (1)
  • April 2015 (2)
  • March 2015 (2)
  • February 2015 (2)
  • January 2015 (1)
  • December 2014 (4)
  • November 2014 (2)
  • October 2014 (1)
  • August 2014 (1)
  • June 2014 (1)
  • May 2014 (1)
  • April 2014 (1)
  • January 2014 (1)
  • October 2013 (3)
  • September 2013 (2)
  • August 2013 (2)
  • July 2013 (1)
  • June 2013 (1)
  • April 2013 (1)
  • February 2013 (1)
  • December 2012 (1)
  • September 2012 (1)
  • June 2012 (1)
  • May 2012 (1)
  • February 2012 (1)
  • November 2011 (1)
  • September 2011 (1)
  • July 2011 (1)
  • May 2011 (1)
  • April 2011 (8)
  • March 2011 (2)
  • February 2011 (4)
  • January 2011 (4)
  • December 2010 (4)
  • November 2010 (4)
  • October 2010 (2)
  • September 2010 (2)
  • August 2010 (3)
  • July 2010 (2)
  • June 2010 (5)
  • May 2010 (10)
  • April 2010 (13)
  • March 2010 (10)
  • February 2010 (8)
  • January 2010 (6)
  • December 2009 (7)
  • November 2009 (4)
  • October 2009 (6)
  • September 2009 (5)
  • August 2009 (20)
  • July 2009 (4)
  • May 2009 (4)
  • April 2009 (1)
  • March 2009 (1)
  • February 2009 (1)
  • January 2009 (6)
  • September 2008 (6)
  • July 2008 (1)
  • June 2008 (1)
  • May 2008 (1)
  • April 2008 (1)
Proudly powered by WordPress