Chinaunix首页 | 论坛 | 博客
  • 博客访问: 6547867
  • 博文数量: 1005
  • 博客积分: 8199
  • 博客等级: 中将
  • 技术积分: 13071
  • 用 户 组: 普通用户
  • 注册时间: 2010-05-25 20:19
个人简介

脚踏实地、勇往直前!

文章分类

全部博文(1005)

文章存档

2020年(2)

2019年(93)

2018年(208)

2017年(81)

2016年(49)

2015年(50)

2014年(170)

2013年(52)

2012年(177)

2011年(93)

2010年(30)

分类: Oracle

2012-10-18 21:59:03

环境:
OS:Windows 2003
DB:10.2.0.1
 
  今天在O文档中看到有关OS认证用户的章节,按自己的理解做了如下验证.
 
1.查看OS验证用户的前缀
SQL> show parameter os_authent_prefix;
NAME                        TYPE        VALUE
--------------------------- ----------- --------
os_authent_prefix           string      ops$
 
2.创建OS验证用户并授予相应的权限
SQL> create user ops$administrator identified externally;
 
User created.
 
SQL> grant connect, resource to ops$oracle;
 
Grant succeeded.
 
注意这里的administrator是OS的账号名,若你以其他用户登录OS的,如zhangsan,则创建的账号是ops$zhangsan.
 
3.将remote_os_authent参数设置为true
SQL>alter system set remote_os_authent=true scope=spfile;
SQL>shutdown immedate
SQL>startup
 
4.OS账号登录,这里不用输入用户名和密码
C:\Documents and Settings\Administrator>sqlplus
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Oct 18 21:56:21 2012
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> create table tb_tt(id number);
Table created.
SQL> show user;
USER is "OPS$ADMINISTRATOR"
SQL>
 
这里的ORACL是连接到服务器的连接串,要使OS验证用户登录的前提还必须使sqlnet.ora文件中的#SQLNET.AUTHENTICATION_SERVICES = (NTS)注释掉,或是设置成SQLNET.AUTHENTICATION_SERVICES = (none)
 
-- The End --
阅读(4448) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

中国物讯网112012-10-19 14:23:55

膜拜。。。。