1、不同OS平台下sqlnetora配置监听问题我们经验遇到,而且监听问题一直是一个很麻烦的问题。今天又遇上了。快中午了Setphen突然跟我说一个数据库从远程连不上去了,但服务器本机可以。貌似是此机长期不用,IP变了。即远程看下情况。发现这个虚拟机不能复制文字,就截图好了。由于图片中的字是黑的,说明文字也是黑的较难辨认,于是用蓝字代替。首先用sqlplus 远程登录一下,果然说不认识这个实例,还出现了lost,说明是ip解析有问题:即怀疑监听解释ip出现了问题:果然。监听找不到了。同时,我们也注意到这里出现了timed out。断定是IP出现了问题:第一次使用ifconfig命令说找不到,其实原
2、因是这个env里的path没有把/sbin目录包含进去。然后直接到sbin目录里执行,就可以了。发现此机目录使用的IP是:10.30.154.55,名字为zhurh64or11.prod.quest.corp,再到hosts文件中进行验证,看是否冲突:果然,这里记录的IP为10.30.151.55,这样便出现了找不到的情况。将hosts文件备份之后,更改为10.30.154.55即可。重启监听:这样就发现监听启动成功了,并且发现监听也包括了实例rh64or11,即获取成功。立刻兴冲冲地sqlplus验证下:纳呢? - -# 好心情立刻毁了。先查下远程sys是否允许的参数:参数rmote_log
3、in_passwordfile的值是EXCLUSIVE是正确的。便知道是sqlnet.ora文件有问题,去看下:想起NTS没错啊,就是系统用户登录,适合sqlplus “/ as sysdba”,那就再改成NONE算了,再看下:还是报错。有点纳闷。便上网去查下这个SQLNET.AUTHENTICATION_SERVICES参数,oracle官方的解释如下:SQLNET.AUTHENTICATION_SERVICESPurposeUse the parameter SQLNET.AUTHENTICATION_SERVICES to enable one or more authenticatio
4、n services. If authentication has been installed, it is recommended that this parameter be set to either none or to one of the authentication methods.DefaultNoneValuesAuthentication Methods Available with Oracle Net Services:none for no authentication methods. A valid username and password can be us
5、ed to access the database.all for all authentication methodsnts forWindows NT native authentication才知道,这个值是有平台区别的,做下实验:可以通过对SQLNET.AUTHENTICATION_SERVICES值进行修改查看其影响。lWINDOWNS:A.无sqlnet.ora文件:E:oracleproduct10.2.0db_1NETWORKADMINdir sqlnet.ora驱动器E中的卷没有标签。卷的序列号是1CF8-89BBE:oracleproduct10.2.0db_1NETWOR
6、KADMIN的目录找不到文件E:oracleproduct10.2.0db_1NETWORKADMINE:oracleproduct10.2.0db_1NETWORKADMINsqlplus / as sysdbaSQL*Plus: Release 10.2.0.1.0 - Production on星期二5月8 20:45:35 2012Copyright (c) 1982, 2005, Oracle.All rights reserved.ERROR:ORA-01031:权限不足请输入用户名:B. SQLNET.AUTHENTICATION_SERVICES=(NONE)E:oraclep
7、roduct10.2.0db_1NETWORKADMINdir sqlnet.ora驱动器E中的卷没有标签。卷的序列号是1CF8-89BBE:oracleproduct10.2.0db_1NETWORKADMIN的目录2012-05-0820:48 266 sqlnet.ora 1个文件 266字节 0个目录1,969,827,840可用字节E:oracleproduct10.2.0db_1NETWORKADMINtype sqlnet.ora# This file is actually generated by netca. But if customers choose to# inst
8、all Software Only, this file wont exist and without the native# authentication, they will not be able to connect to the database on NT.SQLNET.AUTHENTICATION_SERVICES = (NONE)E:oracleproduct10.2.0db_1NETWORKADMINsqlplus / as sysdbaSQL*Plus: Release 10.2.0.1.0 - Production on星期二5月8 20:48:53 2012Copyri
9、ght (c) 1982, 2005, Oracle.All rights reserved.ERROR:ORA-01031:权限不足请输入用户名:C. SQLNET.AUTHENTICATION_SERVICES=(ALL)E:oracleproduct10.2.0db_1NETWORKADMINtype sqlnet.ora# This file is actually generated by netca. But if customers choose to# install Software Only, this file wont exist and without the nat
10、ive# authentication, they will not be able to connect to the database on NT.SQLNET.AUTHENTICATION_SERVICES = (ALL)E:oracleproduct10.2.0db_1NETWORKADMINsqlplus / as sysdbaSQL*Plus: Release 10.2.0.1.0 - Production on星期二5月8 20:51:28 2012Copyright (c) 1982, 2005, Oracle.All rights reserved.ERROR:ORA-126
11、41:验证服务无法初始化请输入用户名:D. SQLNET.AUTHENTICATION_SERVICES=(NTS)E:oracleproduct10.2.0db_1NETWORKADMINtype sqlnet.ora# 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 t
12、o the database on NT.SQLNET.AUTHENTICATION_SERVICES = (NTS)E:oracleproduct10.2.0db_1NETWORKADMINsqlplus / as sysdbaSQL*Plus: Release 10.2.0.1.0 - Production on星期二5月8 20:53:49 2012Copyright (c) 1982, 2005, Oracle.All rights reserved.连接到:Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
13、uctionWith the Partitioning, OLAP and Data Mining optionsSQLlLINUXA.无sqlnet.ora文件:bash-3.00$ls -l sqlnet.orasqlnet.ora:无此文件或目录bash-3.00$sqlplus / as sysdbaSQL*Plus: Release 10.2.0.1.0 - Production on Tue May 8 21:11:04 2012Copyright (c) 1982, 2005, Oracle.All rights reserved.Connected to:Oracle Data
14、base 10g Enterprise Edition Release 10.2.0.1.0 - 64bit ProductionWith the Partitioning, OLAP and Data Mining optionsSQLB.SQLNET.AUTHENTICATION_SERVICES=(NONE)bash-3.00$cat sqlnet.oraSQLNET.AUTHENTICATION_SERVICES = (NONE)bash-3.00$sqlplus / as sysdbaSQL*Plus: Release 10.2.0.1.0 - Production on Tue M
15、ay 8 21:13:00 2012Copyright (c) 1982, 2005, Oracle.All rights reserved.ERROR:ORA-01031: insufficient privilegesEnter user-name:C.SQLNET.AUTHENTICATION_SERVICES=(ALL)bash-3.00$cat sqlnet.oraSQLNET.AUTHENTICATION_SERVICES = (ALL)bash-3.00$sqlplus / as sysdbaSQL*Plus: Release 10.2.0.1.0 - Production on
16、 Tue May 8 21:13:59 2012Copyright (c) 1982, 2005, Oracle.All rights reserved.Connected to:Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit ProductionWith the Partitioning, OLAP and Data Mining optionsSQLD.SQLNET.AUTHENTICATION_SERVICES=(NTS)bash-3.00$cat sqlnet.oraSQLNET.AUTHENTICAT
17、ION_SERVICES = (NTS)bash-3.00$sqlplus / as sysdbaSQL*Plus: Release 10.2.0.1.0 - Production on Tue May 8 21:15:05 2012Copyright (c) 1982, 2005, Oracle.All rights reserved.ERROR:ORA-01031: insufficient privilegesEnter user-name:总结:1)在windows下,SQLNET.AUTHENTICATION_SERVICES必须设置为NTS才可用,此值仅适用于WINDOWS。2)在LINUX下,SQLNET.AUTHENTICATION_SERVICES为ALL或不设置(sqlnet.ora文件不存在时)均可登录。才想起为什么WINDOWS底下NTS,以前常用的IBM AIX/UNIX是ALL,linux也一样。学习了。现在再回到正题上来,把SQLNET.AUTHENTICATION_SERVICES修改为ALL,再试下:再用我本机的CMD连一下试试;OK。至此问题解决。
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1