10g的scott账户解锁

  • 方法一:
1)prepare for active
SQL> col username format a20
SQL> col account_status format a20
SQL> set pages 300
2)check the scott's status
SQL> select username,account_status from dba_users;

USERNAME                         ACCOUNT_STATUS
-------------------- --------------------
MGMT_VIEW                        OPEN
SYS                                    OPEN
SYSTEM                             OPEN
DBSNMP                             OPEN
SYSMAN                             OPEN
JACK                                 OPEN
OUTLN                                EXPIRED & LOCKED
MDSYS                                EXPIRED & LOCKED
ORDSYS                             EXPIRED & LOCKED
EXFSYS                             EXPIRED & LOCKED
DMSYS                                EXPIRED & LOCKED
WMSYS                                EXPIRED & LOCKED
CTXSYS                             EXPIRED & LOCKED
ANONYMOUS                        EXPIRED & LOCKED
XDB                                    EXPIRED & LOCKED
ORDPLUGINS                     EXPIRED & LOCKED
SI_INFORMTN_SCHEMA     EXPIRED & LOCKED
OLAPSYS                            EXPIRED & LOCKED
SCOTT                                EXPIRED & LOCKED
TSMSYS                             EXPIRED & LOCKED
BI                                     EXPIRED & LOCKED
PM                                     EXPIRED & LOCKED
MDDATA                             EXPIRED & LOCKED
IX                                     EXPIRED & LOCKED
SH                                     EXPIRED & LOCKED
DIP                                    EXPIRED & LOCKED
OE                                     EXPIRED & LOCKED
HR                                     EXPIRED & LOCKED

28 rows selected.

SQL>
3)alter the scott's status
SQL> alter user scott account unlock;

User altered.

SQL>
4)confirm the scott's status
SQL> select username,account_status from dba_users;            

USERNAME                         ACCOUNT_STATUS
-------------------- --------------------
MGMT_VIEW                        OPEN
SYS                                    OPEN
SYSTEM                             OPEN
DBSNMP                             OPEN
SYSMAN                             OPEN
JACK                                 OPEN
SCOTT                                EXPIRED
OUTLN                                EXPIRED & LOCKED
MDSYS                                EXPIRED & LOCKED
ORDSYS                             EXPIRED & LOCKED
EXFSYS                             EXPIRED & LOCKED
DMSYS                                EXPIRED & LOCKED
WMSYS                                EXPIRED & LOCKED
CTXSYS                             EXPIRED & LOCKED
ANONYMOUS                        EXPIRED & LOCKED
XDB                                    EXPIRED & LOCKED
ORDPLUGINS                     EXPIRED & LOCKED
SI_INFORMTN_SCHEMA     EXPIRED & LOCKED
OLAPSYS                            EXPIRED & LOCKED
TSMSYS                             EXPIRED & LOCKED
BI                                     EXPIRED & LOCKED
PM                                     EXPIRED & LOCKED
MDDATA                             EXPIRED & LOCKED
IX                                     EXPIRED & LOCKED
SH                                     EXPIRED & LOCKED
DIP                                    EXPIRED & LOCKED
OE                                     EXPIRED & LOCKED
HR                                     EXPIRED & LOCKED

28 rows selected.

SQL>
5)Give a passwd for scott;
SQL> alter user scott identified by tiger;

User altered.

SQL>
6)Confirm the scott's status
SQL> select username,account_status from dba_users;

USERNAME                                                 ACCOUNT_STATUS
-------------------- --------------------
MGMT_VIEW                                                OPEN
SYS                                                                        OPEN
SYSTEM                                                         OPEN
DBSNMP                                                         OPEN
SYSMAN                                                         OPEN
SCOTT                                                                OPEN
JACK                                                                 OPEN
OUTLN                                                                EXPIRED & LOCKED
MDSYS                                                                EXPIRED & LOCKED
ORDSYS                                                         EXPIRED & LOCKED
EXFSYS                                                         EXPIRED & LOCKED
DMSYS                                                                EXPIRED & LOCKED
WMSYS                                                                EXPIRED & LOCKED
CTXSYS                                                         EXPIRED & LOCKED
ANONYMOUS                                                EXPIRED & LOCKED
XDB                                                                        EXPIRED & LOCKED
ORDPLUGINS                                         EXPIRED & LOCKED
SI_INFORMTN_SCHEMA         EXPIRED & LOCKED
OLAPSYS                                                        EXPIRED & LOCKED
TSMSYS                                                         EXPIRED & LOCKED
BI                                                                         EXPIRED & LOCKED
PM                                                                         EXPIRED & LOCKED
MDDATA                                                         EXPIRED & LOCKED
IX                                                                         EXPIRED & LOCKED
SH                                                                         EXPIRED & LOCKED
DIP                                                                        EXPIRED & LOCKED
OE                                                                         EXPIRED & LOCKED
HR                                                                         EXPIRED & LOCKED

28 rows selected.

SQL>
方法二:
1)修改scott用户密码并解锁
SQL> alter user scott identified by tiger account unlock;

User altered.

SQL>
2)查看scott账号状态
SQL> select username,account_status from dba_users;

USERNAME                                                                                                         ACCOUNT_STATUS
------------------------------------------------------------ ----------------------------------------------------------------
MGMT_VIEW                                                                                                        OPEN
SYS                                                                                                                    OPEN
SYSTEM                                                                                                             OPEN
DBSNMP                                                                                                             OPEN
SYSMAN                                                                                                             OPEN
SCOTT                                                                                                                OPEN
OUTLN                                                                                                                EXPIRED & LOCKED
MDSYS                                                                                                                EXPIRED & LOCKED
ORDSYS                                                                                                             EXPIRED & LOCKED
EXFSYS                                                                                                             EXPIRED & LOCKED
DMSYS                                                                                                                EXPIRED & LOCKED
WMSYS                                                                                                                EXPIRED & LOCKED
CTXSYS                                                                                                             EXPIRED & LOCKED
ANONYMOUS                                                                                                        EXPIRED & LOCKED
XDB                                                                                                                    EXPIRED & LOCKED
ORDPLUGINS                                                                                                     EXPIRED & LOCKED
SI_INFORMTN_SCHEMA                                                                                     EXPIRED & LOCKED
OLAPSYS                                                                                                            EXPIRED & LOCKED
TSMSYS                                                                                                             EXPIRED & LOCKED
BI                                                                                                                     EXPIRED & LOCKED
PM                                                                                                                     EXPIRED & LOCKED
MDDATA                                                                                                             EXPIRED & LOCKED
IX                                                                                                                     EXPIRED & LOCKED
SH                                                                                                                     EXPIRED & LOCKED
DIP                                                                                                                    EXPIRED & LOCKED
OE                                                                                                                     EXPIRED & LOCKED
HR                                                                                                                     EXPIRED & LOCKED

27 rows selected.

SQL>

你可能感兴趣的:(激活socott)