sqlnet.ora

关于sqlnet.ora的说明:

*****************************************************FROM ORACLE11G DOCS*************************************

The sqlnet.ora file is the profile configuration file. It resides on the client machines and the database server. Profiles are stored and implemented using this file. The database server can be configured with access control parameters in the sqlnet.ora file. These parameters specify whether clients are allowed or denied access based on the protocol.The sqlnet.ora file enables you to do the following:•Specify the client domain to append to unqualified names•Prioritize naming methods•Enable logging and tracing features•Route connections through specific processes•Configure parameters for external naming•Configure Oracle Advanced Security•Use protocol-specific parameters to restrict access to the databaseBy default, the sqlnet.ora file is located in the ORACLE_HOME/network/admin directory. The sqlnet.ora file can also be stored in the directory specified by the TNS_ADMIN environment variable.

*****************************************************************************************************************************

从描述中看出,该文件是控制客户端访问数据库服务器的,可以设定多种参数进行访问控制。而在这里作为初学者接触到的最早参数是 sqlnet.authentication_services,说明如下:

************************************************FROM ORACLE11G

DOCS

******************************************************

SQLNET.AUTHENTICATION_SERVICESPurposeTo enable one or more authentication services. If authentication has been installed, then it is recommended that this parameter be set to either none or to one of the authentication methods.DefaultNoneNote:When installing the database with Database Configuration Assistant (DBCA), this parameter may be set to nts in the sqlnet.ora file.Values•Authentication Methods Available with Oracle Net Services:◦none for no authentication methods, including Microsoft Windows native operating system authentication. When SQLNET.AUTHENTICATION_SERVICES is set to none, a valid user name and password can be used to access the database.◦all for all authentication methods.◦nts for Microsoft Windows native operating system authentication.•Authentication Methods Available with Oracle Advanced Security:◦kerberos5 for Kerberos authentication.◦radius for RADIUS authentication.◦tcps for SSL authentication.

**********************************************************************************************************************************

从参数的说明可以了解到提供两种服务,net服务和高级安全服务。高级安全服务参数这里不讨论了,讨论一下 none all nts三个参数的作用。设定sqlnet.authentication_services:

•none:作用是不允许通过os系统用户登录数据库,需要提供用户名及密码;

•all:作用是允许所有的登录方式;

•nts:作用是windows的本地操作系统用户认证;

注:需要说明的是据试验该用户名和密码是指具有sysdba权限的用户;

在linux上若用系统用户oracle登录数据库需要设定为all或是注销该字段;

注:linux上默认是没有该文件的,可以手动创建,

参考$ORACLE_HOME/network/admin/samples/sqlnet.ora内容,并将之设定在$ORACLE_HOME/network/admin/目录下。

[plain] view plaincopyprint?01.[oracle@centos admin]$ pwd 02./oracle/11g/network/admin 03.[oracle@centos admin]$ cat sqlnet.ora 04.# This file is actually generated by netca. But if customers choose to 05.# install "Software Only", this file wont exist and without the native 06.# authentication, they will not be able to connect to the database on NT. 07. 08.#SQLNET.AUTHENTICATION_SERVICES = (none) 09.[oracle@centos admin]$ [oracle@centos admin]$ pwd/oracle/11g/network/admin[oracle@centos admin]$ cat 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 to the database on NT.#SQLNET.AUTHENTICATION_SERVICES = (none)[oracle@centos admin]$ 我是从windows上copy过去的,对于linux来讲一般不指定该字段就能使oracle系统用户登录数据库了。

注:如有对该话题有疑问,欢迎留言讨论。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值