JDBC Thin vs Thick Driver

Hello,
We are looking for differences between Oracle JDBC Thin and OCI (thick) driver with respect to
1. Peformance of the Java application.
2. Maintenance and administration
3. Known issues with OCI (thick) driver which is handled by Thin or vice versa.
4. Better security
Appreciate any help on the above.
Thanks and Regards,
Vamsi Mohan Harish

1. Performance of the Java application.
The difference in driver implementation is likely to be trivial compared to other considerations (network round trip time, application design, etc). However if you are really interested then chapter 19 of 'Java Programming with Oracle JDBC' by Donald Bales (O'Reilly) has some good information on this topic. It also happens to be available online: http://www.onjava.com/pub/a/onjava/excerpt/oraclejdbc_19/index.html
Keep in mind that it is a little out of date now - you should run tests using the current versions of the drivers.
2. Maintenance and administration
The JDBC Thin driver is typically easier to update/distribute, as installation consists of copying a .jar file or two. The only case where OCI has an advantage is in the use of Oracle's naming layer for database service abstraction. Of course this assumes the database server is listening for TCP/IP and not the legacy protocols that are only supported by OCI. Failover configurations using TAF are supported by OCI only. The newer 'Fast Connection Failover' feature of 10g RAC can also run over Thin though.
3. Known issues with OCI (thick) driver which is handled by Thin or vice versa.
In my experience each has a roughly equal number of bugs. I find it easier to track them down in the Thin driver though :-)
4. Better security
The security options for the Thin driver are more limited with regard to external authentication and support for some of the Oracle Advanced Security features. However, both support the basics like encrypted connections. Chapter 23 of the JDBC driver docs goes into more depth: http://download-west.oracle.com/docs/cd/B14117_01/java.101/b10979/toc.htm
Hope this helps.
Jonathan.

Similar Messages

  • 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

  • JDBC Thin Server-side Driver 8.1.6

    The readme.txt for the JDBC Thin driver
    talks about a JDBC Thin driver for clients
    and a JDBC Thin Server-side driver for
    servers. Where is the Server-side driver?
    In Oracle?

    I believe the one from technet was created
    under the Solaris environment. That is
    the only difference that I know of.
    null

  • BEA recommendation for use of Thin or Thick driver of Oracle 10g

    What is recommended by BEA to use Oracle Thin or thick driver for connecting to oracle 10g database from Weblogic Server 8.1.5?

    nmyneni wrote:
    What is recommended by BEA to use Oracle Thin or thick driver for connecting to oracle 10g database from Weblogic Server 8.1.5?Use the Oracle driver in the thin mode, not the thick/OCI mode.
    The latter will expose you to native code bugs in OCI that
    can kill an entire JVM.

  • Jdbc thin to thick migraion

    hi all,
    i am trying to migrate an application to fat oci oracle drivers.
    when using thin drivers there was never a problem but prformance was low.... (maybe
    not well programmed?) but nevertheless i migrated somappliactions to fat drivers
    and it was a whaoooo effect they performed a lot better so i decided to migrate
    anything possibe to fat till this day....
    when i sarted this censoed application in the wls 7 server i always got nuberformatexception
    i think when the appliaction tried to parse float values from the database
    following error ocured with 9.xx and 8.xxx oracle fat driver
    ####<
    69:e9e6dc1becbcab34> <010051> <EJB Exception during invocation from home: j2ee.ProductSearchSessionBean_ae
    teip_HomeImpl@29a747 threw exception: javax.ejb.EJBException: nested exception
    is: javax.ejb.FinderException: Exception executing fi
    nder 'findActiveByProductTypeIDApplicationIDExternalProdType':
    java.sql.SQLException: java.lang.NumberFormatException: ,2
    at java.lang.Integer.parseInt(Integer.java:409)
    at java.math.BigInteger.<init>(BigInteger.java:311)
    at java.math.BigInteger.<init>(BigInteger.java:440)
    at java.math.BigDecimal.<init>(BigDecimal.java:153)
    at weblogic.jdbc.oci.ResultSet.getBigDecimal(ResultSet.java:1074)
    at weblogic.jdbc.jts.ResultSet.getBigDecimal(ResultSet.java:703)
    at at.sybase.j2ee.com.shop.ejb.ProductBean_meu6z3__WebLogic_CMP_RDBMS.__WL_loadGroup0FromRS(ProductBean_meu6z3__WebLogic_
    CMP_RDBMS.java:3081)
    with thin driver everything was fine ....
    any suggestions?
    thx chris

    Have you tried simply running oracle's thick driver? Our driver relies on OCI's
    string representation of the data, to feed to the constructor for BigDecimal,
    and I fear that OCI may be serving up a value in scientific notation, which
    the BigDecimal constructor chokes on. The reason our driver does that is because the
    metadata that the DBMS sends is insufficient for us to know what object to construct
    from the value (it could change every row!). Oracle's drivers make a BigDecimal
    natively for every numeric datum...
    Joe
    chris wrote:
    hi all,
    i am trying to migrate an application to fat oci oracle drivers.
    when using thin drivers there was never a problem but prformance was low.... (maybe
    not well programmed?) but nevertheless i migrated somappliactions to fat drivers
    and it was a whaoooo effect they performed a lot better so i decided to migrate
    anything possibe to fat till this day....
    when i sarted this censoed application in the wls 7 server i always got nuberformatexception
    i think when the appliaction tried to parse float values from the database
    following error ocured with 9.xx and 8.xxx oracle fat driver
    ####<
    69:e9e6dc1becbcab34> <010051> <EJB Exception during invocation from home: j2ee.ProductSearchSessionBean_ae
    teip_HomeImpl@29a747 threw exception: javax.ejb.EJBException: nested exception
    is: javax.ejb.FinderException: Exception executing fi
    nder 'findActiveByProductTypeIDApplicationIDExternalProdType':
    java.sql.SQLException: java.lang.NumberFormatException: ,2
    at java.lang.Integer.parseInt(Integer.java:409)
    at java.math.BigInteger.<init>(BigInteger.java:311)
    at java.math.BigInteger.<init>(BigInteger.java:440)
    at java.math.BigDecimal.<init>(BigDecimal.java:153)
    at weblogic.jdbc.oci.ResultSet.getBigDecimal(ResultSet.java:1074)
    at weblogic.jdbc.jts.ResultSet.getBigDecimal(ResultSet.java:703)
    at at.sybase.j2ee.com.shop.ejb.ProductBean_meu6z3__WebLogic_CMP_RDBMS.__WL_loadGroup0FromRS(ProductBean_meu6z3__WebLogic_
    CMP_RDBMS.java:3081)
    with thin driver everything was fine ....
    any suggestions?
    thx chris

  • JDBC thin and thick clients

    What is the difference between JDBC thin and JDBC thick clients and their usage ?

    hi,
    in sort tearms,
    Oracle has a thin client driver which mean you can connect to a oracle database without the Oracle client installed on your machine.
    Thick client would need the Oracle Client database drivers etc.. Drivers include JDBC-ODBC bridge drivers JDBC drivers depending on tns resolution.
    thanks

  • SQLException - Win 98; Oracle 8i personal (8.1.5) JDBC Thin 1.2 driver

    Environment:
    Win 98; Oracle 8i personal (8.1.5) JDBC Thin 1.2.2 drivers
    Included in classpath: e:\oracle\ora81\jdbc\lib\classes12_01.zip;e:\oracle\ora81\jdbc\lib\nls_chaset2_01.zip;
    Included in path: e:\Oracle\Ora81\bin;e:\Oracle\Ora81\\jdbc\lib;
    code snippet used:
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    dbconn = DriverManager.getConnection( "jdbc:oracle:thin:@127.0.0.1:1521:ORCL","scott","tiger" );
    following runtime error occurs:
    java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:156)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
    at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:210)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:251)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:224)
    at java.sql.DriverManager.getConnection(DriverManager.java:457)
    at java.sql.DriverManager.getConnection(DriverManager.java:137)
    at OracleTest.main(OracleTest.java, Compiled Code)
    Any suggestions anyone?

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Vij:
    Environment:
    Win 98; Oracle 8i personal (8.1.5) JDBC Thin 1.2.2 drivers
    Included in classpath: e:\oracle\ora81\jdbc\lib\classes12_01.zip;e:\oracle\ora81\jdbc\lib\nls_chaset2_01.zip;
    Included in path: e:\Oracle\Ora81\bin;e:\Oracle\Ora81\\jdbc\lib;
    code snippet used:
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    dbconn = DriverManager.getConnection( "jdbc:oracle:thin:@127.0.0.1:1521:ORCL","scott","tiger" );
    following runtime error occurs:
    java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:156)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
    at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:210)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:251)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:224)
    at java.sql.DriverManager.getConnection(DriverManager.java:457)
    at java.sql.DriverManager.getConnection(DriverManager.java:137)
    at OracleTest.main(OracleTest.java, Compiled Code)
    Any suggestions anyone?<HR></BLOCKQUOTE>
    Vij,
    Assuming that Personal Oracle is up and running, you should check that the listener is running and listening on the port you are using.
    You can check the status with the following command (from the DOS prompt): lsnrctl status
    If the listener is not running start it with this command: lsnrctl start listener
    You can also have it start automatically by modifying the registry entry LISTENER_STARTUP to "AUTO"
    (HKEY_LOCAL_MACHINE\Software\ORACLE\HOME0)
    Hope this helps
    Thomas Risberg
    null

  • Diffeence b/w thin and thick driver

    diffeence b/w thin and thick driver

    This thread is moved from "Collections: Lists, Sets, and Maps" to here.

  • Thick Driver Vs Thin Driver

    Hello,
    Could you please tell me what is the difference between Thin Driver and Thick Driver? Which we should use?
    Is Type 1 and Type 2 Driver is Thick Driver? Please mention.
    This have any aricle, please give the URL Thank you.
    Thank you in Advance
    balachandar

    Look into this article. There is no such term called thick JDBC driver. But there are 4 types of JDBC drivers, You can google for more infomation.
    http://www.stardeveloper.com/articles/display.html?article=2003082701&page=1
    Regards
    Bahadur Singh

  • JDBC thin driver connection problems using cybersafe authentication

    Hi
    i am trying to use jdbc thin driver to connect to oracle 8.1.7 DB using ASO and cybersafe authentication.
    Question:
    Does the oracle jdbc thin driver in 8.1.7.0.0 support third-party authentication features supported by Oracle Advanced Security--such
    as those provided by RADIUS, Kerberos, or SecurID
    i am getting the following error.
    Exception in thread "main" java.sql.SQLException: invalid arguments in call
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java)
    at oracle.jdbc.dbaccess.DBError.check_error(DBError.java)
    at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java)
    at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
    va)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java)
    at java.sql.DriverManager.getConnection(DriverManager.java:517)
    at java.sql.DriverManager.getConnection(DriverManager.java:146)
    at ASOJdbc.main(ASOJdbc.java:43)
    Following is the program i am trying.
    public class ASOJdbc {
         public static void main(String args[]) throws SQLException {
              String url = "jdbc:oracle:thin:@son1129:1521:sonias";
              Connection con;
              String query = "select EMPNO, ENAME from EMP";
              Statement stmt;
              // ASO Stuff
                   Properties props = new Properties();
                   try {
                   props.put("oracle.net.authentication_services", "CYBERSAFE");
                   props.put("oracle.net.authentication_gssapi_service", "oracle/[email protected]");                    
                   props.put("oracle.net.encryption_types_client", "DES");
                   props.put("oracle.net.encryption_types_server", "DES");               
                   props.put("oracle.net.crypto_seed", "4fhXXXX");               
                   } catch (Exception e) { e.printStackTrace();
                   DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
                   // ASO
                   con = DriverManager.getConnection(url, props);
                   stmt = con.createStatement();
                   ResultSet rs = stmt.executeQuery(query);
                   stmt.close();
                   con.close();          
    jdk version: jdk 1.3.1
    Oracle jdbc driver information, which i obtained as per Note 94091.1
    =============
    Database Product Name is Oracle
    Database Product Version is Oracle8i Enterprise Edition Release 8.1.7.1.1 - Production With the Partitioning option
    JServer Release 8.1.7.1.1 - Production
    JDBC Driver Name is Oracle JDBC driver
    JDBC Driver Version is 8.1.7.0.0
    JDBC Driver Major Version is 8
    JDBC Driver Minor Version is 1

    1. What JDBC Thin client Driver are you using? (version) If you don't know, open up the Manifest.
    2. the JDBC/OCI driver is a thick driver. It uses the oracle client, and therefore should read the tnsnames.ora
    3. You have yet to give us any ORA- errors, which would help immensely in troubleshooting.

  • Does oracle 8.1.6.0 jdbc thin driver support jdk1.3 and oracle 8.0.5 database ?

    I have downloaded oracle 8.1.6.0 jdbc thin driver(named classes12.zip) to run with jdk1.3 to access oracle 8.0.5, but when I compile and run the jdbccheckup.java downloaded from oracle website like this:
    javac -classpath d:\jdbc\classes12.zip jdbccheckup.java
    (compile succeed)
    java -classpath d:\jdbc\classes12.zip jdbccheckup
    an error occured:
    Exception in thread "main" java.lang.NoClassDefFoundError:jdbccheckup
    Why??????

    Try this isntead.
    java -classpath d:\jdbc\classes12.zip;. jdbccheckup
    an error occured:
    Exception in thread "main" java.lang.NoClassDefFoundError:jdbccheckup
    Why??????

  • Bug in Oracle JDBC thin driver (parameter order)

    [ I'd preferably send this to some Oracle support email but I
    can't find any on both www.oracle.com and www.technet.com. ]
    The following program illustrates bug I found in JDBC Oracle thin
    driver.
    * Synopsis:
    The parameters of prepared statement (I tested SELECT's and
    UPDATE's) are bound in the reverse order.
    If one do:
    PreparedStatement p = connection.prepareStatement(
    "SELECT field FROM table WHERE first = ? and second = ?");
    and then bind parameter 1 to "a" and parameter to "b":
    p.setString(1, "a");
    p.setString(2, "b");
    then executing p yields the same results as executing
    SELECT field FROM table WHERE first = "b" and second = "a"
    although it should be equivalent to
    SELECT field FROM table WHERE first = "a" and second = "b"
    The bug is present only in "thin" Oracle JDBC driver. Changing
    driver to "oci8" solves the problem.
    * Version and platform info:
    I detected the bug using Oracle 8.0.5 server for Linux.
    According to $ORACLE_HOME/jdbc/README.doc that is
    Oracle JDBC Drivers release 8.0.5.0.0 (Production Release)
    * The program below:
    The program below illustrates the bug by creating dummy two
    column table, inserting the row into it and then selecting
    the contents using prepared statement. Those operations
    are performed on both good (oci8) and bad (thin) connections,
    the results can be compared.
    You may need to change SID, listener port and account data
    in getConnecton calls.
    Sample program output:
    $ javac ShowBug.java; java ShowBug
    Output for both connections should be the same
    --------------- thin Driver ---------------
    [ Non parametrized query: ]
    aaa
    [ The same - parametrized (should give one row): ]
    [ The same - with buggy reversed order (should give no answers):
    aaa
    --------------- oci8 driver ---------------
    [ Non parametrized query: ]
    aaa
    [ The same - parametrized (should give one row): ]
    aaa
    [ The same - with buggy reversed order (should give no answers):
    --------------- The end ---------------
    * The program itself
    import java.sql.*;
    class ShowBug
    public static void main (String args [])
    throws SQLException
    // Load the Oracle JDBC driver
    DriverManager.registerDriver(new
    oracle.jdbc.driver.OracleDriver());
    System.out.println("Output for both connections should be the
    same");
    Connection buggyConnection
    = DriverManager.getConnection
    ("jdbc:oracle:thin:@localhost:1521:ORACLE",
    "scott", "tiger");
    process("thin Driver", buggyConnection);
    Connection goodConnection
    = DriverManager.getConnection ("jdbc:oracle:oci8:",
    "scott", "tiger");
    process("oci8 driver", goodConnection);
    System.out.println("--------------- The end ---------------");
    public static void process(String title, Connection conn)
    throws SQLException
    System.out.println("--------------- " + title + "
    Statement stmt = conn.createStatement ();
    stmt.execute(
    "CREATE TABLE bug (id VARCHAR(10), val VARCHAR(10))");
    stmt.executeUpdate(
    "INSERT INTO bug VALUES('aaa', 'bbb')");
    System.out.println("[ Non parametrized query: ]");
    ResultSet rset = stmt.executeQuery(
    "select id from bug where id = 'aaa' and val = 'bbb'");
    while (rset.next ())
    System.out.println (rset.getString (1));
    System.out.println("[ The same - parametrized (should give one
    row): ]");
    PreparedStatement prep = conn.prepareStatement(
    "select id from bug where id = ? and val = ?");
    prep.setString(1, "aaa");
    prep.setString(2, "bbb");
    rset = prep.executeQuery();
    while (rset.next ())
    System.out.println (rset.getString (1));
    System.out.println("[ The same - with buggy reversed order
    (should give no answers): ]");
    prep = conn.prepareStatement(
    "select id from bug where id = ? and val = ?");
    prep.setString(1, "bbb");
    prep.setString(2, "aaa");
    rset = prep.executeQuery();
    while (rset.next ())
    System.out.println (rset.getString (1));
    stmt.execute("DROP TABLE bug");
    null

    Horea
    In the ejb-jar.xml, in the method a cursor is closed, set <trans-attribute>
    to "Never".
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name></ejb-name>
    <method-name></method-name>
    </method>
    <trans-attribute>Never</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    Deepak
    Horea Raducan wrote:
    Is there a known bug in Oracle JDBC thin driver version 8.1.6 that would
    prevent it from closing the open cursors ?
    Thank you,
    Horea

  • Bug in Oracle JDBC thin driver 8.1.6 ?

    Is there a known bug in Oracle JDBC thin driver version 8.1.6 that would
    prevent it from closing the open cursors ?
    Thank you,
    Horea

    Horea
    In the ejb-jar.xml, in the method a cursor is closed, set <trans-attribute>
    to "Never".
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name></ejb-name>
    <method-name></method-name>
    </method>
    <trans-attribute>Never</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    Deepak
    Horea Raducan wrote:
    Is there a known bug in Oracle JDBC thin driver version 8.1.6 that would
    prevent it from closing the open cursors ?
    Thank you,
    Horea

  • Error Code Definition for JDBC Thin driver

    Would like to know where I can find the definition of error codes
    for JDBC thin driver to Oracle 7 database. Right now, when I have
    database errors, I get SQL execption with CODE=XXXXXX. Need to
    know the definition of the error codes in order to decide whether
    the application shall retry or quit or do something else. Thank
    you in advance.
    null

    Hi,
    thin client session Language is controlled by java Locale.
    Based on testing code, ORA- messages are localized after the connection is successfully established. ORA- messages returned in the middle of connecting are in instance language.
    So, as far as I can say, you need to catch exceptions from DriverManager.getConnection(url, info); and translate them on your own.
    Once the connection is successfully returned, ORA- message language is defined by java Locale.
    Tests were performed on Oracle 10gR2 (both thin driver and DB).

  • Jdbc oracle jdbc-thin driver subname

    I am working on Windows 2000 environment, using oracle8i 8.1.7 JDBC-Thin driver for use with JDK 1.2.x. The oralce8i 8.1.7 database is on another linux box. I can access the linux box through its ip address, but not by its hostname since it's not accessiable by the dns server. In my code, in the JDBCUrl, I used ip address instead of the hostname, e.g. "jdbc:oracle:thin:@10.0.113.108:1521:ora1". But I got the error like: "java.sql.SQLException: Io exception: The Network Adapter could not establish the connection". If I add a entry in my working machine's hosts file to map the hostname, I can fix the problem. But I don't know if this is the solution, or there is other better solutions.
    Thanks
    null

    Using a hosts file entry is a common solution for problem where the dns lookup does not contain an entry for a RDBMS server platform.
    The real solution is to resolve this issue :
    "where the dns lookup does not contain an entry for a RDBMS server platform."

Maybe you are looking for