jdbc:oracle:thin:@localhost:1521:orcl和jdbc:oracle:thin:@localhost:1521/orcl的区别
来源:互联网 发布:矩阵归一化处理公式 编辑:程序博客网 时间:2024/06/05 17:38
jdbc连接oracle有两种方式,一种使用thin连接另一种使用oci(Oracle Call Interface )连接。thin驱动都是纯Java代码,使用TCP/IP技术通过Java的Socket连接Oracle数据库。对于使用oci必须安装Oracle客户端。
常用的连接url格式,格式一:Oracle JDBC Thin using an SID;jdbc:oracle:thin:@host:port:SID;例如
jdbc:oracle:thin:@localhost:1521:orcl或者jdbc:oracle:thin:@localhost:1521:XE
XE是精简版Oracle的默认数据库名。格式二:Oracle JDBC Thin using a ServiceName;jdbc:oracle:thin:@//host:port/service_name
;例如 jdbc:oracle:thin:@//localhost:1521/orcl.db.com。格式三:Oracle JDBC Thin using a TNSName;jdbc:oracle:thin:@TNSName;例如 jdbc:oracle:thin:@TNS_ALIAS_NAME。
所以,这两个url是不同格式的写法,格式二是Oracle推荐的格式,因为对于集群来说,每个节点的SID是不一样的,但是SERVICE_NAME却可以包含所有节点。
阅读全文
4 0
- jdbc:oracle:thin:@localhost:1521:orcl和jdbc:oracle:thin:@localhost:1521/orcl的区别
- 关于解决No suitable driver found for jdbc:oracle:thin:@//localhost:1521/orcl的问题
- 关于解决No suitable driver found for jdbc:oracle:thin:@//localhost:1521/orcl的问题
- jdbc:oracle:thin:@192.168.3.98:1521:orcl
- 调试经验-java.sql.SQLException: No suitable driver found for jdbc:oracle:thin:@localhost:1521:orcl
- java.sql.SQLException: No suitable driver found for jdbc:oracle:thin:@localhost:1521:ORCL
- jsp连接oracle数据库时报错: No suitable driver found for jdbc:oracle:thin:@localhost:1521:orcl,解决方法
- jdbc:oracle:thin:@192.168.3.98:1521:orcl(详解)
- jdbc:oracle:thin:@192.168.3.98:1521:orcl(详解)
- jdbc:oracle:thin:@192.168.3.98:1521:orcl(详解)
- jdbc:oracle:thin:@192.168.3.98:1521:orcl(详解)
- jdbc:oracle:thin:@192.168.3.98:1521:orcl(详解)
- jdbc:oracle:thin:@ip:1521:orcl(详解)
- jdbc:oracle:thin:@192.168.3.98:1521:orcl(详解)
- jdbc:oracle:thin:@localhost:1521:mydb,"book","test"
- url=jdbc:oracle:thin:@localhost:1521:dfdorfdfclrtrt
- 关于oracle实例即localhost:1521/orcl中的orcl
- SSH框架Cannot create JDBC driver of class '' for connect URL 'jdbc:oracle:thin:@localhost:1521:你的数据库名'
- extjs的ComboBox如何触发点击事件
- Apue第三章
- React Native探索(五)使用fetch进行网络请求
- 【12.2】c++ primer plus 课后编程答案
- 使用git时怎样忽略某一个文件
- jdbc:oracle:thin:@localhost:1521:orcl和jdbc:oracle:thin:@localhost:1521/orcl的区别
- java实现排序 九大算法
- Tarjan模板小研究
- Ubuntu 16.04 关于双显卡的NVIDIA驱动及cuda tookit8.0安装小结
- Spring的IOC,DI浅析
- NodeMcu使用WS2812
- 【HTML+CSS实战】商城网页前端
- 前向最大匹配分词FMM
- 自定义adapter