暂无图片
暂无图片
1
暂无图片
暂无图片
暂无图片

20240507_Oracle as sysdba无法登陆 ORA-01017 invalid username password

适用范围

Oracle Database Exadata Cloud Machine - Version N/A and later

问题概述

[oracle@hsqldb ~]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Tue May 7 17:00:19 2024 Copyright (c) 1982, 2013, Oracle. All rights reserved. ERROR: ORA-01017: invalid username/password; logon denied

问题原因

情况一、Oracle用户groups信息变更 情况二、检查sqlnet.ora参数

解决方案

情况一、Oracle用户groups信息变更

[oracle@hsqldb ~]$ cat $ORACLE_HOME/rdbms/lib/config.c /* SS_DBA_GRP defines the UNIX group ID for sqldba adminstrative access. */ /* Refer to the Installation and User's Guide for further information. */ /* IMPORTANT: this file needs to be in sync with rdbms/src/server/osds/config.c, specifically regarding the number of elements in the ss_dba_grp array. */ #define SS_DBA_GRP "dba" #define SS_OPER_GRP "dba" #define SS_ASM_GRP "" char *ss_dba_grp[] = {SS_DBA_GRP, SS_OPER_GRP, SS_ASM_GRP}; [oracle@hsqldb ~]$ [oracle@hsqldb ~]$ id oracle uid=1002(oracle) gid=1001(oinstall) groups=1001(oinstall),50(ftp) <--Oracle groups没有dba [oracle@hsqldb ~]$ exit logout [root@hsqldb ~]# usermod -a -G ftp,dba oracle [root@hsqldb ~]# id oracle uid=1002(oracle) gid=1001(oinstall) groups=1001(oinstall),50(ftp),1002(dba) [root@hsqldb ~]# su - oracle Last login: Tue May 7 17:00:15 CST 2024 on pts/1 [oracle@hsqldb ~]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Tue May 7 17:04:26 2024 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> exit 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@hsqldb ~]$

情况二、检查sqlnet.ora参数

[oracle@hsqldb ~]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Tue May 7 17:21:03 2024 Copyright (c) 1982, 2013, Oracle. All rights reserved. ERROR: ORA-01017: invalid username/password; logon denied [oracle@hsqldb ~]$ cat $ORACLE_HOME/network/admin/s samples shrept.lst sqlnet.ora [oracle@hsqldb ~]$ cat $ORACLE_HOME/network/admin/sqlnet.ora # sqlnet.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/sqlnet.ora # Generated by Oracle configuration tools. NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT) ADR_BASE = /u01/app/oracle SQLNET.AUTHENTICATION_SERVICES = (NTS,TCPS) [oracle@hsqldb ~]$ [oracle@hsqldb ~]$ cat $ORACLE_HOME/network/admin/sqlnet.ora # sqlnet.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/sqlnet.ora # Generated by Oracle configuration tools. NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT) ADR_BASE = /u01/app/oracle #SQLNET.AUTHENTICATION_SERVICES = (NTS,TCPS) <--注释该记录 [oracle@hsqldb ~]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Tue May 7 17:23:10 2024 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> exit 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@hsqldb ~]$

参考文档

Troubleshooting ORA-1031 or ORA-1017 Errors When Connecting As SYSDBA (Doc ID 730067.1)
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论