1、先确认是否输错 用户名和密码
2、如果的确是丢失密码的话:
查看sqlnet.ora 如果是 SQLNET.AUTHENTICATION_SERVICES= (NONE) ,
需更改为SQLNET.AUTHENTICATION_SERVICES= (NTS)
在SQL*Plus中执行如下命令:
SQL>conn/as sysdba (操作系统认证登录)
SQL>alter user system identified by system; (回车后用户system的密码会更改为system)
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
已连接。
到此就可以用scott用户正常登陆了,如不放心还可以使用一下的查询语句进行验证:
SQL> select * from emp;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
----- ---------- --------- ----- ----------- --------- --------- ------
7369 SMITH CLERK 7902 1980/12/17 800.00 20
7499 ALLEN SALESMAN 7698 1981/2/20 1600.00 300.00 30
7521 WARD SALESMAN 7698 1981/2/22 1250.00 500.00 30
7566 JONES MANAGER 7839 1981/4/2 2975.00 20
7654 MARTIN SALESMAN 7698 1981/9/28 1250.00 1400.00 30
7698 BLAKE MANAGER 7839 1981/5/1 2850.00 30
7782 CLARK MANAGER 7839 1981/6/9 2450.00 10
7788 SCOTT ANALYST 7566 1987/4/19 3000.00 20
7839 KING PRESIDENT 1981/11/17 5000.00 10
7844 TURNER SALESMAN 7698 1981/9/8 1500.00 0.00 30
7876 ADAMS CLERK 7788 1987/5/23 1100.00 20
7900 JAMES CLERK 7698 1981/12/3 950.00 30
7902 FORD ANALYST 7566 1981/12/3 3000.00 20
7934 MILLER CLERK 7782 1982/1/23 1300.00 10
14 rows selected
本篇文章来源于 Linux公社网站(www.linuxidc.com) 原文链接:http://www.linuxidc.com/Linux/2014-05/102363.htm