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

猜你喜欢

转载自www.cnblogs.com/mark-luo/p/9274894.html