Oracle连接 Oracle 的OCI Driver 和 Thin Driver的区别

优刻得首个「国产千卡智算集群」落地,支持智源千亿大模型训练 在人工智能引领的时代浪潮中,算力已成为技术进步与创新的核心驱动力。面对当下AI算力需求的飙升、高端AI芯片供应受限的挑战,加之OpenAI带来的技术封锁,唯有坚定不移的发展自主可控的国产技术方案,持续壮大国产智算集群规模,才能一路突破围追堵截,进一步促进国产大模型产业生态繁荣。集群还提供了完善高效的软件栈工具,集成多种主流的深度学习编程框架,通过测试验证,确保了对行业领先人工智能模型的高效支持,做到开箱即用,用户可快速投入模型的开发和部署,加速了其在人工智能领域的布局和发展。方面取得了显著成效。 阅读详情
我是今天看到tomcat数据源的配置时,想起来这个问题,刚开始还不晓得thin是什么东西!

  database.url=jdbc:oracle:thin:angel/oracle@192.168.55.11:1530:monitordb

  经过上网查询,得到如下结果:

  jdbc:oracle连接的是oracle数据库

  thin是一种方法

  angel/oracle那个angel是用户名,oracle是密码

  192.168.55.11是你要连的电脑ip

  1530是oracle的连端口(1521貌似是默认端口)

  monitordb这是数据库的名字

  下面是我转载的文章,是关于tomcat数据源中oracle的oci和thin区别:

  前几天同事跑过来跟我说, 机房中的一台tomcat服务器跟oracle数据库机连接很慢,查看控制台中的hibernate日志, 基本上是一条sql出来要等个1-2秒再出第二条。但同样的程序在他自己机器上的tomcat运行,同样是连那台数据库机器,就快很多,不会出现前面的每执行1条sql就卡一次壳的情况。

  初步分析,我就想到可能是网络原因, 机房两台机器连接不畅通, 程序和机器差的原因基本可以排除, 机房的tomcat机比我们开发机要强多了, 而且程序在他的机器上运行又没有问题。于是我就劝他到机房去检查一下网络状态, 但他一时也无法进入,因为机房的管理人员不在。

  过了一会, 他告诉我问题解决了, 把数据库访问的url更换成了oci方式就好了, oci对我来说有些陌生, 我一直是用的thin,也没想过其他连接方式。对于oci我也只能想到oracle 的client中貌似是有oci什么的,当时有其他事情也没管了。

  今天有意了解一下区别,先看看thin和oci的url写法上的区别:jdbc:oracle:thin:@server ip: service jdbc:oracle:oci:@service看来oci的还更加简洁,ip可以省掉不写了。

  接下来再找找oci和thin的其他区别,发现有如下解释:引用

  Oracle provides four different types of JDBC drivers, for use in different deployment scenarios. The 10.1.0 drivers can access Oracle 8.1.7 and higher. While all Oracle JDBC drivers are similar, some features apply only to JDBC OCI drivers and some apply only to the JDBC Thin driver.

  JDBC OCI client-side driver: This is a JDBC Type 2 driver that uses Java native methods to call entrypoints in an underlying C library. That C library, called OCI (Oracle Call Interface), interacts with an Oracle database. The JDBC OCI driver requires an Oracle client installation of the same version as the driver.

  The use of native methods makes the JDBC OCI driver platform specific. Oracle supports Solaris, Windows, and many other platforms. This means that the Oracle JDBC OCI driver is not appropriate for Java applets, because it depends on a C library.

  Starting from 10.1.0, the JDBC OCI driver is available for install with the OCI Instant Client feature, which does not require a complete Oracle client-installation. Please refer to Oracle Call Interface for more information.

  JDBC Thin client-side driver: This is a JDBC Type 4 driver that uses Java to connect directly to Oracle. It implements Oracle's SQL*Net Net8 and TTC adapters using its own TCP/IP based Java socket implementation. The JDBC Thin driver does not require Oracle client software to be installed, but does require the server to be configured with a TCP/IP listener.

  Because it is written entirely in Java, this driver is platform-independent. The JDBC Thin driver can be downloaded into any browser as part of a Java application. (Note that if running in a client browser, that browser must allow the applet to open a Java socket connection back to the server.)

  JDBC Thin server-side driver: This is another JDBC Type 4 driver that uses Java to connect directly to Oracle. This driver is used internally within the Oracle database. This driver offers the same functionality as the client-side JDBC Thin driver (above), but runs inside an Oracle database and is used to access remote databases.

  Because it is written entirely in Java, this driver is platform-independent. There is no difference in your code between using the Thin driver from a client application or from inside a server.

  连接方式有以下几种:

  Oralce provides four types of JDBC driver.

  Thin Driver, a 100% Java driver for client-side use without an Oracle installation, particularly with applets. The Thin driver type is thin. To connect user scott with password tiger to a database with SID (system identifier) orcl through port 1521 of host myhost, using the Thin driver, you would write :Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@myhost:1521:orcl", "scott", "tiger");

  OCI Driver for client-side use with an Oracle client installation. The OCI driver type is oci. To connect user scott with password tiger to a database with SID (system identifier) orcl through port 1521 of host myhost, using the OCI driver, you would write :Connection conn = DriverManager.getConnection("jdbc:oracle:oci:@myhost:1521:orcl", "scott", "tiger");

  Note that you can also specify the database by a TNSNAMES entry. You can find the available TNSNAMES entries listed in the file tnsnames.ora on the client computer from which you are connecting. For example, if you want to connect to the database on host myhost as user scott with password tiger that has a TNSNAMES entry of MyHostString, enter:Connection conn = DriverManager.getConnection("jdbc:oracle:oci8:@MyHostString","scott","tiger");

  If your JDBC client and Oracle server are running on the same machine, the OCI driver can use IPC (InterProcess Communication) to connect to the database instead of a network connection. An IPC connection is much faster than a network connection. Connection conn = DriverManager.getConnection("jdbc:oracle:oci8:@","scott","tiger");

  Server-Side Thin Driver, which is functionally the same as the client-side Thin driver, but is for code that runs inside an Oracle server and needs to access a remote server, including middle-tier scenarios. The Server-Side Thin driver type is thin and there is no difference in your code between using the Thin driver from a client application or from inside a server. Server-Side Internal Driver for code that runs inside the target server, that is, inside the Oracle server that it must access. The Server-Side Internal driver type is kprb and it actually runs within a default session. You are already "connected". Therefore the connection should never be closed. To access the default connection, write:DriverManager.getConnection("jdbc:oracle:kprb:");or:DriverManager.getConnection("jdbc:default:connection:");

  You can also use the Oracle-specific defaultConnection() method of the OracleDriver class which is generally recommended:OracleDriver ora = new OracleDriver();Connection conn = ora.defaultConnection();

  Note: You are no longer required to register the OracleDriver class for connecting with the Server-Side Internal driver, although there is no harm in doing so. This is true whether you are using getConnection() or defaultConnection() to make the connection. Any user name or password you include in the URL string is ignored in connecting to the server default connection. The DriverManager.getConnection() method returns a new Java Connection object every time you call it. Note that although the method is not creating a new physical connection (only a single implicit connection is used), it is returning a new object. Again, when JDBC code is running inside the target server, the connection is an implicit data channel, not an explicit connection instance as from a client. It should never be closed.

  这下基本明白了1)从使用上来说,oci必须在客户机上安装oracle客户端或才能连接,而thin就不需要,因此从使用上来讲thin还是更加方便,这也是thin比较常见的原因。

  2)原理上来看,thin是纯java实现tcp/ip的c/s通讯;而oci方式,客户端通过native java method调用c library访问服务端,而这个c library就是oci(oracle called interface),因此这个oci总是需要随着oracle客户端安装(从oracle10.1.0开始,单独提供OCI Instant Client,不用再完整的安装client)

  3)它们分别是不同的驱动类别,oci是二类驱动, thin是四类驱动,但它们在功能上并无差异。

  4)虽然很多人说oci的速度快于thin,但找了半天没有找到相关的测试报告

 

 

uniapp - 实现安卓App打包上架应用商店详细教程,详解Hbuilder打包编译apk发布上传到应用市场全流程,提供uniApp云打包、离线打包app、原生本地打包,附带APP备案和安卓证书申请 uni-app,安卓,APP,应用商店,打包编译apk,上架到应用市场,如何打包app并发布到主流应用市场,发布为AndroidApp流程,应用备案,如何申请安卓证书,hbuilder发布安卓apk后怎么上传到各家软件商店,创建app证书,uniapp发行原生APP本地打包安卓APK,详细最全的步骤教程,项目打包成apk,云打包,安心打包,安卓app离线打包,一直审核不通过,被拒绝,不符合规范,上架发布失败,申请安卓证书和获取证书信息,uni-app打包发布安卓Android软件到各大应用商店,腾讯应用 阅读详情

相关推荐

登临科技Goldwasser加速卡Python SDK实战:从环境配置到YOLOv5模型性能压测

本文详细介绍了登临科技Goldwasser加速卡的Python SDK实战指南,从环境配置到YOLOv5模型性能压测的全过程。通过驱动安装、SDK环境搭建、模型转换与推理优化等步骤,帮助开发者高效利用AI加速卡提升深度学习模型性能。重点分享了批量推理压测技巧和常见问题解决方案,助力开发者充分发挥Goldwasser加速卡的算力优势。

weixin_29035147的博客 301

oracle的oci和thin区别

我是今天看到tomcat数据源的配置时,想起来这个问题,刚开始还不晓得thin是什么东西!   database.url=jdbc:oracle:thin:angel/oracle@192.168.55.11:1530:monitordb   经过上网查询,得到如下结果:

a385833253的专栏 613

数据产品需求文档(PRD)怎么写?阿里P8分享的模板+5个避坑点

作用:记录文档的版本、作者、评审信息,避免“文档混乱”。填写规范字段说明示例文档名称清晰反映产品名称,如“用户行为分析平台PRD”用户行为分析平台PRD_V1.0文档版本用“版本号+日期”,如V1.0_20240301编写人数据产品经理姓名+联系方式张三(138-XXXX-XXXX)评审人员业务负责人、开发经理、数据分析师、运维负责人李四(业务)、王五(开发)、赵六(数据)、周七(运维)评审时间评审日期2024-03-05评审意见。

架构师的AI之路,分享AI应用开发架构的学习与实践。 1575

oracle的驱动的功能吗,oralce的各种数据库驱动程序的区别

weblogic数据源配置时,数据库类型是oralce的各种数据库驱动程序的区别第一种:JDBC Thin驱动:thin是for thin client的意思,这种驱动一般用在运行在WEB浏览器中的JAVA程序。它不是通过OCI or Net8,而是通过Java sockets进行通信,是纯java实现的驱动,因此不需要在使用JDBC Thin的客户端机器上安装orcale 客户端软件,所以有很好...

weixin_39606003的博客 392

【CubeMX】STM32G474 HRTIM 死区时间与互补PWM实战解析

本文深入解析STM32G474的HRTIM高分辨率定时器在互补PWM生成与死区时间配置中的应用。通过CubeMX工具详细演示时钟配置、单路PWM基础、互补输出与死区时间设置,并结合逆变器等电力电子实战案例,帮助开发者避免直通风险,优化系统性能。

efc12345678的博客 746

安装Quartus-II 13 和Modelsim

目录一、Quartus-II安装1.Quartus-II 13下载2.Quartus-II 13安装3.Quartus-II 13注册二、Modelsim安装 实验目的:安装Quartus-II 13 和Modelsim 实验环境:Windows10 参考资料:Quartus-II安装及使用 一、Quartus-II安装 1.Quartus-II 13下载 正点原子官方资料下载 百度网盘下载链接: https://pan.baidu.com/s/1a9d-bq9RZmWrRV542X4IEA 提取码:

qqq080的博客 8628

thin driver连接 Oracle RAC jdbcUR写法

jdbc:oracle:thin:@(description=(address_list= (address=(host=x1) (protocol=tcp)(port=1521))(address=(host=x2)(protocol=tcp) (port=1521)) (load_balance=yes)(failover=yes))(connect_data=(servic...

iteye_14791的博客 279

电源防反接保护电路全攻略实战A04

本文深入剖析了硬件设计中电源保护电路的关键技术与实战经验。文章指出,保护电路虽小但至关重要,通过对比分析二极管与MOSFET防反接方案,揭示了MOSFET在效率、温控方面的优势。针对过压保护,重点讲解了TVS二极管选型要点,强调钳位电压而非击穿电压才是保护核心。文章结合工业案例(如48V通信模块烧毁、5V系统MOSFET过热等),详细阐述了PCB布局规范、热设计路径等工程细节,并提供了USB接口ESD防护的完整选型方案。最后强调硬件设计必须考虑最坏工况,在成本与性能间找到平衡点,避免因小失大。

启芯硬件的博客 777

ORACLE驱动thin方式动态切换客户端字符集实现

为什么80%的码农都做不了架构师?>>> ...

weixin_33672109的博客 883

【unity实战】Cinemachine虚拟相机实战,使用InputSystem+Cinemachine+CharacterController复刻各种主流游戏的相机控制

这里主要是探讨如何使用InputSystem+Cinemachine+CharacterController复刻各种主流游戏的相机控制,我们主要专注Cinemachine实战效果,所以并不会深入讨论Cinemachine和CharacterController比较细节的参数介绍。注意:前面为了测试方便,我还是先用的旧的输入系统代替InputSystem【推荐100个unity插件之10】Unity最全的最详细的Cinemachine(虚拟相机系统)介绍,详细案例讲解,快速上手。

向宇的博客,专注php/web全栈 unity游戏开发,欢迎大家评论纠错 3751

计算机视觉学习路线图:从入门到专家

计算机视觉学习路线图:从入门到专家​ ,人工智能,计算机视觉,大模型,AI,计算机视觉学习路线图从七方面展开。先强调数学基础,含线性代数、概率统计和微积分;接着介绍 Python、OpenCV 等编程语言与工具;涵盖边缘检测、特征提取等经典算法;阐述深度学习中 CNN 结构、经典模型及实现;涉及目标检测、图像分割等高级专题;包含图像分类、目标检测和人脸识别等项目实战;最后提及科研进阶的论文阅读、项目参与和论文发表,助学习者从入门到专家。

不踩坑,不知道坑有多深;不总结,踩过的坑白踩。 7万+

Oracle的thin驱动和oci驱动有什么不同?哪个性能好些?

OCI:要安装ORACLE客户端,移植性略差,理论上性能好些 THIN:属于TYPE4,纯JAVA实现,移植性好,理论上性能略差些 推荐:最好还是使用THIN   DRIVER吧,移植性好些,使用起来也相对规范些,问题也少。至于性能嘛,说实话,在8i上没感觉THIN   DRIVER比OCI慢,感觉还快些。不过没有实际准确测试过,也不敢下定论。为什么呢,调用本地方法也是有开销的,JDK性能越来越好...

weixin_33797791的博客 178

PCL 区域生长分割【2026最新版】

区域生长算法原理介绍、代码实现以及一个具体实验场景的应用案例进一步实现将分割结果的分类保存至本地文件夹。最近一次更新时间为:2026年5月4日。

点云侠的博客 40万+

oracle9i oci driver,Oracle连接 Oracle 的OCI Driver 和 Thin Driver的区别

我是今天看到tomcat数据源的配置时,想起来这个问题,刚开始还不晓得thin是什么东西!database.url=jdbc:oracle:thin:angel/oracle@192.168.55.11:1530:monitordb经过上网查询,得到如下结果:jdbc:oracle连接的是oracle数据库thin是一种方法angel/oracle那个angel是用户名,oracle是密码192....

weixin_35448391的博客 457

蓝牙模块HM-10手册

蓝牙模块HM-10手册,该手册对蓝牙模块HM-10进行了详细的介绍和使用方法以及一些AT指令。

Statistics and Machine Learning Toolbox

Statistics and Machine Learning Toolbox(带书签),MATLAB统计学习工具

jdba怎么连接mysql_Java开发Oracle数据库连接JDBC Thin Driver 的三种方法

oracle的jdbc驱动三种主要分类:1、jdbc oci: oci是oracle call interface的缩写,此驱动类似于传统的odbc 驱动。因为它需要oracle call interface and net8,所以它需要在运行使用此驱动的java程序的机器上安装客户端软件,其实主要是用到orcale客户端里以dll方式提供的oci和服务器配置。2、jdbc thin: thin是...

weixin_35853254的博客 886

迈瑞BS系列全自动生化分析仪LIS协议接口手册(内含HL7和ASTM)

迈瑞BS系列全自动生化分析仪LIS协议接口手册,内含HL7和ASTM)

java jdbc oracle连接数据库,Java开发Oracle数据库连接JDBC Thin Driver 的三种方法

Oracle的jdbc驱动三种主要分类:1、JDBC OCI: oci是oracle call interface的缩写,此驱动类似于传统的ODBC 驱动。因为它需要Oracle Call Interface and Net8,所以它需要在运行使用此驱动的JAVA程序的机器上安装客户端软件,其实主要是用到orcale客户端里以dll方式提供的oci和服务器配置。2、JDBC Thin: thin是...

weixin_28914101的博客 354

假人有限元模型

假人模型,车辆碰撞假人有限元模型,适合做乘员安全的研究者利用

Oracle的OCI和Thin区别

Oracle的OCI和Thin区别: 1)连接 jdbc:oracle:thin:@server ip: service jdbc:oracle:oci:@service 2)从使用上来说,oci必须在客户机上安装oracle客户端或才能连接,而thin就不需要,因此

Chen_Weihappy_love的专栏 1377

oracle jdbc thin 区别,JDBC驱动oci和thin区别

thin和oci和oracle数据库系统的架构图JDBC Thin DriverThe JDBC Thin driver is a pure Java, Type IV driver that can be used in applications and applets. It is platform-independent and does not require any additiona...

weixin_39583521的博客 663

thin 和 oci两种方法连接oracle数据库 比较

the JDBC thin driver provides the only way to access Oracle from the Web (applets). It is smaller and slower than the OCI drivers. the JDBC oci driver :One must have Net8 (SQL*Net) installed and

shunan的专栏 1801

Oracle开发jdbc thin与 oci 连接方式 区别

theme: smartblue 一、jdbc thin 1.1 定义 thin就是纯粹用Java写的ORACLE数据库访问接口 瘦客户端的连接方式,采用这种连接方式不需要安装oracle客户端,只要求包含jdbc驱动的jar包就行。 1.2 实现 参考: JDBC连接Oracle数据库(一)-优快云博客 ``` import java.sql.Connection; impo...

xy的博客 538

oracle的database.url,Oracle的数据库访问Url: oci 和 thin 的区别

//看看thin和oci的url写法上的区别: jdbc:oracle:thin:@server ip: service jdbc:oracle:oci:@service /*1)从使用上来说,oci必须在客户机上安装oracle客户端或才能连接,而thin就不需要,因此从使用上来讲thin还是更加方便,这也是thin比较常见的原因。 2//看看thin和oci的url写法上的区别:jdbc:or...

weixin_29920697的博客 753

JDBC驱动oci和thin区别

JDBC驱动oci和thin区别

lyc417356935的专栏 4282

java oracle数据库连接驱动_Java开发Oracle数据库连接JDBC Thin Driver 的三种方法

Oracle的jdbc驱动三种主要分类:1、JDBC OCI: oci是oracle call interface的缩写,此驱动类似于传统的ODBC 驱动。因为它需要Oracle Call Interface and Net8,所以它需要在运行使用此驱动的JAVA程序的机器上安装客户端软件,其实主要是用到orcale客户端里以dll方式提供的oci和服务器配置。2、JDBC Thin: thin是...

weixin_32098487的博客 1160

oracle连接数据的oci和thin的区别

1)从使用上来说,oci必须在客户机上安装oracle客户端或才能连接,而thin就不需要,因此从使用上来讲thin还是更加方便,这也是thin比较常见的原因。2)原理上来看,thin是纯java实现tcp/ip的c/s通讯;而oci方式,客户端通过native java method调用c library访问服务端,而这个c library就是oci(oracle called interfac...

weixin_34244102的博客 252

java oracle jdbc 连接_Java开发Oracle数据库连接JDBC Thin Driver 的三种方法

Oracle的jdbc驱动三种主要分类:1、JDBC OCI: oci是oracle call interface的缩写,此驱动类似于传统的ODBC 驱动。因为它需要Oracle Call Interface and Net8,所以它需要在运行使用此驱动的JAVA程序的机器上安装客户端软件,其实主要是用到orcale客户端里以dll方式提供的oci和服务器配置。2、JDBC Thin: thin是...

weixin_39629876的博客 327

thin和oci连接oracle数据库的区别

jdbc:oracle:thin:@localhost:1521:orcl    只需要有oracle 的 jar 就可以了 ,只要加到classpath 就可以访问数据库了   瘦客户端 jdbc:oracle:oci:@localhost:1521:orcl   除了需要jar 包  还必须有oracle的 客户端    这种方式 相对来说 麻烦一点   但是 性能很好  性能要求非常高的系

shuishaleai的博客 296
上一篇: 统一IE和世界之窗的User Agent标示(重启后生效)是什么意思啊
下一篇: 利用Eclipse进行重构(上 下)
贼船叔叔
博客等级 码龄16年 241粉丝 101原创
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值