Oracle thin JDBC driver中URI的格式:
jdbc:oracle:thin:@::
如果您想在URI中包括用户名和口令的话:
jdbc:oracle:thin:username/password@::
同样的URI还有一个较长的格式:
jdbc:oracle:thin:@(DESCRIPTION =(ADDRESS_LIST =
(ADDRESS=(PROTOCOL=TCP)(HOST =)(PORT=))
(ADDRESS=(PROTOCOL=TCP)(HOST =)(PORT=)))(CONNECT_DATA=(SID =)))
这样就不需要配置TNS了。
转载于:https://www.cnblogs.com/vanuan/archive/2006/02/17/9576178.html