学习测试使用oracle内置数据库scott
SQL> select username,account_status from dba_users where username='SCOTT';
USERNAME
--------------------------------------------------------------------------------
ACCOUNT_STATUS
--------------------------------------------------------------------------------
SCOTT
# 被锁
EXPIRED & LOCKED
SQL> alter user SCOTT account unlock identified by password;
User altered.
SQL> select username,account_status from dba_users where username='SCOTT';
USERNAME
--------------------------------------------------------------------------------
ACCOUNT_STATUS
--------------------------------------------------------------------------------
SCOTT
# 解锁并打开
OPEN
sqlplus scott/password@10.1.30.139:1521/orcl
SQL*Plus: Release 11.2.0.4.0 Production on Mon Mar 23 13:05:14 2020
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL>
END