oracle 登录非系统用户,非Oracle用户使用操作系统验证登陆(/ as sysdba)
之前写过一篇blog《新用户使用sqlplus / as sysdba登录报错》http://blog.csdn.net/bisal/article/details/9285087
今天碰巧看到一篇推荐的帖子《新建一个用户(非oracle),在不赋予dba所属组的情况下,不能使用操作系统验证》
http://www.itpub.net/thread-1811278-1-1.html,也是按照实际操作的流程解释了处理的方法,很实际。
总结起来,使用非oracle用操作系统验证登录,需要做的:
1、设置相关环境变量;
2、将用户添加到dba组中;
3、用户具有$ORACLE_HOME相关路径(尤其是bin)文件的执行权限。
但上次调试一个测试库,创建非Oracle安装用户时也试了如上方法,但未奏效,肯定哪里还有点问题,找个时间再看看了要。
转:
新建一个用户(非oracle),在不赋予dba所属组的情况下,不能使用操作系统验证
[grid@dbaup ~]$ id
uid=1002(grid)gid=1003(grid) 组=1003(grid)
[grid@dbaup ~]$export ORACLE_BASE=/u01/oracle
[grid@dbaup ~]$export ORACLE_HOME=$ORACLE_BASE/product/11.0.2.1
[grid@dbaup ~]$export ORACLE_SID=gbk11g
[grid@dbaup ~]$export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
[grid@dbaup ~]$export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
--linux默认SQLNET.AUTHENTICATION_SERVICES=beq ,操作系统和密码验证都能使用,我下边并没有设none
[grid@dbaup ~]$ cat/u01/oracle/product/11.0.2.1/network/admin/sqlnet.ora
# sqlnet.ora NetworkConfiguration File: /u01/oracle/product/11.0.2.1/network/admin/sqlnet.ora
# Generated byOracle configuration tools.
NAMES.DIRECTORY_PATH=(TNSNAMES, EZCONNECT)
ADR_BASE =/u01/oracle
--操作系统认证报ORA-01031: insufficient privileges
[grid@dbaup ~]$sqlplus / as sysdba
SQL*Plus: Release11.2.0.1.0 Production on Tue Aug 20 21:39:04 2013
Copyright (c) 1982,2009, Oracle. All rights reserved.
ERROR:
ORA-01031:insufficient privileges
Enter user-name:
新开一个窗口(窗口2),为grid用户添加dba附加组
[root@dbaup ~]# idgrid
uid=1002(grid)gid=1003(grid) 组=1003(grid),1001(dba)
在窗口1重新登录gird用户,查看grid用户已经有dba附加组了
[gird@dbaup ~]$ exit
logout
[root@dbaup bin]# su- grid
[grid@dbaup ~]$ id
uid=1002(grid)gid=1003(grid) 组=1003(grid),1001(dba)
--重新设置环境变量
[grid@dbaup ~]$export ORACLE_BASE=/u01/oracle
[grid@dbaup ~]$export ORACLE_HOME=$ORACLE_BASE/product/11.0.2.1
[grid@dbaup ~]$export ORACLE_SID=gbk11g
[grid@dbaup ~]$export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
[grid@dbaup ~]$export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
--登录操作系统验证成功
[grid@dbaup ~]$sqlplus / as sysdba
SQL*Plus: Release11.2.0.1.0 Production on Tue Aug 20 21:42:36 2013
Copyright (c) 1982,2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11gEnterprise Edition Release 11.2.0.1.0 - 64bit Production
With thePartitioning, OLAP, Data Mining and Real Application Testing options
SQL>
为什么会出现这种情况呢?
[root@dbaup ~]# find/ -group dba
/u01/oracle/product/11.0.2.1/dbaup_gbk11g/sysman/log
/u01/oracle/product/11.0.2.1/dbaup_ora11g/sysman/log
find:“/proc/20062/task/20062/fd/5”: 没有那个文件或目录
find:“/proc/20062/task/20062/fdinfo/5”: 没有那个文件或目录
find:“/proc/20062/fd/5”: 没有那个文件或目录
find:“/proc/20062/fdinfo/5”: 没有那个文件或目录
--发现/u01/oracle/product/11.0.2.1/dbaup_gbk11g/sysman/log所属组是dba,并且other没有任何权限
[root@dbaup ~]# ls-l /u01/oracle/product/11.0.2.1/dbaup_gbk11g/sysman/log
总用量 5604
-rw-r-----. 1 oracleoinstall 0 6月 322:19 emagentfetchlet.log
-rw-r-----. 1 oracleoinstall 0 6月 322:19 emagentfetchlet.trc
-rw-r-----. 1 oracleoinstall 956 7月 29 17:04 emagent.log
-rw-r-----. 1 oracleoinstall 39430 7月 29 17:10 emagent_perl.trc
-rw-r-----. 1 oracleoinstall 757974 7月 29 18:49 emagent.trc
-rw-r-----. 1 oracleoinstall 11794 7月 29 18:49 emdb.nohup
-rw-r-----. 1 oracleoinstall 0 6月 322:18 emdctl.log
-rw-r-----. 1 oracleoinstall 3441 7月 29 17:04 emdctl.trc
-rw-r-----. 1 oracleoinstall 2443250 7月 29 18:49 emoms.log
-rw-r-----. 1 oracleoinstall 2443250 7月 29 18:49 emoms.trc
-rw-r-----. 1 oracleoinstall 0 6月 322:21 nfsPatchPlug.log
drwxr-----. 2 oracleoinstall 4096 6月 322:20 pafLogs
-rw-r-----. 1 oracleoinstall 0 6月 322:19 patchAgtStPlugin.log
-rw-r-----. 1 oracleoinstall 5279 6月 322:19 secure.log
[root@dbaup ~]# ls-ld /u01/oracle/product/11.0.2.1/dbaup_gbk11g/sysman/log
drwxr-x---.3 oracle dba 4096 7月 29 17:04/u01/oracle/product/11.0.2.1/dbaup_gbk11g/sysman/log
结论:oracle之外的用户,在打开了操作系统验证的情况下,还需要加入dba组才能使用操作系统验证
oracle 登录非系统用户,非Oracle用户使用操作系统验证登陆(/ as sysdba)相关推荐
- oracle怎么赋予系统权限,讲解Oracle系统中用户权限的赋予和查看
在Oracle数据库系统中,用户权限分为两种(本文不涉及dba或oper的权限,只讲解普通用户的权限),分别是System Privilege系统权限和User Table Privilege用户数据 ...
- oracle登录连接为是什么,oracle里的连接(connection)究竟是指什么
我这里的测试环境使用的是专用连接模式,共享模式略有不同,这个大家可以自己测试观察一下. --记得在pub里曾经有人问到我们在登录db的时候,谁来负责校验用户名和密码?带着 这样一个疑问来看看oracl ...
- linux php oracle扩展_linux系统下php oracle扩展OCI8的安装与配置
linux系统下php oracle扩展OCI8的安装与配置 实现PHP程序访问oracle DB 时间:2014.09.02 写作者:刘群英(qunyingliu)环境描述:apache版本,PHP ...
- oracle登录时无效的参数,oracle – 使用bash变量时出现Sqlplus登录错误:SP2-0306:无效选项...
我有一个连接到oracle 10g数据库的bash脚本. 在第一步中,它使用以下命令从"config"文件中获取一些变量 . /path/to/my/configfile.ini ...
- Oracle中获取系统当前时间 和 进行时间间隔操作
原文转载至:http://blog.sina.com.cn/s/blog_4ce36a780101b1rl.html 以 年-月-日 时:分:秒 格式获取当前数据库系统时间: select to_ch ...
- oracle 截取时间至小时,Oracle中获取系统当前时间 和 进行时间间隔操作
原文转载至:http://blog.sina.com.cn/s/blog_4ce36a780101b1rl.html 以 年-月-日 时:分:秒 格式获取当前数据库系统时间: select to_ch ...
- oracle如何查询系统变量数据,Oracle如何对IN子查询使用绑定变量(转)
当前位置:我的异常网» 数据库 » Oracle如何对IN子查询使用绑定变量(转) Oracle如何对IN子查询使用绑定变量(转) www.myexceptions.net 网友分享于:2013-0 ...
- oracle登录页面错误,php和oracle的页面登录问题
Conn.php页面: [code=php] $con = oci_connect("finaltest","finaltestpw","(DESCR ...
- oracle中角色和用户权限,ORACLE 权限跟角色
当前位置:我的异常网» 数据库 » ORACLE 权限跟角色 ORACLE 权限跟角色 www.myexceptions.net 网友分享于:2015-08-26 浏览:8次 ORACLE 权限和 ...
最新文章
- ubuntu14.04下使用A3E生成satg配置
- JCP:曝气生物滤池处理焦化废水过程中N2O和NO的产生机理与群落功能研究
- python 模拟微信浏览器请求_使用Chrome修改user agent模拟微信内置浏览器
- 高性能缓存服务器Varnish详解
- Mysql高性能优化规范建议,太厉害了!
- 上海国际区块链赋能传统产业峰会-王伟:道道人才链启动
- VTK:Filtering之SurfaceFromUnorganizedPointsWithPostProc
- 苹果、联想及华硕均看准美国电脑运输的增长
- 广西高职计算机网络技术,计算机网络技术专业考试大纲-广西职业技术学院.DOC...
- bindService过程
- (转)OAuth 2.0的设计思路
- java 异常 出口_java语言中,下列哪一子句是异常处理的出口java语言中,下列哪一子句是异常处理的出口Java语言中,下列哪一子句是异常处理的出口()。...
- bzoj5194: [Usaco2018 Feb]Snow Boots
- 深入理解Nginx:模块开发与架构解析
- DialogFragment与PopWindow
- 自媒体行业的发展和前景
- 《图解密码技术》笔记
- 研发人员提高自身水平促进网络棋牌游戏发展
- vue-cli脚手架安装
- 使用libmp3lame库编码mp3