http://download.oracle.com/docs/cd/B28359_01/java.111/b31224/urls.htm#BEIDHCBA
Syntaks for tjenestenavne i tynd stil
Tjenestenavne i tynd stil understøttes kun af JDBC Thin-driveren. Syntaksen er:
@//host_name:port_number/service_name
For eksempel:
jdbc:oracle:thin:scott/[email protected]//myhost:1521/myservicename
Så jeg ville prøve:
jdbc:oracle:thin:@//oracle.hostserver2.mydomain.ca:1522/ABCD
I henhold til Robert Greathouses svar kan du også angive TNS-navnet i JDBC URL'en som nedenfor:
jdbc:oracle:thin:@(DESCRIPTION =(ADDRESS_LIST =(ADDRESS =(PROTOCOL=TCP)(HOST=blah.example.com)(PORT=1521)))(CONNECT_DATA=(SID=BLAHSID)(GLOBAL_NAME=BLAHSID.WORLD)(SERVER=DEDICATED)))