search
HomeDatabaseMysql Tutorialatitit.客户端连接oracle数据库的方式总结

客户端连接oracle数据库的方式总结 目录 Java程序连接一般使用jar驱动连接。。... 1 桌面GUI一般采取c语言驱动oci.dll1 直接连接... 1 间接连接(需要配置tns及其envi var)... 1 JDBC驱动的4种类型... 1 Java程序连接一般使用jar驱动连接。。 标识字符串为t

客户端连接oracle数据库的方式总结

目录

Java程序连接一般使用jar驱动连接。。... 1

桌面GUI一般采取c语言驱动oci.dll1

直接连接... 1

间接连接(需要配置tns及其envi var)... 1

JDBC驱动的4种类型... 1

Java程序连接一般使用jar驱动连接。。

标识字符串为thin。。。也叫thin驱动。

当然也可以使用oci c类库驱动,标识字符串为oci。不过考虑到jni的调用,层次增多,不一定能提升性能。。

作者老哇的爪子 Attilax 艾龙, EMAIL:1466519819@qq.com
转载请注明来源: http://blog.csdn.net/attilax

桌面GUI一般采取c语言驱动oci.dll

oci是Oracle CallInterface的首字母缩写,使用OCI的驱动可以获得最好的性能,而使用java

thin驱动则可以获取最好的可移植性。

可惜的是plsql,还是toed都没有自带oci.dll。。。。只有navicate 自带了oci驱动,,实际oci.dll只有1M-2M。。

。而oci.dll可以从ora客户端提取,或者HA-Instant Client-v11.2.0.3.0-x86.rar (45M)。。

直接连接

这种方式最好,方便。。。。navicate支持,plsql 只能使用间接连接,toad也好像只能间接连接。。

普通的mysql ,mssql也都是使用直接连接方式,用户体验好。。

间接连接(需要配置tns及其envi var)

相对来说麻烦。。配置集中化管理了,客户端程序很多的情况下有用。。

JDBC驱动的4种类型

1、JDBC-ODBC bridge plus ODBCdriver: JDBC-ODBC桥驱动程序,将JDBC调用转换为ODBC的调用。( This combination provides JDBC access via ODBC drivers. ODBC binarycode--and in many cases, database client code-- must be loaded on each clientmachine that uses a JDBC-ODBC Bridge. Sun provides a JDBC-ODBC Bridge driver,which is appropriate for experimental use and for situations in which no otherdriver is available.)注意, 必须将ODBC二进制代码(许多情况下还包括数据库客户机代码)加载到使用该驱动程序的每个客户机上。这种类型的驱动程序最适合于企业网(这种网络上客户 机的安装不是主要问题),或者是用Java编写的三层结构的应用程序服5、 务器代码。

2、Native-API partly-Java driver: 将JDBC调用转换为对数据库客户端API的调用。(A native-API partly Java technology-enabled driver: This type ofdriver converts JDBC calls into calls on the client API for Oracle, Sybase,Informix, DB2, or other DBMS. Note that, like the bridge driver, this style ofdriver requires that some binary code be loaded on each client machine.)这种类型的驱动程序把客户机API上的JDBC调用转换为Oracle、Sybase、Informix、DB2或其它DBMS的调 用。注意,象桥驱动程序一样,这种类型的驱动程序要求将某些二进制代码加载到每台客户机上。

3、 Pure Java Driver for Database Middleware: 先将JDBC调用转换为DBMS-independent网络协议,然后由服务器端的中间件转换为具体数据库服务器可以接收的网络协议。(net- protocol fully Javatechnology-enabled driver #This style of driver translates JDBC calls into themiddleware vendor's protocol, which is then translated to a DBMS protocol by amiddleware server. The middleware provides connectivity to many differentdatabases.)这种网络服务器中间件能够将它的纯Java客户机连接到多种不同的数据库上。所用的具体协议取决于提供者。通常,这是最为灵活的 JDBC驱动程序。有可能所有这种解决方案的提供者都提供适合于Intranet用的产品。为了使这些产品也支持Internet访问,它们必须处理 Web所提出的安全性、通过防火墙的访问等方面的额外要求。几家提供者正将JDBC驱动程序加到他们现有的数据库中间件产品中。

4、Direct-to-Database Pure JavaDriver: 将JDBC调用直接转换为具体数据库服务器可以接收的网络协议。(native-protocol fully Javatechnology-enabled driver #This style of driver converts JDBC calls into thenetwork protocol used directly by DBMSs, allowing a direct call from the clientmachine to the DBMS server and providing a practical solution for intranetaccess.)这将允许从客户机机器上直接调用DBMS服务器,是Intranet访问的一个很实用的解决方法。由于许多这样的协议都是专用的,因此数 据库提供者自己将是主要来源,有几家提供者已在着手做这件事了。

 第3、4类驱动程序将成为从JDBC访问数据库的首选方法。第1、2类驱动程序在直接的纯Java驱动程序还没有上市前将会作为过渡方案来使用。对第1、 2类驱动程序可能会有一些变种(下表中未列出),这些变种要求有连接器,但通常这些是更加不可取的解决方案。第3、4类驱动程序提供了Java的所有优 点,包括自动安装(例如,通过使用JDBC驱动程序的applet applet来下载该驱动程序)。

参考

转 oracle的jdbc连接方式 oci和thin - phoebus0501 - 博客园.htm

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
What are stored procedures in MySQL?What are stored procedures in MySQL?May 01, 2025 am 12:27 AM

Stored procedures are precompiled SQL statements in MySQL for improving performance and simplifying complex operations. 1. Improve performance: After the first compilation, subsequent calls do not need to be recompiled. 2. Improve security: Restrict data table access through permission control. 3. Simplify complex operations: combine multiple SQL statements to simplify application layer logic.

How does query caching work in MySQL?How does query caching work in MySQL?May 01, 2025 am 12:26 AM

The working principle of MySQL query cache is to store the results of SELECT query, and when the same query is executed again, the cached results are directly returned. 1) Query cache improves database reading performance and finds cached results through hash values. 2) Simple configuration, set query_cache_type and query_cache_size in MySQL configuration file. 3) Use the SQL_NO_CACHE keyword to disable the cache of specific queries. 4) In high-frequency update environments, query cache may cause performance bottlenecks and needs to be optimized for use through monitoring and adjustment of parameters.

What are the advantages of using MySQL over other relational databases?What are the advantages of using MySQL over other relational databases?May 01, 2025 am 12:18 AM

The reasons why MySQL is widely used in various projects include: 1. High performance and scalability, supporting multiple storage engines; 2. Easy to use and maintain, simple configuration and rich tools; 3. Rich ecosystem, attracting a large number of community and third-party tool support; 4. Cross-platform support, suitable for multiple operating systems.

How do you handle database upgrades in MySQL?How do you handle database upgrades in MySQL?Apr 30, 2025 am 12:28 AM

The steps for upgrading MySQL database include: 1. Backup the database, 2. Stop the current MySQL service, 3. Install the new version of MySQL, 4. Start the new version of MySQL service, 5. Recover the database. Compatibility issues are required during the upgrade process, and advanced tools such as PerconaToolkit can be used for testing and optimization.

What are the different backup strategies you can use for MySQL?What are the different backup strategies you can use for MySQL?Apr 30, 2025 am 12:28 AM

MySQL backup policies include logical backup, physical backup, incremental backup, replication-based backup, and cloud backup. 1. Logical backup uses mysqldump to export database structure and data, which is suitable for small databases and version migrations. 2. Physical backups are fast and comprehensive by copying data files, but require database consistency. 3. Incremental backup uses binary logging to record changes, which is suitable for large databases. 4. Replication-based backup reduces the impact on the production system by backing up from the server. 5. Cloud backups such as AmazonRDS provide automation solutions, but costs and control need to be considered. When selecting a policy, database size, downtime tolerance, recovery time, and recovery point goals should be considered.

What is MySQL clustering?What is MySQL clustering?Apr 30, 2025 am 12:28 AM

MySQLclusteringenhancesdatabaserobustnessandscalabilitybydistributingdataacrossmultiplenodes.ItusestheNDBenginefordatareplicationandfaulttolerance,ensuringhighavailability.Setupinvolvesconfiguringmanagement,data,andSQLnodes,withcarefulmonitoringandpe

How do you optimize database schema design for performance in MySQL?How do you optimize database schema design for performance in MySQL?Apr 30, 2025 am 12:27 AM

Optimizing database schema design in MySQL can improve performance through the following steps: 1. Index optimization: Create indexes on common query columns, balancing the overhead of query and inserting updates. 2. Table structure optimization: Reduce data redundancy through normalization or anti-normalization and improve access efficiency. 3. Data type selection: Use appropriate data types, such as INT instead of VARCHAR, to reduce storage space. 4. Partitioning and sub-table: For large data volumes, use partitioning and sub-table to disperse data to improve query and maintenance efficiency.

How can you optimize MySQL performance?How can you optimize MySQL performance?Apr 30, 2025 am 12:26 AM

TooptimizeMySQLperformance,followthesesteps:1)Implementproperindexingtospeedupqueries,2)UseEXPLAINtoanalyzeandoptimizequeryperformance,3)Adjustserverconfigurationsettingslikeinnodb_buffer_pool_sizeandmax_connections,4)Usepartitioningforlargetablestoi

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft