ORA-01017: invalid username/password; logon denied 无法使用密码登录oracle centos linux redhat

ORA-01017: invalid username/password; logon denied 无法使用密码登录oracle centos linux redhat登录报错[oracle@centos-7_3dbs]$sqlplus/nologSQL*Plus:Release11.2.0.4.0ProductiononThuAug2920:59:412019Copyright(c)1982,2013,Oracle.Allrightsreserved.SQL>conn/assysdbaCon…

大家好,又见面了,我是你们的朋友全栈君。

登录报错

[oracle@centos-7_3 dbs]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.4.0 Production on Thu Aug 29 20:59:41 2019

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

SQL> conn / as sysdba
Connected.
SQL> 
SQL> alter user sys identified by oracle789;

User altered.

sys用户修改密码成功,修改后的密码为oracle789

SQL> quit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@centos-7_3 dbs]$ 
[oracle@centos-7_3 dbs]$ sqlplus sys/oracle789@localhost:1521/ora81 as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Thu Aug 29 21:01:06 2019

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

ERROR:
ORA-01017: invalid username/password; logon denied


Enter user-name: ^C^C
[oracle@centos-7_3 dbs]$ 

sys用户用密码登录报错,实际上密码是对的;这里报错ORA-01017: invalid username/password; logon denied


[oracle@centos-7_3 dbs]$ pwd
/oracle/app/oracle/product/11.2.0/dbhome_1/dbs

oracle 11g r2 的版本 必须在 $ORACLE_HOME/dbs目录下 ,可以 通过cd $ORACLE_HOME/dbs 进入该目录


[oracle@centos-7_3 dbs]$ ll | grep orapw
-rw-r-----. 1 oracle oinstall 5120 Aug  7 19:35 orapworcl
-rw-r-----. 1 oracle oinstall 1536 Aug  5 23:59 orapwsrsttest
[oracle@centos-7_3 dbs]$ 
[oracle@centos-7_3 dbs]$ ps -ef | grep pmon
oracle    2251     1  0 13:53 ?        00:00:02 ora_pmon_ora81
oracle    6339  2631  0 21:03 pts/2    00:00:00 grep --color=auto pmon
[oracle@centos-7_3 dbs]$ 

grep pmon 查到oracle sid 为 ora81;

[oracle@centos-7_3 dbs]$ orapwd file=orapwora81 entries=30

Enter password for SYS: 
[oracle@centos-7_3 dbs]$ ll | grep orapw
-rw-r-----. 1 oracle oinstall 5120 Aug 29 21:04 orapwora81
-rw-r-----. 1 oracle oinstall 5120 Aug  7 19:35 orapworcl
-rw-r-----. 1 oracle oinstall 1536 Aug  5 23:59 orapwsrsttest
[oracle@centos-7_3 dbs]$ 

file=orapwora81, 格式为 orapw+ oracle sid;

[oracle@centos-7_3 dbs]$ sqlplus sys/oracle789@localhost:1521/ora81 as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Thu Aug 29 21:05:18 2019

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, OLAP, Data Mining and Real Application Testing options

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

排查发现,oracle 实例对应的密码文件不存在,导致 通过密码登录失败。不只是sys 用户,这种情况下任何用户都无法通过密码登录。
我们手动创建正确的密码文件后,使用密码成功登录oracle !
Aug.29, 2019

网上浏览了十几个网页都解决不了我的问题,于是花费精力写下这篇博文,希望能够帮到需要的人。

如果觉得文章不错,不妨给个打赏,写作不易,各位的支持,能激发和鼓励我更大的写作热情。谢谢!

在这里插入图片描述欢迎关注公号,定期分享数据库的知识,点点滴滴,大家一起进步!

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/146265.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • js中数组求和_多个数组对应项求和

    js中数组求和_多个数组对应项求和js数组求和的5种方法题目描述计算给定数组arr中所有元素的总和输入描述:数组中的元素均为Number类型输入例子:sum([1,2,3,4])输出例子:101、不考虑算法复杂度,用递归做:functionsum(arr){varlen=arr.length;if(len==0){return0;}elseif(len==1){returnarr[0

    2022年9月25日
    2
  • Reactive Streams

    Reactive Streams1.概述在本文中,我们将介绍Java9ReactiveStreams。简而言之,我们将能够使用Flow类,它包含用于构建反应流处理逻辑的主要构建块。ReactiveStreams是具有无阻塞背压的异步流处理的标准。此规范在ReactiveManifesto中定义,并且有各种实现,例如,RxJava或Akka-Streams。2.ReactiveAPI概述要构建Flow,我们可…

    2025年7月1日
    5
  • solid原则应用实例_设计模式solid原则

    solid原则应用实例_设计模式solid原则在面向对象编程中,SOLID是5个重要的设计原则的缩写。首先是由著名的软件大师RobertC.Martin(Bob大叔)在DesignPrinciplesandDesignPatterns中提出,后来MichaelFeathers用SOLID来概括这五大原则。SOLID原则使得软件设计更加容易理解、灵活和可维护。作为一名软件工程师,这5个原则我们必须知道。本文,我将涵盖这些原则,并举例说明怎样是违背了原则,以及如何进行纠正来符合SOLID原则。S—Singlerespons

    2025年7月12日
    5
  • Mybatis实现Oracle 分页「建议收藏」

    Mybatis实现Oracle 分页「建议收藏」Mybatis+Oracle分页1,使用mybatis的插件PageHelper(1)Mapper.xml<?xmlversion=”1.0″encoding=”UTF-8″?><!DOCTYPEmapperPUBLIC”-//mybatis.org//DTDMapper3.0//EN””http://mybatis.org/dtd/mybati…

    2022年5月28日
    301
  • mysql 面试题 查询出表中某字段的重复值

    mysql 面试题 查询出表中某字段的重复值

    2021年11月10日
    44

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号