Welcome to the Oracle community forum and interact with 2 million technical staff to access SQL * Plus: Release9.2.0.4.0
Welcome to the Oracle community forum and interact with 2 million technical staff> go to SQL * Plus: Release 9.2.0.4.0-Production on Tue Jul 14 18:12:38 2009 Copyright (c) 1982,200 2, Oracle Corporation. all rights reserved. SQL conn sys/sys as sysdba Connected. SQL show u
Welcome to the Oracle community forum and interact with 2 million technical staff> enter
SQL * Plus: Release 9.2.0.4.0-Production on Tue Jul 14 18:12:38 2009
Copyright (c) 1982,200 2, Oracle Corporation. All rights reserved.
SQL> conn sys/sys as sysdba
Connected.
SQL> show user
USER is "SYS"
SQL> desc dba_users
Name Null? Type
-----------------------------------------------------------------------------
Username not null VARCHAR2 (30)
USER_ID NOT NULL NUMBER
PASSWORD VARCHAR2 (30)
ACCOUNT_STATUS not null VARCHAR2 (32)
LOCK_DATE DATE
EXPIRY_DATE DATE
DEFAULT_TABLESPACE not null VARCHAR2 (30)
TEMPORARY_TABLESPACE not null VARCHAR2 (30)
CREATED NOT NULL DATE
Profile not null VARCHAR2 (30)
INITIAL_RSRC_CONSUMER_GROUP VARCHAR2 (30)
EXTERNAL_NAME VARCHAR2 (4000)
SQL> set lines 200
SQL> select username, account_status from dba_users;
USERNAME ACCOUNT_STATUS
--------------------------------------------------------------
SYS OPEN
SYSTEM OPEN
DBSNMP OPEN
SCOTT OPEN
Outln expired & LOCKED
Wmsys expired & LOCKED
Ordsys expired & LOCKED
Ordplugins expired & LOCKED
Mdsys expired & LOCKED
Ctxsys expired & LOCKED
Xdb expired & LOCKED
USERNAME ACCOUNT_STATUS
--------------------------------------------------------------
Anonymous expired & LOCKED
Wksys expired & LOCKED
Wkproxy expired & LOCKED
Odm expired & LOCKED
ODM_MTR EXPIRED & LOCKED
Olapsys expired & LOCKED
Hr expired & LOCKED
Oe expired & LOCKED
Pm expired & LOCKED
SQL> alter user hr account unlock; (unlock)
User altered.
SQL> select username, account_status from dba_users;
USERNAME ACCOUNT_STATUS
--------------------------------------------------------------
SYS OPEN
SYSTEM OPEN
DBSNMP OPEN
SCOTT OPEN
HR EXPIRED
Outln expired & LOCKED
Wmsys expired & LOCKED
Ordsys expired & LOCKED
Ordplugins expired & LOCKED
QL> alter user hr identified by hr; (Change Password)
User altered.
SQL> select username, account_status from dba_users;
USERNAME ACCOUNT_STATUS
--------------------------------------------------------------
SYS OPEN
SYSTEM OPEN
DBSNMP OPEN
SCOTT OPEN
HR OPEN
Outln expired & LOCKED
SQL> conn hr/hr
Connected.
SQL> conn/as sysdba
Connected.
SQL> alter user hr account lock; (lock)
User altered.
SQL> select username, account_status from dba_users;
USERNAME ACCOUNT_STATUS
--------------------------------------------------------------
SYS OPEN
SYSTEM OPEN
DBSNMP OPEN
SCOTT OPEN
HR LOCKED
Outln expired & LOCKED
SQL> alter user hr password expire; (the password is invalid)
User altered.
SQL> select username, account_status from dba_users;
USERNAME ACCOUNT_STATUS
--------------------------------------------------------------
SYS OPEN
SYSTEM OPEN
DBSNMP OPEN
SCOTT OPEN
Outln expired & LOCKED
Wmsys expired & LOCKED
Olapsys expired & LOCKED
Hr expired & LOCKED
Oe expired & LOCKED
Pm expired & LOCKED
SQL> conn hr/hr
ERROR:
ORA-28000: the account is locked
Warning: You are no longer connected to ORACLE.