Oracle中的JDBC Thin连接字符串同时使用冒号和正斜杠 [英] JDBC Thin connection string in Oracle uses both colon and forward slash

查看:2764
本文介绍了Oracle中的JDBC Thin连接字符串同时使用冒号和正斜杠的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道在Oracle中建立连接URL时是否可以在SID中同时使用冒号和正斜杠?

I wanted to know can we use both colon and forward slash with SID in making the connection URL in Oracle?

例如

jdbc:oracle:thin:@<host>:1521:<SID>
jdbc:oracle:thin:@<host>:1521/<SID>

这两个是一样的并且可以工作吗?

Will these two are same and will work?

我正在构建一个适用于Oracle RAC和非RAC环境的应用程序,并且RAC环境使用forward slash支持 SERVICE NAME (服务名称),因此希望检查non RAC环境是否支持forward slash.

I am building an application which will work with both Oracle RAC and non RAC environments and RAC environments supports SERVICE NAME with forward slash so wanted to check will non RAC environment support forward slash .

对于RAC环境,URL就是这样

For RAC environment URL is like this

jdbc:oracle:thin:@<host>:1521/<SERVICENAME>

更新 这是一个不同的问题,因为我想问是否有可能在我们称为OracleJDBCUrl的连接字符串中使用<SID>时同时使用(:/.

Update This is different question because i want to ask is it possible to use both (: and / while using <SID> in the connection String which we call as OracleJDBCUrl .

推荐答案

我能够同时使用冒号:和正斜杠/作为connection URL中的SID,并且能够建立连接. 我认为在Oracle 11g中我们可以做到这一点,而对于Service Name,我们只能使用正斜杠/.

I was able to use both colon : and forward slash / for SID in connection URL and was able get the connection established. I think in Oracle 11g we can do such thing and for Service Name only we can use is forward slash / .

这篇关于Oracle中的JDBC Thin连接字符串同时使用冒号和正斜杠的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆