JDBC Driver Types
Hi,
Can anyone tellme the four JDBC Driver. I need the companies who are offering these kind of drivers. Dont need to explain the difference between the drivers.
Type 1, 2, 3 and Four Drivers-
I need the following details.
1) Name of the Four Drivers
2) Currently Available Drivers
3) Name of the company or Corporation Who are offering these drivers
Thanks
Senthamizh
http://industry.java.sun.com/products/jdbc/drivers
Similar Messages
-
How to use JDBC driver (type 4) with struts?????
Hi! have a nice day!!!!!
i want to connect database use struts with JDBC driver type 4. i must add <data-source/> to <data-sources></data-sources> tag but i don't know how to use <data-source/> with it's properties. please tell me! thank very muchthank for reply!!! :D
my project require to use struts 1.2.8 with ODBC (i think so it's type 1) for connect to database (SQL server). i think so it has two step :
1. edit file struts-config.xml with <data-sources> tag.
2. programming in file java (which extends from Action class) connect to database.
but how to programming in file java??? (i think so must use objects DataSource & Connection) -
How do I known Which JDBC Driver Type in ConnectionPool?
Usually, we have to specify the JDBC driver type 1, 2, 3, 4 in our programs as
"COM.ibm.db2.jdbc.app.DB2Driver" or "COM.ibm.db2.jdbc.net.DB2Driver"
However, when we use connection pool, we just use the Data Source class file instead e.g. "COM.ibm.db2.jdbc.DB2ConnectionPoolDataSource" or "COM.ibm.db2.jdbc.DB2XADataSource". No program need to specify the driver.
Why is it like that? How do I know which driver type is using in the connection pool?Yes, I have the same problem in a BEA environment. Which is the driver for two phase commit?
XADatasource or ConnectionPoolDataSource?
Do I have to provide the implementation for the ConnectionPoolDataSource? -
Hi -
Does the XI JDBC adapter require a type 4 driver or can other types be used as well?
Thanks,
JesseIt looks like Note 850116 talks about this...
1. JDBC Driver Deployment
Q: How do I deploy the JDBC Driver JARs required to connect the JDBC Adapter to my DBMS?
A: The JDBC driver deployment is performed using a special SDA file named aii_af_jmsproviderlib.sda which is shipped as an empty stub with your XI installation. For Type 4 drivers, information how to add your JDBC drivers to this SDA is available in section 11.1 of the SAP XI 3.0 Configuration Guide, which is available on the SAP Service Marketplace under the URL: http://service.sap.com/instguidesNW04.
For Type 2 drivers, additional configuration steps are required, which are documented in note 850116. -
JDBC Driver Type - duplicate ignore
Hi -
Does the XI JDBC adapter require a type 4 driver or can other types be used as well?
Thanks,
JesseHi Jesse,
you must deploy the Java libraries on the J2EE server so that the JDBC adapter can access the required Java classes at runtime.
JDBC adapter, see SAP Note 831162
Regards,
venu. -
Problems showing german special characters using DB2 jdbc driver
Hi JDBC gurus,
In my application the special german characters(umlauts...) are not shown correctly when I'm using IBM jdbc driver(type 2). When I switch to jdbcodbc driver everything is correct. So is there any trick, some connection parameter, some property or something like this? Something like "setCharset" or "umlauts" or something? I could not find anything in web :-(
It is also hard to imagine that nobody has faced this problem. Or it is very trivial...
The second problem:
I have downloaded a new driver (com.ibm.db2.jcc.DB2Driver) but when I try to connect with DB I'm getting
com.ibm.db2.jcc.b.SqlException: No license present. What does it mean - no license? I'm going to clear with our DB admin if the reason can be that I have no rights to connect directly with DB without having client installed locally on my PC. This is only what comes to my mind.
Environment:
DB: DB2 7.x
Web-Server: Tomcat 5.x
Hibernate 3.1.xActually the problem is ONLY symbol � - scharfes S. Other umlauts are shown correctly...
What is wrong with that symbol????
Many thanks in advance,
Giorgi -
Has anyone been able to discern the differences (pro or con) between using
A. IBM Toolbox for Java JDBC Driver (aka 5722JC1) - type 4 JDBC driver - OS-independent.
B. IBM Developer Kit for Java JDBC Driver - type 2 Native JDBC driver - only runs on iSeries - uses OS-dependent optimizations.
This 'choice' is part of the early stages of installationHi Doreen, Volker
Volker, I don't agree completely to your statement. Options A and B are equally tested in our labs. Maybe there are slight differences in test coverage but not by intention.
It is important to know the following regarding the drivers:
- Option A (toolbox driver) must be used when the system is distributed on multiple host (iSeries 3 tier, Linux or Windows App Servers)
- Option B (native driver) offers performance benefits
So, if it is planned to run the system on one single host, I'd prefer the native driver. For 3-tier or App Servers, toolbox driver must be chosen.
However, if you have installed a native driver system and want to install an App Server some time later, you can always switch to toolbox, SAP note 826449 describes how to do that.
Best regards, Christoph -
Insert data 32K into a column of type LONG using the oracle server side jdbc driver
Hi,
I need to insert data of more than 32k into a
column of type LONG.
I use the following code:
String s = "larger then 32K";
PreparedStatement pstmt = dbcon.prepareStatement(
"INSERT INTO TEST (LO) VALUES (?)");
pstmt.setCharacterStream(1, new StringReader(s), s.length());
pstmt.executeUpdate();
dbcon.commit();
If I use the "standard" oracle thin client driver from classes_12.zip ("jdbc:oracle:thin:@kn7:1521:kn7a") every thing is working fine. But if I use the oracle server side jdbc driver ("jdbc:default:connection:") I get the exception java.sql.SQLException:
Datasize larger then max. datasize for this type: oracle.jdbc.kprb.KprbDBStatement@50f4f46c
even if the string s exceeds a length of 32767 bytes.
I'm afraid it has something to do with the 32K limitation in PL/SQL but in fact we do not use any PL/SQL code in this case.
What can we do? Using LOB's is not an option because we have client software written in 3rd party 4gl language that is unable to handle LOB's.
Any idea would be appreciated.
Thomas Stiegler
nullIn rdbms 8.1.7 "relnotes" folder, there is a "Readme_JDBC.txt" file (on win nt) stating
Known Problems/Limitations In This Release
<entries 1 through 3 omiited for brevity >
4. The Server-side Internal Driver has the following limitation:
- Data access for LONG and LONG RAW types is limited to 32K of
data. -
Oracle JDBC thin driver(10g) returns "int/smallint" as JDBC Decimal type
Hi,
I am using Oracle type 4 thin JDBC driver for 10g. In our code we decide
column type by querying the database using database metadata (as code snippet below)
DatabaseMetaData dbmd = Connection.getMetaData() ;
ResultSet rs = dbmd. getColumns() ;
String fieldName = rs.getString("COLUMN_NAME");
short dataType = rs.getShort("DATA_TYPE");
String typeName = rs.getString("TYPE_NAME");
Now, if I have a table with datatype "integer", "smallint" etc,
DATA_TYPE returned from above is "3" , which is in JDBC is defined constant
for "java.sql.Types.Deciaml"
Question is , How do i exactly get DATA_TYPE code for
"integer" or "smallint" and not "Decimal" ?
I have tested with few other databases with above snippet code and they do return actual DATA_TYPE as "integer" or "smallint"
This is with Oracle 10g database and Oracle 10g thin (type4) jdbc driver.
Thanks,
Chiraguser565580,
As has been already stated, Oracle does not have data-types INTEGER or SMALLINT, only NUMBER.
So even though Oracle lets you write INTEGER, it really creates a NUMBER.
(As Joe mentioned.)
Other databases don't have a NUMBER data-type, they have INTEGER, SMALLINT, etc.
Originally, Oracle database only had three data-types:
CHAR
DATE
NUMBER
If you're going to be working with Oracle database, then you need to adapt yourself to its limitations.
So you'll probably need to define NUMBER data-types using scale and precision.
(As Kuassi mentioned.)
Good Luck,
Avi. -
....in 'DD-MMM-YY' format from an Oracle 8i database and pass it in to the java.util.Date() constructor, I get a IllegalArgumentException. This error doesn't occur when I use the type 2 driver, so it is apparently a driver-specific thing. It happens on both Win32 and Linux.
Has anyone seen this before? Is there a newer version of the Oracle thin (i.e., type 4) driver than is listed here?
http://web77-02.us.oracle.com/software/tech/java/sqlj_jdbc/content.html
Thanks,
Tom
[email protected]Yup, that original post didn't make much sense, did it? Let's try again.
I've got an EJB app that runs on WebLogic 6.0 (on Solaris in production, on Win2K for development) and accesses an Oracle 8i database. This app currently uses the Oracle type 2 JDBC drivers. All is well.
So I wanted to see how it would run on Linux. I've got a Redhat 7.1 box handy, so I installed the JDK and WL6.0 and slapped the ear file on there. Problem! Can't deploy because there are no Oracle drivers on this machine!
Makes sense. So I started looking around, and it seems installing Oracle on a RH 7.1 box involves patching glibc and other such nastiness. So let's just try the type 4 JDBC driver - no glibc patch, no shared object libraries, just good 'ol pure Java talking to Oracle on port 1521.
Once I had the URLs and whatnot set up, the app connected to the DB just fine, created the connection pool, read some data, etc. But when my app read a date from the DB and instantiates a new java.util.Date object, I got an IllegalArgumentException - i.e., the date can't be parsed.
"Hmm... that's odd", I thought, so back I went to my trusty Win2K machine, modified my configuration files to use the type 4 driver and - same error! So I switched back to the type 2 driver - and everything works fine, Dates and all. Hmmm.....
As you correctly state, that Date constructor is deprecated and I should use DateFormats and GregorianCalendars and whatnot instead.
But has anyone seen this weird behavior before - code that works fine on a type 2 driver starts throwing exceptions when used with a type 4 driver? Anyone have any solutions?
Thanks much,
Tom -
Type 2 jdbc driver cause weblogic thread dump
we have weblogic 5.1(sp6) running on redhat linux 7.1
we install oracle client (8.1.7.0.0) and jdbc12(classes12.zip).
the connection pool use type 2 driver
oracle.jdbc.driver.OracleDriver
the jdk is 1.3.1 b24 (we have try -native -server -hotspot)
sometime weblogic crash , the error output is:
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0x51dc0310
Function name=kpufGetRcvInfo
Library=/usr/local/oracle/product/8.1.7/lib/libclntsh.so.8.0
Current Java thread:
at oracle.jdbc.oci8.OCIDBAccess.close_query(Native Method)
at oracle.jdbc.oci8.OCIDBAccess.closeQuery(OCIDBAccess.java:541)
at oracle.jdbc.driver.OracleResultSetImpl.internal_close(OracleResultSet
Impl.java:627)
at oracle.jdbc.driver.OracleResultSetImpl.close(OracleResultSetImpl.java
:118)
at weblogic.jdbcbase.pool.ResultSet.close(ResultSet.java:166)
at weblogic.jdbc20.rmi.internal.ResultSetImpl.close(ResultSetImpl.java:5
1)
at weblogic.jdbc20.rmi.SerialResultSet.close(SerialResultSet.java:54)
for some reason , we can't change to type 4 driver .
any advice is very thanksHi Owen,
You may have to get the latest patchset from oracle for your OCI client
libraries. You should talk to Oracle support about this problem as the core
dump is due to Oracle's driver.
sree
"Owen He" <[email protected]> wrote in message
news:3cf5940c$[email protected]..
>
we have weblogic 5.1(sp6) running on redhat linux 7.1
we install oracle client (8.1.7.0.0) and jdbc12(classes12.zip).
the connection pool use type 2 driver
oracle.jdbc.driver.OracleDriver
the jdk is 1.3.1 b24 (we have try -native -server -hotspot)
sometime weblogic crash , the error output is:
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0x51dc0310
Function name=kpufGetRcvInfo
Library=/usr/local/oracle/product/8.1.7/lib/libclntsh.so.8.0
Current Java thread:
at oracle.jdbc.oci8.OCIDBAccess.close_query(Native Method)
at oracle.jdbc.oci8.OCIDBAccess.closeQuery(OCIDBAccess.java:541)
atoracle.jdbc.driver.OracleResultSetImpl.internal_close(OracleResultSet
Impl.java:627)
atoracle.jdbc.driver.OracleResultSetImpl.close(OracleResultSetImpl.java
:118)
at weblogic.jdbcbase.pool.ResultSet.close(ResultSet.java:166)
atweblogic.jdbc20.rmi.internal.ResultSetImpl.close(ResultSetImpl.java:5
1)
atweblogic.jdbc20.rmi.SerialResultSet.close(SerialResultSet.java:54)
>
>
for some reason , we can't change to type 4 driver .
any advice is very thanks -
8.1.7 jdbc driver: object types with double quotes
Hi all,
While switching from 8.1.6 to 8.1.7 I have trouble with the jdbc driver. It doesn't work
as before: The function CallableStatement.registerOutParameter (and probably some other) doesn't take object type
names in double quotes anymore. A test program is appended to this message. Using a 8.1.6 jdbc driver this program works fine but with a 8.1.7 jdbc driver it throws an exception.
My questions are: Is this bug already filed?
Is a bugfix already available somewhere?
Thanks in advance for any information
Joerg
import java.sql.*;
* create type "test_t" as object (atrb number(10));
* create table "test" of "test_t" (atrb not null) oidindex();
class test
public static void main (String args [])
throws SQLException
String s = "begin insert into \"test\" t values (1)" +
" returning ref(t) into ?; end;";
try{
DriverManager.registerDriver(new
oracle.jdbc.driver.OracleDriver());
Connection conn = DriverManager.getConnection
("jdbc:oracle:thin:@host:1521:orcl","joerg", "password");
CallableStatement cs = conn.prepareCall( s );
cs.registerOutParameter(1, Types.REF, "\"test_t\"");
cs.execute();
System.out.println("Statement returned:");
System.out.println( cs.getObject(1) );
cs.close();
conn.commit();
conn.close();
catch(SQLException e){
System.out.println("SQLException was thrown...");
System.out.println(e.getMessage());
}I believe that typenames are always treated as case sensitive (unless they are all uppercased).
In your example you should write:
cs.registerOutParameter(1, Types.REF, "test_t");
If you had declared the type test_t in a case insensitive way (without "..."), then you'd have to write:
cs.registerOutParameter(1, Types.REF, "TEST_T");
If you have a schema-qualified name, use a ".":
cs.registerOutParameter(1, Types.REF, "SCOTT.test_t");
However, this behavior implies that you cannot use "." inside of quoted identifier names. -
WLS 8.1 Type 4 JDBC Driver SQL Server sp_prepare/sp_execute
Hello,
I have a question regarding performance troubleshooting in a production situation using the WLS 8.1 Type 4 JDBC Driver for SQL Server and SQL Server 2000.
This driver compiles a sql statement on the sql server using sp_prepare(), saving a handle to it. It will execute the statement using sp_execute(). Subsequent uses of the same statement will skip the sp_prepare(), and just call sp_execute(). So, ideally, for a particular statement, you should see one sp_prepare, and a lot of sp_execute's.
My WLS app is running along in production, and I detect a performance problem of some sort on the sql server, such as excessive IO, or blocking.
I turn on the sql server profiler, and I can see a bunch of
sp_execute 123, 'one', 'two'
sp_execute 123, 'foo', 'bar'
with bad IO. How do I determine what the original SQL was that was used in the sp_prepare?
The only way I can see to do this is to have the sql server profiler always running to catch every sp_prepare. I can't believe that this is a best practice.
How are you all handling this type of situation?
Thanks,
DaveDave Ballard wrote:
Hi Joe,
Thanks for the suggestions. The main issue I have with both is that they
require a server restart to enable. Can't do that on my production system.
The best I've come up with since I posted is to locate the poor
performer/blocker real-time via sysprocesses, then use the sqlhandle column
to call fn_get_sql to get at least some of the sql submitted with sp_prepare().
Not pretty and difficult to do on a busy system.
What's bugging me about the sp_prepare/sp_execute technique used by the driver is:
1) sp_prepare/sp_execute don't seem to be documented anywhereThey are internal to SQLServer, so it'd be MS to document them or not.
2) It is at best inconvenient to have to troubleshoot performance issues (requiring
a server config change, server restart, and manual reconcile of two different,
possibly very large, logs based on timestamp).
Your idea to disable the stored procedure cache is interesting, but still requires
a server restart to enable, and another to disable.
To me this is a large step backwards in manageability of my system. What I don't
understand is that I don't see much discussion about this topic on any forums,
so I wonder if I'm just missing something here (maybe everyone's using Oracle).No, the same sorts of issues would be needed with Oracle. DBMSes must make tradeoffs
between normal-case runtime performance, and the instrumentation that would be needed
to simultaneously monitor performance problems.
Joe
>
Thanks,
Dave -
WebLogic 8.1 SP2 bug in JDBC Pool creation for IBM Informix Driver - Type 4 XA
Funny business happens when you create a JDBC Connection Pool with IBM's Informix Driver - Type 4 XA under WebLogic 8.1 SP2
I have included the ifxjdbc.jar and ifxjdbcx.jar in the classpath in the the extENV.cmd, but I kept getting errors on connection:
weblogic.common.ResourceException: 0:com.informix.asf.IfxASFException: Attempt to connect to database server (myhost) failed. - with nested exception:
[weblogic.common.ResourceException: com.informix.asf.IfxASFException: Attempt to connect to database server (myhost) failed.]
at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1180)
at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1040)
Then I realised the WebLogic console was swapping these properties:
serverName=ol_myserver
ifxIFXHOST=myhost
Terrible forehead-slap!
I rechecked and this what happens:
Informix Server: -> ifxIFXHOST
Host Name: -> serverName
But the URL is correct.
jdbc:informix-sqli://myhost:1543/mydb:informixServer=ol_myserver
Notice that the exception message says:
Attempt to connect to database server (myhost) failed.
AlphaAlpha Lau wrote:
Funny business happens when you create a JDBC Connection Pool with IBM's
Informix Driver - Type 4 XA under WebLogic 8.1 SP2
I have included the ifxjdbc.jar and ifxjdbcx.jar in the classpath in the
the extENV.cmd, but I kept getting errors on connection:
weblogic.common.ResourceException: 0:com.informix.asf.IfxASFException:
Attempt to connect to database server (myhost) failed. - with nested
exception:
[weblogic.common.ResourceException: com.informix.asf.IfxASFException:
Attempt to connect to database server (myhost) failed.]
at
weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1180)
at
weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1040)
Then I realised the WebLogic console was swapping these properties:
serverName=ol_myserver
ifxIFXHOST=myhost
Terrible forehead-slap!
I rechecked and this what happens:
Informix Server: -> ifxIFXHOST
Host Name: -> serverName
But the URL is correct.
jdbc:informix-sqli://myhost:1543/mydb:informixServer=ol_myserver
Notice that the exception message says:
Attempt to connect to database server (myhost) failed.
AlphaHi. If the URL has a particular property value, then don't add the property
redundantly in the pool's properties.
Joe -
Does anyone know of a type 2 JDBC driver for MS SQL Server?
Hi,
Does this help at all?
http://industry.java.sun.com/products/jdbc/drivers
Regards,
Matt
Java Developer Technical Support
Sun Microsystems
http://www.sun.com/developers/support/
Maybe you are looking for
-
Report: sorting of data and temporary table sorting
We have a report that runs a procedure, which inserts data into a temporary table using the supplied parameters. The report then selects data from this table. Previously the report has always displayed data in the same order in which it was inserted
-
Realplayer Files Won't Open- Require Constant Authorization
Windows XP Desktop I have recently transferred some songs from the media player Realplayer. However, while they work independent from the computer when connected they will not play at all. iTunes just keeps popping up saying that the computer needs t
-
Hi, With the new FormattedTextView in 2004s one will be able to render xhtml compliant rich test in Webdynpro. This however only covers the rednering of rich text. There still does not seem to be a rich text editor control available for webdynpro app
-
Can I Transfer Dot Mac Pages to iWeb?
Do any of you know if it is possible to take web pages I created using the online templates with Dot Mac (http://homepage.mac.com/bingalls) and move them into iWeb for editing? My plan will be to move all of my pages to my own domain but people are u
-
Query - Counting customers based on Top 80% condition
Hi all, We have a query, which counts the number of customers that makes up 80% of the sales. We have used a condition to do this. This works out quite well when we only have the customer in the drill down. However if we also include f.x. Division in