First, connect the
Sql*plus:release 12.1.0.2.0 Production on Thu February 12 15:40:422015
Copyright (c) 1982, Oracle. All rights reserved.
Please enter user name: System
Enter Password:
Last Successful login time: Thursday February 12 2015 10:26:40 +08:00
Connect to:
Oracle Database 12c Enterprise editionrelease 12.1.0.2.0-64bit Production
With the partitioning, OLAP, Advancedanalytics and Real application testing opt
Ions
A formatted operation is awakened to the corresponding column in order to observe
Sql> column username Format a20
sql> Column Account_status format A20
Sql> set pagesize 400
Enter the following SELECT statement to query the user and the status information from Dba_users
Sql> Select Username,account_status fromdba_users
USERNAME Account_status
-------------------- --------------------
C # #TEST OPEN
C # #SCOTT OPEN
ORACLE_OCM EXPIRED & LOCKED
Ojvmsys EXPIRED & LOCKED
SYSKM EXPIRED & LOCKED
Xs$null EXPIRED & LOCKED
Gsmcatuser EXPIRED & LOCKED
Mddata EXPIRED & LOCKED
Sysbackup EXPIRED & LOCKED
DIP EXPIRED & LOCKED
SYSDG EXPIRED & LOCKED
Apex_public_user EXPIRED & LOCKED
Spatial_csw_admin_us EXPIRED & LOCKED
R
Spatial_wfs_admin_us EXPIRED & LOCKED
R
Gsmuser EXPIRED & LOCKED
Audsys expired& LOCKED
C # #USER1 OPEN
Flows_files expired& LOCKED
DVF EXPIRED & LOCKED
Mdsys expired& LOCKED
Ordsys expired& LOCKED
Dbsnmp EXPIRED & LOCKED
Wmsys EXPIRED & LOCKED
apex_040200 EXPIRED & LOCKED
Appqossys EXPIRED & LOCKED
Gsmadmin_internal EXPIRED & LOCKED
Orddata EXPIRED & LOCKED
Ctxsys EXPIRED & LOCKED
ANONYMOUS EXPIRED & LOCKED
XDB EXPIRED & LOCKED
Ordplugins EXPIRED & LOCKED
Dvsys EXPIRED & LOCKED
Si_informtn_schema EXPIRED & LOCKED
Olapsys EXPIRED & LOCKED
Lbacsys EXPIRED & LOCKED
Outln EXPIRED & LOCKED
SYSTEM OPEN
SYS OPEN
38 rows have been selected.
As shown above, if the username corresponding Account_status is open, indicating that the user is unlocked, if the username corresponding Account_status is expired, indicating that the user has expired, If the username corresponds to a account_status of locked, that user is locked. The use of expired or locked account is not logged on, we must first unlock the user.
Next we unlocked the OUTLN user
sql> alter user outln account unlock;
The user has changed.
Assign a password to the user
sql> alter user outln identified byadmin;
The user has changed.
We re-query the users
sql> Select Username,account_status fromdba_users;
USERNAME Account_status
-------------------- --------------------
C # #TEST OPEN
C # #SCOTT OPEN
ORACLE_OCM EXPIRED & LOCKED
Ojvmsys EXPIRED & LOCKED
SYSKM EXPIRED & LOCKED
Xs$null EXPIRED & LOCKED
Gsmcatuser EXPIRED & LOCKED
Mddata EXPIRED & LOCKED
Sysbackup EXPIRED & LOCKED
DIP EXPIRED & LOCKED
SYSDG EXPIRED & LOCKED
Apex_public_user EXPIRED & LOCKED
Spatial_csw_admin_us EXPIRED & LOCKED
R
Spatial_wfs_admin_us EXPIRED & LOCKED
R
Gsmuser EXPIRED & LOCKED
Audsys EXPIRED & LOCKED
C # #USER1 OPEN
Flows_files EXPIRED & LOCKED
DVF EXPIRED & LOCKED
Mdsys EXPIRED & LOCKED
Ordsys EXPIRED & LOCKED
Dbsnmp EXPIRED & LOCKED
Wmsys EXPIRED & LOCKED
apex_040200 EXPIRED & LOCKED
Appqossys EXPIRED & LOCKED
Gsmadmin_internal EXPIRED & LOCKED
Orddata EXPIRED & LOCKED
Ctxsys EXPIRED & LOCKED
ANONYMOUS EXPIRED & LOCKED
XDB EXPIRED & LOCKED
Ordplugins EXPIRED & LOCKED
Dvsys EXPIRED & LOCKED
Si_informtn_schema EXPIRED & LOCKED
Olapsys EXPIRED & LOCKED
Lbacsys EXPIRED & LOCKED
Outln OPEN
SYSTEM OPEN
SYS OPEN
38 rows have been selected.
As above, OUTLN has been shown as open.
Test connection
Sql> Connect Outln/admin
is connected.
Oracle User Unlocked