免费注册 查看新帖 |

Chinaunix

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

oracle 10.2在rhel5上的连接问题:不加net服务名不能连,加了服务名就可以 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-07-28 16:52 |只看该作者 |倒序浏览
用oracle用户都可以,但新建的metro就不行;以前用rhel4的时候没有这种情况,请教各位了!

[metro@localhost ~]$ id metro
uid=500(metro) gid=501(oinstall) groups=501(oinstall),502(dba) context=system_u:system_r:unconfined_t
[metro@localhost ~]$ id oracle
uid=501(oracle) gid=501(oinstall) groups=501(oinstall),502(dba) context=system_u:system_r:unconfined_t



[root@localhost ~]# su - metro
[metro@localhost ~]$ sqlplus scdb/scdb

SQL*Plus: Release 10.2.0.1.0 - Production on 星期三 7月 29 08:44:38 2009

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

ERROR:
ORA-01034: ORACLE not available
ORA-27123: unable to attach to shared memory segment
Linux Error: 13: Permission denied


Enter user-name:
[metro@localhost ~]$
[metro@localhost ~]$ sqlplus scdb/scdb@orcl

SQL*Plus: Release 10.2.0.1.0 - Production on 星期三 7月 29 08:44:51 2009

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


Connected to:
Oracle Database 10g Release 10.2.0.1.0 - Production


Session altered.

SQL> exit
Disconnected from Oracle Database 10g Release 10.2.0.1.0 - Production
[metro@localhost ~]$ tnsping orcl

TNS Ping Utility for Linux: Version 10.2.0.1.0 - Production on 29-7月 -2009 08:45:34

Copyright (c) 1997, 2005, Oracle.  All rights reserved.

Used parameter files:
/u01/app/oracle/OraHome_1/network/admin/sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))
OK (10 msec)
[metro@localhost ~]$ cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1       localhost.localdomain   localhost
::1     localhost6.localdomain6 localhost6
[metro@localhost ~]$

论坛徽章:
2
丑牛
日期:2014-06-11 13:55:04ChinaUnix元老
日期:2015-02-06 15:16:14
2 [报告]
发表于 2009-07-28 16:55 |只看该作者
环境变量

论坛徽章:
0
3 [报告]
发表于 2009-07-28 22:16 |只看该作者
一般是和ORACLE相关的环境变量没有设好.
检查一下.

论坛徽章:
0
4 [报告]
发表于 2009-07-29 12:51 |只看该作者
谢谢,解决了。
网上查了一下,是由于权限的问题,$ORACLE_HOME/bin/oracle的权限变了
利用oracle用户将其改为 chmod 6751 $ORACLE_HOME/bin/oracle 就可以了;
至于为什么权限变了,还不清楚,可能在安装的时候有什么地方不对;
反正感觉安装rhel5要比安装rhel4麻烦一点。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP