解读sqlnet.ora文件

文件内容:

# sqlnet.ora Network Configuration File:D:\app\lenovo\product\11.2.0\dbhome_1\network\admin\sqlnet.ora

# Generated by Oracle configuration tools.

 

# This file is actually generated by netca.But if customers choose to

# install "Software Only", thisfile wont exist and without the native

# authentication, they will not be able toconnect to the database on NT.

 

#SQLNET.AUTHENTICATION_SERVICES= (NTS)

 

NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)

--------------------------------------------------------------------------------------

 

文件作用:

 

sqlnet.ora文件控制着客户端Oracle NetServices的行为,例如跟踪级别和会话特性。

当客户发出请求时,通过使用tnsnames.ora文件首先解析Oracle Net Services的名称。tnsnames.ora文件中的参数将该请求指引到适当的数据库节点。监听器进程监听客户请求,并且将其与一个服务器进程相连接。该请求将被处理,其结果被返回到客户端机器。

 

官方文档:

The sqlnet.ora file is the profileconfiguration file. It resides on the client machines and the database server.Profiles are stored and implemented using this file. The database server can beconfigured with access control parameters in the sqlnet.ora file. These parameters specify whether clients are allowed ordenied access based on the protocol.

The sqlnet.ora file enables you to do thefollowing:

Specify the client domain to append tounqualified names

Prioritize naming methods

Enable logging and tracing features

Route connections through specificprocesses

Configure parameters for external naming

Configure Oracle Advanced Security

Use protocol-specific parameters torestrict access to the database

By default, the sqlnet.ora file is locatedin the ORACLE_HOME/network/admin directory. The sqlnet.ora file can also bestored in the directory specified by the TNS_ADMIN environment variable.

 

 

参数解释:

#SQLNET.AUTHENTICATION_SERVICES= (NTS)

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

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

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

 

表示可以采用os认证,在数据库服务器上,可以利用sqlplus / as sysdba登陆,一般这个配置在windows是没有问题的,但是在unix环境下可能有问题,一般在unix可以去掉这个配置

 

 

NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)

表示首先利用tnsnames进行解析,如果tnsnames解析不到,将使用EZCONNECT连接,EZCONNECT是oracle10g引出的简单连接,连接格式:
不是 sqlplus user/password@192.168.100:1521:orcl

而是 sqlplus user/password@192.168.100:1531/orcl

当然也可以在括号中加入hostname等解析方式

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值