Oracle使用者解鎖

來源:互聯網
上載者:User

Oracle使用者解鎖

首先先串連上

SQL*Plus: Release 12.1.0.2.0 Production on 星期四 2月 12 15:40:422015

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

請輸入使用者名稱:  system

輸入口令:

上次成功登入時間: 星期四 2月  12 2015 10:26:40 +08:00

串連到:

Oracle Database 12c Enterprise EditionRelease 12.1.0.2.0 - 64bit Production

With the Partitioning, OLAP, AdvancedAnalytics and Real Application Testing opt

Ions

//對相應的列驚醒格式化操作,以便觀察

SQL> column username format a20

SQL> column account_status format a20

SQL> set pagesize 400

//輸入下面這條select語句,從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 行。

如上面所示,如果username對應的account_status為open,表示該使用者解鎖, 如果username對應的account_status為EXPIRED,表示該使用者已經到期,如果username對應的account_status為locked,表示該使用者鎖定。使用到期的或者鎖定的帳號是登陸不上的,我們必須先對使用者解鎖。

//接下來我們對outln使用者進行解鎖

SQL> alter user outln account unlock;

使用者已更改。

//給該使用者指定口令

SQL> alter user outln identified byadmin;

使用者已更改。

//我們再查詢所用使用者

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 行。

如上,outln已經顯示為open。

//測試連接

SQL> connect outln/admin

已串連。

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.