1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > windows平台 sqlplus / as sysdba登录出现ora-01017错误

windows平台 sqlplus / as sysdba登录出现ora-01017错误

时间:2021-08-05 20:45:13

相关推荐

windows平台 sqlplus / as sysdba登录出现ora-01017错误

问题描述:

windows平台,数据库版本为Oracle 11.2.0.4,以sqlplus / as sysdba登录出现ora-01017

C:\Users\Administrator>sqlplus / as sysdbaSQL*Plus: Release 11.2.0.4.0 Production on 星期四 1月 21 11:06:43 Copyright (c) 1982, , Oracle. All rights reserved.ERROR:ORA-01017: invalid username/password; logon denied请输入用户名:ERROR:ORA-01017: 用户名/口令无效; 登录被拒绝请输入用户名:ERROR:ORA-01017: 用户名/口令无效; 登录被拒绝

用另一种方式登录,也出现相同的报错

C:\Users\Administrator>sqlplus /nologSQL*Plus: Release 11.2.0.4.0 Production on 星期四 1月 21 11:06:49 Copyright (c) 1982, , Oracle. All rights reserved.SQL> conn / as sysdbaERROR:ORA-01017: invalid username/password; logon deniedSQL> exit

当前操作系统用户是administrator,已经是管理员权限了,不存在权限不够的问题,那应该就是操作系统认证的环节出现了问题,查看sqlnet.ora文件:

E:\oracle\product\11.2.0\dbhome_1\NETWORK\ADMIN\sqlnet.ora# sqlnet.ora Network Configuration File: E:\oracle\product\11.2.0\dbhome_1\NETWORK\ADMIN\sqlnet.ora# Generated by Oracle configuration tools.SQLNET.AUTHENTICATION_SERVICES = (NONE)# This file is actually generated by netca. But if customers choose to # install "Software Only", this file wont exist and without the native # authentication, they will not be able to connect to the database on NT.ADR_BASE = E:\oracle

果然,SQLNET.AUTHENTICATION_SERVICES = (NONE)关闭了操作系统认证。

SQLNET.AUTHENTICATION_SERVICES有3个参数:

SQLNET.AUTHENTICATION_SERVICES = (NONE) 关闭操作系统认证

SQLNET.AUTHENTICATION_SERVICES = (ALL) 开启LINUX和AIX操作系统认证

SQLNET.AUTHENTICATION_SERVICES = (NTS) 开启windows操作系统认证

修改SQLNET.AUTHENTICATION_SERVICES参数

# sqlnet.ora Network Configuration File: E:\oracle\product\11.2.0\dbhome_1\NETWORK\ADMIN\sqlnet.ora# Generated by Oracle configuration tools.#SQLNET.AUTHENTICATION_SERVICES = (NONE) #SQLNET.AUTHENTICATION_SERVICES = (ALL)SQLNET.AUTHENTICATION_SERVICES = (NTS) # This file is actually generated by netca. But if customers choose to # install "Software Only", this file wont exist and without the native # authentication, they will not be able to connect to the database on NT.ADR_BASE = E:\oracle

连接数据库正常:

C:\Users\Administrator>sqlplus / as sysdbaSQL*Plus: Release 11.2.0.4.0 Production on 星期四 1月 21 12:02:09 Copyright (c) 1982, , Oracle. All rights reserved.连接到:Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL> set linesize 200SQL> select name,open_mode,database_role from v$database;NAMEOPEN_MODE DATABASE_ROLE------------------ ---------------------------------------- --------------------------------ORCL READ WRITE PRIMARYSQL>

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。