jdbc连接数据库使用sid和service_name的区别

格式一: Oracle JDBC Thin using a ServiceName:

jdbc:oracle:thin:@//10.90.130.99:1521/s_rptdb (s_rptdb是oracle数据库的服务名servicename)

格式二: Oracle JDBC Thin using an SID:

jdbc:oracle:thin:@10.90.130.99:1521:s_rptdb2 (s_rptdb2是oracle数据库的实例名SID)

格式三:Oracle JDBC Thin using a TNSName: (不常用)
jdbc:oracle:thin:@<TNSName>
Example: jdbc:oracle:thin:@GL (tnsname要安装oracle客户端,在tnsnames.ora配置)
Note:
Support for TNSNames was added in the driver release 10.2.0.1


原文链接:https://blog.csdn.net/yanqing_yq/article/details/97402069

posted @ 2020-01-08 10:04  长途跋涉的孤狼  阅读(805)  评论(0编辑  收藏  举报