您的位置:首页 > 数据库 > Oracle

oracle中scott不可登录的解决办法

2016-07-29 09:55 330 查看
今天用scott用户登录Oracle数据库时,竟然出现了ORA-01017:
invalid username/password; logon denied错误,原以为是因为我的scott用户没有解锁,后用system用户登录,然后用alter user scott account unlock语句对scott用户进行解锁,可是解锁后依然不能进入,还是报告ORA-01017: invalid username/password; logon denied错误,仔细想了一会,感觉应该是我在对scott用户解锁时没有设置密码,所以不论输入什么密码都是错误的,于是我想到了如下的解决办法,为防止以后犯此类错误,现将错误及解决方式记录于下:
 
SQL*Plus: Release 11.2.0.1.0 Production on 星期五 10月 12 20:03:09 2012
 
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
 
请输入用户名:  scott
 输入口令:
 ERROR:
 ORA-01017: invalid username/password; logon denied
 
请输入用户名:  system
 输入口令:
 
连接到:
 Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
 With the Partitioning, OLAP, Data Mining and Real Application Testing options
 
SQL> conn /as sysdba;
 已连接。
 SQL> alter user SCOTT account unlock identified by Orcl123456;
 
用户已更改。
 
SQL> select username,account_status from dba_users where username='SCOTT';
 
USERNAME
 ------------------------------------------------------------
 ACCOUNT_STATUS
 ----------------------------------------------------------------
 SCOTT
 OPEN
 SQL> conn scott/Orcl123456
 已连接。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  oracle