免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2248 | 回复: 1
打印 上一主题 下一主题

Oracle数据库不能使用操作系统认证,高手指教! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-05-29 10:06 |只看该作者 |倒序浏览
[root@db1 ~]# export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1/
[root@db1 ~]# export ORACLE_SID=zddb1
[root@db1 ~]# sqlplus
-bash: sqlplus: command not found
[root@db1 ~]# /u01/app/oracle/product/10.2.0/db_1/bin/sqlplus "/ as sysdba"

SQL*Plus: Release 10.2.0.4.0 - Production on Fri May 29 09:58:12 2009

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

ERROR:
ORA-01031: insufficient privileges



Enter user-name:
ERROR:
ORA-01017: invalid username/password; logon denied

[root@db1 ~]# su - oracle
[oracle@db1 ~]$ export ORACLE_SID=zddb1
[oracle@db1 ~]$ export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1/
[oracle@db1 ~]$ /u01/app/oracle/product/10.2.0/db_1/bin/sqlplus "/ as sysdba"

SQL*Plus: Release 10.2.0.4.0 - Production on Fri May 29 09:59:03 2009

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

Connected to an idle instance.

SQL>

实例已经运行了,但Oracle用户和root用户看到的结果不一样,为什么?

论坛徽章:
0
2 [报告]
发表于 2009-05-29 11:12 |只看该作者
问题已处理!
由于ORACLE_BASE环境变量设置导致数据库连接异常:
[oracle@db1 ~]$ cat .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin
export ORACLE_BASE=/u01/app/oracle/
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export ORA_CRS_HOME=$ORACLE_BASE/product/10.2.0/crs_1
export ORACLE_SID=zddb1
export PATH=$ORACLE_HOME/bin:$ORA_CRS_HOME/bin:$PATH:$HOME/bin

将其设置为“export ORACLE_BASE=/u01/app/oracle”,数据库连接正常。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP