Home  >  Article  >  Database  >  ORA-28000 用户被锁解锁

ORA-28000 用户被锁解锁

WBOY
WBOYOriginal
2016-06-07 17:13:281930browse

一、故障现象: SQLgt; conn system/OracleERROR:ORA-28000: the account is locked Warning: You are no longer connected to

一、故障现象:

SQL> conn system/Oracle
ERROR:
ORA-28000: the account is locked


Warning: You are no longer connected to ORACLE.
SQL>

二、原因分析:
   system 被锁住了,所以无法登录

  通过sys用户或登录到操作系统用本地验证方法用sys角色登录数据库。

2.1 网络验证方式:
SQL> conn sys/oracle as sysdba
Connected.

SQL> show user;
USER is "SYS"

2.2  本地验证方式:
[oracle@wwl ~]$ sqlplus / as sysdba

SQL> show user;
USER is "SYS"
SQL>

2.3  查看system用户状态

SQL> select username,account_status from dba_users where username='SYSTEM';

USERNAME   ACCOUNT_STATUS
---------- --------------------------------
SYSTEM     LOCKED

SQL>

注意:证实了刚才的原因分析,是因为system用户锁住所以无法登录。

三、解决办法:
  
   既然是被锁住了,那就通过解锁system用户。

SQL> alter user system account unlock;

User altered.

SQL> select username,account_status from dba_users where username='SYSTEM';

USERNAME   ACCOUNT_STATUS
---------- --------------------------------
SYSTEM     OPEN

SQL>

四、验证是否能登录
    可以看到,,解锁后system用户就可以正常登录了。

SQL> conn system/oracle
Connected.
SQL> show user;
USER is "SYSTEM"
SQL>

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn