If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > DB2 Native driver vs Type4 driver

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-10-10, 05:30
jackfruit jackfruit is offline
Registered User
 
Join Date: Jul 2010
Posts: 2
DB2 Native driver vs Type4 driver

Choice of appropriate drivers for connecting to DB2 database from BO Crystal Reports We have created Crystal reports by successfully connecting them to DB2 database using ODBC, JDBC(Type4 driver) and DB2 Unicode drivers.Which one out of the following three are we supposed to use so that we could get a better performance.
which is better in performance DB2 Native driver or Type4 driver
Reply With Quote
  #2 (permalink)  
Old 08-10-10, 06:44
dr_te_z dr_te_z is offline
Registered User
 
Join Date: Jan 2009
Location: Zoetermeer, Holland
Posts: 555
You talk about Crystal Reports and type-4 drivers. I assume that Crystal Reports is a java-app?
Is you application on the same server as the database?
Then I would recommend the type-2 driver
Else I would recommend the type-4 driver
Reply With Quote
  #3 (permalink)  
Old 08-10-10, 10:39
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
What is the difference between type-2 and type-4 drivers? How do you tell which one an application is using?

Last edited by db2girl; 08-10-10 at 10:45.
Reply With Quote
  #4 (permalink)  
Old 08-10-10, 11:00
n_i n_i is online now
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Type 2 is what was formerly called the "app" driver, I think it works through CLI. Type 4 is Java-only, and it supports most of JDBC 3.0.
Reply With Quote
  #5 (permalink)  
Old 08-10-10, 11:45
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
How do you decide what to use with your application? How do I tell what the application is using, type 2 or type 4?
Reply With Quote
  #6 (permalink)  
Old 08-10-10, 11:56
n_i n_i is online now
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
You use type 4 unless there is some reason why your application must use type 2 (which is deprecated anyway). The driver type is determined by the Java class name that you load, COM.ibm.db2.jdbc.app.DB2Driver (hence the "app" name) vs. com.ibm.db2.jcc.DB2Driver.
Reply With Quote
  #7 (permalink)  
Old 08-10-10, 12:27
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
How can a DBA determine the driver type their application is using without asking developers? Will some trace show com.ibm.db2.jdbc.app.DB2Driver or com.ibm.db2.jcc.DB2Driver? Or some other way?
Reply With Quote
  #8 (permalink)  
Old 08-10-10, 12:57
n_i n_i is online now
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
I think the driver name shows in the application snapshot, at least for type 4.
Reply With Quote
  #9 (permalink)  
Old 08-10-10, 16:13
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
Do you know what to look for in the application snapshot? Application name or something else?

I've seen db2jcc_application for the application name in the application snapshot / list applications. Does db2jcc_application indicate it's a type 4 driver?
Reply With Quote
  #10 (permalink)  
Old 08-10-10, 16:16
n_i n_i is online now
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Yes, I think it does.
Reply With Quote
  #11 (permalink)  
Old 08-10-10, 20:52
guygetsgirl101 guygetsgirl101 is offline
Registered User
 
Join Date: Aug 2010
Posts: 1
guy likes you

If Crystal Reports is a java-app. What type of driver would you recommend? type-2 driver or type 4?

guy likes you
Reply With Quote
  #12 (permalink)  
Old 08-11-10, 01:39
dr_te_z dr_te_z is offline
Registered User
 
Join Date: Jan 2009
Location: Zoetermeer, Holland
Posts: 555
Quote:
Originally Posted by db2girl View Post
How can a DBA determine the driver type their application is using without asking developers? Will some trace show com.ibm.db2.jdbc.app.DB2Driver or com.ibm.db2.jcc.DB2Driver? Or some other way?
Developers develop java-source containing JDBC-logic. Which jdbc-driver is used in production is mostly the choice of the DBA.

I would always recommend the type-4 driver except when the application is on the same server as the database. In that case squeezing all the db-traffic through a tcp-ip socket (event if it is localhost) could become a bottleneck.
Reply With Quote
  #13 (permalink)  
Old 08-11-10, 22:20
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
Quote:
Originally Posted by dr_te_z View Post
Which jdbc-driver is used in production is mostly the choice of the DBA.
Do most DBAs really know enough about this in order to decide which one to use??
Reply With Quote
  #14 (permalink)  
Old 08-11-10, 23:21
n_i n_i is online now
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Quote:
Originally Posted by db2girl View Post
Do most DBAs really know enough
If they don't, I think they should.
Reply With Quote
  #15 (permalink)  
Old 08-12-10, 10:12
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
The more you know the better.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On