Differences between Oracle JDBC Thin and Thick Drivers

If any body is looking for this information...
============================================================
I have a question concerning the Oracle JDBC thin vs. thick drivers
and how they might affect operations from an application perspective.
We're in a Solais 8/Oracle 8.1.7.2 environment. We have several
applications on several servers connecting to the Oracle database.
For redundancy, we're looking into setting up TAF (transparent
application failover). Currently, some of our apps use the Oracle
<B>JDBC thin</B> drivers to talk to the database, with a connection
string that like this:
<B> jdbc:oracle:thin:@host:port:ORACLE_SID </B>
In a disaster recovery mode, where we would switch the database
from one server to another, the host name in the above string
would become invalid. That means we have to shut down our application
servers and restart them with an updated string.
Using the Oracle <B>OCI (thick)</B> driver though, allows us to connect
to a Net8 service instead of a specific server:
<B> jdbc:oracle:oci8:@NET8_SERVICE_NAME </B>
Coupled with the FAILOVER=ON option configured in Net8, it is
then possible to direct a connection from the first server to
the failover database on another server. This is exactly what
we would like to do.
My question is, from an application perspective, how is the Oracle
thick driver different from the thin driver? If everything
else is "equal" (i.e. the thick driver is compatible with the
app servers) would there be something within the the thick/OCI
driver that could limit functionality vs. the thin driver?
My understand, which obviously is sketchy, is that the thick
driver is a superset of the thin driver. If this is the case,
and for example if all database connections were handled through
a configuration file with the above OCI connection string, then
theoretically the thick driver should work.
============================================================
<B>
In the case with the Oracle, they provide a thin driver that is a 100% Java driver for client-side use without the need of an Oracle installation (maybe that's why we need to input server name and port number of the database server). This is platform indipendent, and has good performance and some features.
The OCI driver on the other hand is not java, require Oracle installation, platform dependent, performance is faster, and has a complete list of all the features.
</B>
========================================================
I hope this is what you expect.
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. <B>The JDBC OCI driver requires an Oracle (7.3.4 or above) client installation (including SQL*Net v2.3 or above) and all other dependent files.</B> 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 to be preinstalled.
JDBC Thin client-side driver: This is a JDBC Type 4 driver that uses Java to connect directly to Oracle. It emulates Oracle's SQL*Net Net8 and TTC adapters using its own TCP/IP based Java socket implementation. <B>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.</B> 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 by the JServer within the Oracle server. 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.
======================================================
How does one connect with the JDBC Thin Driver?
The the JDBC thin driver provides the only way to access Oracle from the Web (applets). It is smaller and faster than the OCI drivers, and doesn't require a pre-installed version of the JDBC drivers.
import java.sql.*;
class dbAccess {
public static void main (String args []) throws SQLException
DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
Connection conn = DriverManager.getConnection
("jdbc:oracle:thin:@qit-uq-cbiw:1526:orcl", "scott", "tiger");
// @machineName:port:SID, userid, password
Statement stmt = conn.createStatement();
ResultSet rset = stmt.executeQuery("select BANNER from SYS.V_$VERSION");
while (rset.next())
System.out.println (rset.getString(1)); // Print col 1
stmt.close();
How does one connect with the JDBC OCI Driver?
One must have Net8 (SQL*Net) installed and working before attempting to use one of the OCI drivers.
import java.sql.*;
class dbAccess {
public static void main (String args []) throws SQLException
try {
Class.forName ("oracle.jdbc.driver.OracleDriver");
} catch (ClassNotFoundException e) {
e.printStackTrace();
Connection conn = DriverManager.getConnection
("jdbc:oracle:oci8:@qit-uq-cbiw_orcl", "scott", "tiger");
// or oci7 @TNSNames_Entry, userid, password
Statement stmt = conn.createStatement();
ResultSet rset = stmt.executeQuery("select BANNER from SYS.V_$VERSION");
while (rset.next())
System.out.println (rset.getString(1)); // Print col 1
stmt.close();
=================================================================

Wow, not sure what your question was, but there sure was a lot of information there...
There really is only one case where failover occurs, and it would not normally be in a disaster recovery situation, where you define disaster recovery as the obliteration of your current server farm, network and concievably the operational support staff. This would require a rebuild of your server, network etc and isn't something done with software.
Fail over is normally used for high availablity that would take over in case of hardware server failure, or when your support staff wants to do maintenance on the primary server.
Using the thin and thick driver should have ZERO affect on a failover. Transparent failover will make the secondary server the same IP as the primary, therefore the hostname will still point to the appropriate server. If you are doing this wrong, then you will have to point all your applications to a new IP address. This should be something that you tell your management is UNACCEPTABLE in a fail-over situation, since it is almost sure to fail to fail-over.
You point out that you are providing the TNSNAME, rather than the HOSTNAME when using the thick driver. That's true within your application, but that name is resolved to either a HOSTNAME, or IP ADDRESS before it is sent to the appropriate Oracle server/instance. It is resolved using either a NAME server (same as DNS server but for Oracle), or by looking at a TNSNAMES file. Since the TNSNAMES files profilerate like rabbits within an organization you don't want a fail over that will make you find and switch all the entries, so you must come up with a fail over that does not require it.
So, the application should not be concerned with either the hostname, or the IP address changing during fail over. That makes use of the thin or thick client acceptable for fail over.
Don't know if this will help, but this shows the communication points.
THIN DRIVER
client --> dns --> server/port --> SID
THICK DRIVER
client --> names server --> dns --> server/port --> SID
client --> tnsnames     --> dns --> server/port --> SID

Similar Messages

  • Differences between Oracle Discoverer  10g and 11g .

    we would like to know if they are any differences between Oracle Discoverer 10g and 11g and any issues with 10g that are overcome in 11g.
    Please make us aware of any merits in going for 11g over 10g.
    apps version 11.5.10.2
    Regards

    Please see these links for the list of new features, bug fixes, certification, and installation of Discoverer 11g on 11i instance.
    Discoverer 11.1.1.4 Certified with E-Business Suite
    http://blogs.oracle.com/stevenChan/2011/02/discoverer_11114_ebs.html
    EBS Sysadmin Primer: Oracle BI Discoverer 11gR1
    http://blogs.oracle.com/stevenChan/2010/08/discoverer_11gr1_primer.html
    Oracle Business Intelligence Discoverer 11g
    http://www.oracle.com/technetwork/developer-tools/discoverer/overview/index.html
    Oracle Business Intelligence Discoverer 11g documentation
    http://www.oracle.com/technetwork/developer-tools/discoverer/documentation/index.html
    Thanks,
    Hussein

  • Difference between oracle business intelligence and discoverer.

    hi all.
    can anyone help me that what is the difference between oracle business intelligence and discoverer.
    any suggestion?
    sarah

    Not sure if this is the right place to ask this, but
    http://www.oracle.com/technology/products/bi/enterprise-edition.html
    http://www.oracle.com/technology/products/discoverer/index.html
    also google gives some pretty good responses if you throw in "Oracle Discoverer" or "Oracle Business Intelligence" :o).
    if you have specific questions you might pick up a forum dedicated to the specific product from here:
    http://forums.oracle.com/forums/category.jspa?categoryID=16
    cheers

  • Features and Difference between Oracle 7i,8i and 9i

    Hi All,
    Please let me know the features and difference between Oracle 7i,8i and 9i,10g.
    and New features in Oracle 11g.
    Thank you,

    Each release has a New Features Guide:
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28279/chapter1.htm

  • Difference between oracle 9i database and oracle 9i lite

    Dear Sir/Mam,
    I like to know the performance and functionality difference
    between oracle 9i database and oracle9i lite.
    Is there is any performance variations between
    oracle 9i 9.0.1.1.1 and 9i 9.2.0.1.1

    Hello,
    you can see this note
    #139580.1, Oracle - Compatibility Matrices and Release Information, for detailed information.
    regards, Jorge

  • Difference between oracle 9i Rac and 10g Rac

    Friends -
    Could you please list out what are the main differences between oracle 9i Rac and oracle 10g Rac
    Appreciate your support on this
    Regards
    satish

    hi
    check the new features document of 10g RAC
    http://download.oracle.com/docs/cd/B19306_01/rac.102/b14197/whatsnew.htm#sthref6
    HTH

  • Difference Between Oracle Database 10g And Oracle 10g Express Edition

    Can any body Tell me What is The Difference Between Oracle Database 10g And Oracle 10g Express Edition.

    http://www.oracle.com/database/product_editions.html
    This link might help you.

  • Difference between oracle 9i dba and 10g dba

    Hi friends
    Please let me know the major difference between oracle 9i dba and oracle 10g dba
    thanks

    new features of oracle 10g
    http://download-west.oracle.com/docs/cd/B14117_01/server.101/b10750/toc.htm
    http://www.oracle-base.com/articles/10g/Articles10g.php
    http://www.orafaq.com/faq/features_introduced_in_the_various_server_releases

  • What is difference between oracle 8i ,9i and 10g

    i want to know what is difference between oracle 8i ,9i and 10g with explain.

    Differences between 9i and 10g
    http://download-west.oracle.com/docs/cd/B14117_01/server.101/b10750/toc.htm
    http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14214/toc.htm
    ... between 8i and 9i
    http://download-west.oracle.com/docs/cd/A91202_01/901_doc/server.901/a90120/toc.htm
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96531/toc.htm

  • Difference between oracle application 11i and release 12

    can some one give me a doccument..link..or anything related to difference between oracle application 11i and release 12 with all details technical and strucutural

    Please check the following links:
    Note: 404152.1 - E-Business Suite Release 12: Release Content Documents
    https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=404152.1
    what is the difference between REL 10.5.10 and REL 12
    Re: what is the difference between REL 10.5.10 and REL 12

  • Difference between Oracle service bus and SOA

    Please Let me know what are the basis difference between Oracle Service Bus and SOA ?

    A topic discussed many times here ..
    OSB vs SOA suite

  • Difference between Oracle GRC product and Identity management

    Hi
    I want to know the difference between Oracle GRC product and Oracle Identity and Access Management product. Also what I see that the features Acces manager is providing is also provided by the grc access control governor and transaction control governor. So why two different technology for same task.
    Regards

    Any answer.
    regards

  • Difference between Oracle payroll 11i and R12

    Hi
    Can any one tell me difference between Oracle Payroll 11i and R12, functionally as well as technically.
    Thanks
    PK

    Hi,
    Please refer to these documents.
    Note: 561580.1 - E-Business Suite Release 12.1.1: Release Content Documents
    Note: 404152.1 - E-Business Suite Release 12: Release Content Documents
    Also, see the HRMS User/Implementation guides & the Upgrade guide:
    Applications Releases 11i and 12
    http://www.oracle.com/technology/documentation/applications.html
    Regards,
    Hussein

  • Difference between Oracle Weblogic Administration and Ofm Soa Admin

    Hi,
    what is the difference between Oracle Weblogic Administration and Oracle Fusion Soa Weblogic server Administration?
    pls help me anyone, i want to learn weblogic Administration, but having some confusions..........
    thanks,

    The below is just for your reference. Actual content may vary....
    Weblogic Administration:
    Manage a WebLogic Server installation.
    To install weblogic server in one or multiple instances
    Installing on single or multiple physical machines
    How to handle administration console, utilities, APIs, hangling security, database connection, messaging and transaction.
    How to do runtime configuration for your applications.
    How to use the monitoring tools to check the health of the servers and ensure maximum availability and performance.
    Install and Configure WebCache 11g as Load Balancer
    and Much more..
    OFM SOA Administrator:
    Manage a WebLogic Server installation (Administration Server and Managed Server).
    To install weblogic server in one or multiple instances
    Installing on single or multiple physical machines
    How to handle administration console, utilities, APIs, hangling security, database connection, messaging and transaction.
    How to do runtime configuration for your applications.
    How to use the monitoring tools to check the health of the servers and ensure maximum availability and performance.
    and
    File System and Directory Structure in Fusion Middleware
    Installing Oracle Database, Configuring RCU, weblogic server and SOA Suite.
    Deploying SOA Applications.
    Deploying and Undeploying Java EE Applications
    Configuring Node Manager and starting Managed Servers using Node Manager
    Monitoring OFM Server, admin server, managed server and composites
    Configuring HA and Security (Creating users, assigning responsibilities)
    Monitoring performance of SOA composites
    Install and Configure WebCache 11g as Load Balancer
    and much more..
    Thanks,
    Vijay

  • Difference between Oracle Testing Center and Prometric?

    what is the Difference between Oracle Testing Center and Prometric?

    Notes for an Oracle Testing Center are here:
    [http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=51&p_org_id=1001&lang=US#4]
    The cancellation policies are possibly harder than a Standard Testing Center Vendor.
    I would suggest that Oracle Testing Centers possilbly offer exams more on an event or batch basis; (Oracle Openworld is an example; though thats not what one would think of as an Oracle Test Center).
    In general I suspect most people will find it just as easy to take the exam through a prometric(or new testing vendor) center. and there will often typically be more slots available. And the testing center will be typically be examing for other testing suppliers, perhaps mosting microsoft and cisco, but there's a mryiad of others out there as well. So the'll probably be well set up for it.
    Here in the UK (south) we have a fairly (very) dense population. I've used 4 centers myself:
    One 5 miles from me, a college, thats dual Pearson VUE/Prometric; though there only offering Pearson VUE at present until they moved to a bigger suite, with 4 stations. Nice and friendly. 5 days week.
    One 25 miles from me, a training center, that offer dual Pearson VUE/Prometric; 4/8 stations; very friendly, cup of coffe offered; I usually go by Puff Puff to this one.
    One 10 miles from me, maybe a 12 workstation suite, they offer usually prometric (but not oracle) on one a week. Felt Conveyor like compared to other two above; but very friendly and efficient.
    One 35 miles from me, Prometric only including oracle only, maybe a 12 workstation suite, CRT's, and not necessarily of the best quality. This one really felt conveyor like to me, though staff were friendly. This is effectively a drive for me. Also whereas the others I've usd sit one down to sign the forms in a room this one was done at building reception.
    The city center ones can sometimes be a little noisy and earplugs are recommended, though the one city center one I've used has provided them others don't have to.
    In general from once I used a particular center I feel more comfortable; I'll know exactly where it is; where I have have a quick cup of coffee (with sugar) beforehand going over notes. This all helps me to be a little less anxious before the exam. When I get that prepartion wrong, and I certainly did once, if probably cost me maybe 2/3/4 %.
    Getting to know your local test center and routine is one reason why I encourage people to take 1z0-007 and 1z0-051 proctored so they know the procedure and get to know a local Promteric etc Test Center before taking a more advanced and expensive exam.
    Rgds -bigdelboy.
    PS: I expect comments from some people who live 100 (+) miles from a test center and have no alternative choice. And those in some places will probably say they feel they are treated like cattle by the test center.

Maybe you are looking for