1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| 1.SERVICE_NAME 方式: jdbc:oracle:thin:@ Example: jdbc:oracle:thin:@ 注意这里的格式,@后面有 这种格式是 Oracle 推荐的格式,因为对于集群来说,每个节点的SID 是不一样的, 但是SERVICE_NAME 确可以包含所有节点。 2.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.TNSName 连接方式: jdbc:oracle:thin:@<TNSName> Example: jdbc:oracle:thin:@GL Note: Support for TNSNames was added in the driver release 10.2.0.1``
|