【翻译自mos文章】怎么允许特定版本的client 登陆到database中

本文介绍如何通过配置Oracle数据库的sqlnet.ora文件中的SQLNET.ALLOWED_LOGON_VERSION参数来控制允许登录数据库的客户端版本。这有助于限制对数据库的访问并确保安全性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

怎么允许特定版本的client 登陆到database中

来源于:
How to Allow Login to Database Based on the Client Version (文档 ID 402193.1)

适用于:
Oracle Net Services - Version 10.1.0.2 to 12.1.0.2 [Release 10.1 to 12.1]
Information in this document applies to any platform.

目标:
本文的目的是怎么定义一个能连接到database中的最小版本的oracle client。通过指定允许的最小版本,可以限制数据库的访问。
如果一个client不满足或者超过了版本指定,client连接会被拒绝,报错为ora-28040

解决方案:

在sqlnet.ora文件中使用SQLNET.ALLOWED_LOGON_VERSION参数来只指定哪个身份验证协议被client 或者database 允许。
该参数定义了能连接到database中的最小版本的oracle client。该参数从Oracle database 10g中被引入,并取代了init.ora中的参数DB_ALLOWED_LOGON_VERSION

语法:
SQLNET.ALLOWED_LOGON_VERSION = n
默认值为8

允许的值如下:
11 ---对database 11g和database 10g。注意11g和10g 共享了同样的身份验证协议。因此11g的设置允许从10g client登陆
10 --- database 11g和database 10g身份验证协议
9  ---Oracle 9i和更新的身份验证协议
8  ---Oracle 8i和更新的身份验证协议

例子1:
在server端的sqlnet.ora文件中有如下:
SQLNET.ALLOWED_LOGON_VERSION = 9
Version 9 和更新的版本被运行登陆到database中,也就是说:以上参数允许9i、10g、11版本去连接db。8i的client连接db时会报:'ORA-28040: No matching authentication protocol'

 

例子2:
在server端的sqlnet.ora文件中有如下:
SQLNET.ALLOWED_LOGON_VERSION = 10
上面的参数允许10g 和11g client 连接数据库,oracle 9i和8i 访问数据库时遇到ORA-28040

请注意:当你设置该参数为11时,应该特别考虑,如下来自文档:

Oracle Database Net Services Reference 
11g Release 1 (11.1) 

The following excerpt is taken from this reference: 

"Note the following implications of setting the value to 11: 
To take advantage of the password protections introduced in Oracle Database 11g, 
users must change their passwords so that old password verifiers are purged from the system. 
Releases of OCI clients before Oracle Database 10g and all versions of JDBC thin clients 
cannot authenticate to the Oracle database using password-based authentication."

请注意:该参数在oracle database 12c中已经有所改变

The SQLNET.ALLOWED_LOGON_VERSION parameter is deprecated in Oracle Database 12c. 
This parameter has been replaced with two new Oracle Net Services parameters: 

SQLNET.ALLOWED_LOGON_VERSION_SERVER 
SQLNET.ALLOWED_LOGON_VERSION_CLIENT 

See Oracle Database Net Services Reference for information

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值