oracle的三种连接方式

1.通过sid

jdbc:oracle:thin:@host:port:SID 
Example: jdbc:oracle:thin:@localhost:1521:sid_test

 

2.通过serviceName

jdbc:oracle:thin:@host:port/service_name 或 jdbc:oracle:thin:@//host:port/service_name 

Example:jdbc:oracle:thin:@localhost:1521/serviceName_test 或 jdbc:oracle:thin:@//localhost:1521/serviceName_test

 

3.通过TNSName 

dbc:oracle:thin:@TNSName 
Example: jdbc:oracle:thin:@TNSName_test

posted @ 2018-07-06 17:47  Mark_Luo  阅读(9850)  评论(1编辑  收藏  举报