Today to tell the students Xian Java Training when I logged in to the Oracle database with a Scott user, Ora-01017:invalid Username/password appeared, and the logon denied was wrong because my Scott user was not unlocked. After logging in with the system user, and then using the ALTER user Scott account unlock statement to unlock the Scott user, but still cannot enter after unlocking, or report ora-01017:invalid Username/password; Logon denied error, think carefully for a while, feel should be I in the Scott user unlocked without setting a password, so no matter what password is wrong, so I think of the following solution, in order to prevent future mistakes, the error and resolution are recorded in the following:
Sql*plus:release 11.2.0.1.0 Production on Friday October 12 20:03:09 2012
Copyright (c) 1982, Oracle. All rights reserved.
Please enter your username: Scott
Enter Password:
ERROR:
Ora-01017:invalid Username/password; Logon denied
Please enter user name: System
Enter Password:
Connect to:
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;
is connected.
sql> alter user SCOTT account unlock identified by Orcl123456;
The user has changed.
Sql> Select Username,account_status from dba_users where username= ' SCOTT ';
USERNAME
-----------------------------------------------------------
Account_status
-----------------------------------------------------------
SCOTT
OPEN
Sql> Conn scott/orcl123456
is connected.
You can then use the Scott user to log in normally, if you are not sure you can use the query statement to verify .
Teacher: Liu Teacher (Peking University Jade Bird XI ' an North Street campus gold medal lecturer)
Experience Courses: Java in-Service promotion class
Lecture Venue: Xian Beida Jade Bird XI ' an North Street campus
This article is from the "Beida Bluebird Java School District" blog, please be sure to keep this source http://9158328.blog.51cto.com/9148328/1438034