理解SQLNET.AUTHENTICATION_SERVICES参数

本文详细介绍了Oracle SQLNET.AUTHENTICATION_SERVICES参数的作用及其不同设置的影响。通过在Windows和Linux环境下的实测,展示了如何配置该参数来启用不同的认证方式。

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

理解SQLNET.AUTHENTICATION_SERVICES参数

1、官方说明:
SQLNET.AUTHENTICATION_SERVICES
Purpose
Use the parameter SQLNET.AUTHENTICATION_SERVICES to enable one or more authentication services. If authentication has been installed, it is recommended that this parameter be set to either none or to one of the authentication methods.
Default
None
Values
Authentication Methods Available with Oracle Net Services:
·         none for no authentication methods. A valid username and password can be used to access the database.
·         all for all authentication methods
·         nts for  Windows NT native authentication
 
2、测试:
 可以通过对SQLNET.AUTHENTICATION_SERVICES值进行修改查看其影响。
WINDOWNS:
A. sqlnet.ora文件:
 
E:\oracle\product\10.2.0\db_1\NETWORK\ADMIN>dir sqlnet.ora
 驱动器  E 中的卷没有标签。
 卷的序列号是  1CF8-89BB
E:\oracle\product\10.2.0\db_1\NETWORK\ADMIN 的目录
找不到文件
E:\oracle\product\10.2.0\db_1\NETWORK\ADMIN>
 
                             E:\oracle\product\10.2.0\db_1\NETWORK\ADMIN>sqlplus "/ as sysdba"
SQL*Plus: Release 10.2.0.1.0 - Production on 星期二  5 8 20:45:35 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR:
ORA-01031: 权限不足
请输入用户名 :
B.    SQLNET.AUTHENTICATION_SERVICES=NONE)
 
E:\oracle\product\10.2.0\db_1\NETWORK\ADMIN>dir sqlnet.ora
 驱动器  E 中的卷没有标签。
 卷的序列号是  1CF8-89BB
 E:\oracle\product\10.2.0\db_1\NETWORK\ADMIN 的目录
2012-05-08 20:48               266 sqlnet.ora
               1 个文件            266 字节
               0 个目录 1,969,827,840 可用字节
 
E:\oracle\product\10.2.0\db_1\NETWORK\ADMIN>type 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)
E:\oracle\product\10.2.0\db_1\NETWORK\ADMIN>sqlplus "/ as sysdba"
SQL*Plus: Release 10.2.0.1.0 - Production on 星期二  5 8 20:48:53 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR:
ORA-01031: 权限不足
请输入用户名 :
 
C.    SQLNET.AUTHENTICATION_SERVICES=ALL)
 
E:\oracle\product\10.2.0\db_1\NETWORK\ADMIN>type 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 = (ALL)
 
E:\oracle\product\10.2.0\db_1\NETWORK\ADMIN>sqlplus "/ as sysdba"
SQL*Plus: Release 10.2.0.1.0 - Production on 星期二  5 8 20:51:28 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR:
ORA-12641: 验证服务无法初始化
请输入用户名 :
 
D.    SQLNET.AUTHENTICATION_SERVICES=NTS)
 
E:\oracle\product\10.2.0\db_1\NETWORK\ADMIN>type 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 = (NTS)
 
E:\oracle\product\10.2.0\db_1\NETWORK\ADMIN>sqlplus "/ as sysdba"
SQL*Plus: Release 10.2.0.1.0 - Production on 星期二  5 8 20:53:49 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
连接到 :
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL>
 
LINUX
A. sqlnet.ora文件:
 
bash-3.00$ ls -l sqlnet.ora
sqlnet.ora: 无此文件或目录
 
bash-3.00$ sqlplus "/ as sysdba"
SQL*Plus: Release 10.2.0.1.0 - Production on Tue May 8 21:11:04 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL>
 
 
B.    SQLNET.AUTHENTICATION_SERVICES=NONE)
 
bash-3.00$ cat sqlnet.ora
SQLNET.AUTHENTICATION_SERVICES = (NONE)
 
bash-3.00$ sqlplus "/ as sysdba"
SQL*Plus: Release 10.2.0.1.0 - Production on Tue May 8 21:13:00 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR:
ORA-01031: insufficient privileges
Enter user-name:
 
C.    SQLNET.AUTHENTICATION_SERVICES=ALL)
 
bash-3.00$ cat sqlnet.ora
SQLNET.AUTHENTICATION_SERVICES = (ALL)
 
bash-3.00$ sqlplus "/ as sysdba"
SQL*Plus: Release 10.2.0.1.0 - Production on Tue May 8 21:13:59 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL>
 
D.    SQLNET.AUTHENTICATION_SERVICES=NTS)
 
bash-3.00$ cat sqlnet.ora
SQLNET.AUTHENTICATION_SERVICES = (NTS)
 
bash-3.00$ sqlplus "/ as sysdba"
SQL*Plus: Release 10.2.0.1.0 - Production on Tue May 8 21:15:05 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR:
ORA-01031: insufficient privileges
Enter user-name:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值