美文网首页
Oracle URL的几种写法

Oracle URL的几种写法

作者: 小胖0_0 | 来源:发表于2020-02-28 20:27 被阅读0次

    1. Oracle JDBC Thin using a ServiceName:

    jdbc:oracle:thin:@//<host>:<port>/<service_name>
    Example: jdbc:oracle:thin:@//192.168.2.1:1521/XE

    注意这里的格式,@后面有//, 这是与使用SID的主要区别。
    这种格式是Oracle 推荐的格式,因为对于集群来说,每个节点的SID 是不一样的,但是SERVICE_NAME 确可以包含所有节点。

    2. Oracle JDBC Thin using an SID:

    jdbc:oracle:thin:@<host>:<port>:<SID>
    Example: jdbc:oracle:thin:192.168.2.1:1521:X01A

    Note: Support for SID is being phased out. Oracle recommends that users switch over to usingservice names.

    3. Oracle JDBC Thin using a TNSName:

    jdbc:oracle:thin:@<TNSName>
    Example: jdbc:oracle:thin:@GL

    相关文章

      网友评论

          本文标题:Oracle URL的几种写法

          本文链接:https://www.haomeiwen.com/subject/auprhhtx.html