Oracle Easy Connect Naming method

在Oracle 10g中,Oracle还提供了一种称为“Oracle Easy Connect Naming method"
的连接方式。这种方法是对hostnaming method的一种改进,因为hostnaming method
只能使用缺省的1521 port,而Oracle Easy Connect Naming method则可以指定自己的
port.
配置Oracle Easy Connect Naming method基本要求:

1)Oracle 10g Net Serrices必须安装在client端

2)在服务端和客户端必须同时支持TCP/IP协议

3)使用这种连接方式,不支持比较高级的连接符,比如连接池和外部过程
调用(external procedure calls)


语法比较简单:只需要按照如下的格式指定HOST:PORT/SERVICE_NAME就可以了。
但如果通过url连接的话,
需要在@后面增加2个反斜杠"//"

比如:

sqlplus study/study@localhost:1522/study

sqlplus study/study@//10.10.10.1/study


备注:
1)如果使用默认port,可以不指定:PORT部分,直接HOST/SERVICE_NAME

2)在10g中当安装了Oracle Net后,这种连接方式被自动配置

3)对应sqlnet.ora中names.diretory_path中的方法EZCONNECT


NAMES.DIRECTORY_PATH= (TNSNAMES,EZCONNECT,HOSTNAME)


下面测试一下看看。


C:sqlplus study/study@ 127.0.0.1:1521/study

SQL*Plus: Release 10.2.0.1.0 - Production on 星期一 6月 11 16:52:44 2007

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

连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> exit
从 Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options 断开

C:sqlplus study/study@ 127.0.0.1/study

SQL*Plus: Release 10.2.0.1.0 - Production on 星期一 6月 11 16:52:51 2007

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


连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> exit
从 Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options 断开

C:

:STUDY是Service_name

http://tomszrp.itpub.net/post/11835/294062

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

转载于:http://blog.itpub.net/12361284/viewspace-620303/

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值