Oracle用户验证之外部验证

1、概述
Oracle外部验证又称操作系统验证。用户可以在不输入用户名、密码的情况下,连接到数据库。使用外部验证时,依赖于操作系统或者网络验证服务来限制用户对数据库的访问。
启用外部验证,需要在参数文件中,设置OS_AUTHENT_PREFIX参数。OS_AUTHENT_PREFIX定义了一个前缀,默认为ops$。Oracle数据库会在每个操作系统用户名前,添加此前缀。
如:操作系统用户为user1,则Oracle数据库添加前缀后的用户名为ops$user1。
当操作系统用户user1尝试与数据库建立连接时,Oracle数据库会检查数据中是否存在一个对应的数据库用户ops$user1。如果存在,则允许建立连接。
2、实例
OS:redhat AS 4.8
DB:Oracle 10g 

SQL> show parameters os_authent
NAME TYPE VALUE
-------------------------------- ----------- -------------------
os_authent_prefix string ops$
remote_os_authent boolean FALSE
前缀为ops$,因此,在Oracle数据库中建立系统用户Oracle对应的数据库用户,并通过identified externally子句指定使用外部验证。
SQL> create user ops$oracle identified externally;
User created.
SQL> grant connect to ops$oracle;
Grant succeeded.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

当前用户为oracle。
[oracle@oraserver ~]$ id
uid=1001(oracle) gid=1002(oinstall) groups=1001(dba),1002(oinstall)

使用oracle用户登陆(外部验证)
[oracle@oraserver ~]$ sqlplus  /
SQL*Plus: Release 10.2.0.1.0 - Production on Mon Mar 14 10:17:33 2011
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

查看当前用户
SQL> show user;
USER is "OPS$ORACLE"
SQL>



来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/25264937/viewspace-689344/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/25264937/viewspace-689344/

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值