with Tags:
jdbc
X

All posts
- Sort by:
- Date
- Title
- Likes
- Comments ▼
- Views
75 ways to demystify DB2: #53: Techtip: How to find DB2 JDBC driver version and relate it to DB2 version?
Hello! We often get a question from customers "How to find the version of DB2 JDBC driver they are using?" Answer is simple, you need to run below command: The following command will retrieve the JCC driver version if executed from the command line: java com.ibm.db2.jcc.DB2Jcc -version Or for drivers that are not yet installed: java -cp ./db2jcc.jar com.ibm.db2.jcc.DB2Jcc -version For eg. Once you find the DB2 JDBC driver version, next question will be, "What DB2 release it belongs to?" We have... [More]
Tags:  75_db2demystify db2_techtip driver jdbc version |
50 DB2 Nuggets #40: Tech Tip - Configuring pureScale Client Affinity with Tomcat
The pureScale client affinity feature allows client specification of a single primary server and failover sequence to alternate servers and all rerouting is controlled by the client driver. That means all you have to do is basically configuring the right DB2 JCC JDBC properties in your WAS(Web Application Server) side. However the reality is many people has difficulty about how to have right setting about pureScale client affinity during configuration and failover test. For having right configuration for them, some people take over 2 weeks or 4... [More]
Tags:  purescale db2 jdbc clientaffinity db2_techtip 50_db2_nuggets tomcat jcc |
Hands-on example for JDBC tracing(jcc trace) by using DB2JccConfiguration.properties file
There are several ways to enable JDBC tracing(jcc trace) but the easiest way is tracing by using DB2JccConfiguration.properties file because you don't need any application change. I am posting actual example with sample java program compile and execution to show actual steps. If you cannot get trace files from your java program (e.g. WAS) even after restart, you can test these steps to see if your tracing configuration is working or not. This article is composed of the following 6 steps.... [More]
Tags:  jcc jdbc trace |
How to enable DB2 JDBC JCC trace on Tomcat and Weblogic
In case of collecting DB2 JCC trace on client side, we can find the detail from the following link for standalone java and IBM WebSphere. Collecting Data: Tracing with the IBM Data Server Driver for JDBC and SQLJ Then, how can we do the same thing on other WAS products. All WAS(Web application server) products are basically java processes. Therefore no matter what product you are using, enabling DB2 JCC trace is not other than the following 3 steps from Java perspective. 1.... [More]
Tags:  jcc jdbc |
75 ways to demystify DB2 #66: Best practices for SSL connection with IBM DB2 JDBC Driver(db2jcc)
As of now, many of our customers are using IBM DB2 JDBC Driver(db2jcc.jar/db2jcc4.jar) to connect to DB2 server and configured SSL & normal database connectivity with end products such as WAS, OPM, Cloud and DataStudio etc. There are also a lot of you who are continuing to use SSL connection of JDBC for accessing your database server. Some of the tips in this blog will help to simplify the SSL connectivity with DB2 server. SSL Simplification: Many of you who prefer to configure the CA certificate instead of self signed certificate. If DB2... [More]
Tags:  75_db2demystify db2 driver jcc ssl jdbc |
75 ways to demystify DB2 #65: Techtip : Is enableSysplexWLB a JDBC driver-wide (global) property or a connection level property?
Is enableSysplexWLB (Sysplex Workload balancing JDBC driver property) a data source property or a driver wide (global) property? Answer) enableSysplexWLB is not a driver-wide or a global property, so you cannot set it in the JCC properties file. These are properties starting with "db2.jcc.*" and "db2.jcc.override.*". The "db2.jcc." properties provide a driver wide default value. It is a Data source or connection level property, so it can only be enabled programmatically inside the application via a... [More]
Tags:  db2 75_db2demystify jdbc driver enablesysplexwlb |
Weekly Tips from DB2 Experts: Demo of DB2 connectivity using type 2 Universal JDBC Driver
In this demo, I have considered the following to demonstrate DB2 connectivity using type 2 Universal JDBC type 2 driver with 32-bit and 64 application: - Downloaded IBM 32-bit JDK for Windows from the web: http://www.ibm.com/developerworks/java/jdk/ - Installed DB2 V9.7 FP5 64-bit Client on Windows 7 - DB2 V10.1 FP4 database server on Linux. Used the following sample code: import java.sql.Connection; import java.sql.DriverManager; import java.sql.*; import java.sql.SQLException; public... [More]
Tags:  type2 jdbc db2;db2_advice |
50 DB2 Nuggets #32 : Resource Info - Comparing JDBC Type 4 and type 2 connections
The current JDBC driver shipped with DB2 called the IBM CLIENT DRIVER FOR JDBC AND SQLJ can function as both a JDBC Type 4 and JDBC type 2 driver. Type 4 Mode When functioning as a JDBC type 4 driver, the driver is independent of the DB2 Client and only the driver jar db2jcc.jar or db2jcc4.jar need be installed. In this mode all TCP/IP command execution and routing is done through Java. In type 4 mode the driver requires the TCP/IP name and port of the server and uses the name of the database alias at the server. If a Z/OS DB2... [More]
Tags:  50_db2_nuggets type2 type4 jdbc |
50 DB2 Nuggets #30 : Tech Tip - Using getDBGeneratedKeys method with Batch inserts in a JDBC application.
From DB2 V9.7 Batched INSERT statements can return automatically generated keys. If batch execution of a PreparedStatement object returns automatically generated keys, you can call the DB2PreparedStatement.getDBGeneratedKeys method to retrieve an array of ResultSet objects that contains the automatically generated keys. Recently I had a customer trying to use getDBGeneratedKeys method with Batch inserts in a JDBC application using JCC driver and was looking for an example. Here is an example of how to use the getDBGeneratedKeys method in a... [More]
Tags:  db2 jdbc 50_db2_nuggets db2_techtip |
50 DB2 Nuggets #17 : Tech Tip - IBM Data Server driver for JDBC & SQLJ files.
When you download IBM Data server driver for JDBC and SQLJ, the tar or zip file (For Example, DB2 V10.1 FP3 driver download is v10.5fp3_jdbc_sqlj.tar.gz file) contains following files: db2jcc4.jar db2jcc.jar sqlj4.zip sqlj.zip Wondering which file to use in your application? Let me explain what those files are and you can decide on which file to use for your application. db2jcc4.jar and db2jcc.jar, both of them are DB2 JDBC driver jar files and are Type 4 JDBC drivers. db2jcc.jar includes functions in the JDBC 3.0 and... [More]
Tags:  jdbc db2 db2_techtip db2jcc 50_db2_nuggets driver im_techtip |
50 DB2 Nuggets #15 : Tech Tip - Implementing encryption from DB2 JDBC program running with ORACLE Java
Hi All! I had opportunity to implement AES encryption from a Java program using a DB2 JDBC driver with ORACLE Java. Here are all the steps I took: 1> On client machine, installed ORACLE Java 7: http://www.oracle.com/technetwork/java/javase/archive-139210.html C:\Program Files\Java\jdk1.7.0_45\jre\bin>java -version java version "1.7.0_45" Java(TM) SE Runtime Environment (build 1.7.0_45-b18) Java HotSpot(TM) Client VM (build 24.45-b08, mixed mode, sharing) 2> On server, I changed the configuration as below to support AES... [More]
Tags:  encryption oracle db2_techtip 50_db2_nuggets db2 jdbc |
50 DB2 Nuggets #5 : Tech Tip - Automatic Client reroute in a JDBC application
Looking for a way to test Automatic Client Re-route using a simple JDBC program that uses IBM data server driver for JDBC & SQLJ (JCC) & JDBC DriverManager Connection? Here are the steps to follow: Step 1 : UPDATE ALTERNATE SERVER INFORMATION in BOTH PRIMARY & STANDBY SERVERS: Lets assume that following are the Primary and Standby Server's hostnames and Port numbers. Primary: test1.ibm.com:50000 Secondary: test2.ibm.com:50000 Database: SAMPLE on both systems. a) On DB2 Primary system: db2 "update alternate server for... [More]
Tags:  50_db2_nuggets db2_techtip jcc client db2 jdbc reroute |
Most popular blogs in 2013!
As we wind down 2013, we thought it would be fun to see our most popular posts of the year: New to IBM InfoSphere DataStage Server ? First step... Download product! Help shape future enhancements to IBM Support Portal, Fix Central, My notifications, Service Request, and more IBM Netezza product names and models numbers IBM Universal JDBC Driver behavior when calling ResultSetMetaData.getColumnName and getColumnLabel against a DB2 LUW server discuss on developerWorks! Here is a list of the most popular posts since launching this blog... [More]
Tags:  netezza jdbc db2 informix datastage |
Tech Tip: IBM Universal JDBC Driver behavior when calling ResultSetMetaData.getColumnName and getColumnLabel against a DB2 LUW server
For the IBM® Data Server Driver for JDBC and SQLJ version 4.0 and later, the default behavior of ResultSetMetaData.getColumnName and ResultSetMetaData.getColumnLabel differs from the default behavior for earlier JDBC drivers. You can use the useJDBC4ColumnNameAndLabelSemantics property to change this behavior. The following examples show the values that are returned for IBM Data Server Driver for JDBC and SQLJ Version 4.0, and for previous JDBC drivers, when the useJDBC4ColumnNameAndLabelSemantics property is not set. The SELECT query contains... [More]
Tags:  jdbc db2 |
Tech Tip: Mapping a Routine to the DB2 Fenced Process (db2fmp) that ran it
DB2 LUW provides the db2pd tool with
two fmp options that when used in conjunction with each other can
provide information which will identify the routine that was running
in a particular db2fmp. The following technote documents a method to
determine which db2fmp a routine ran in using the db2pd tool. http://www-01.ibm.com/support/docview.wss?uid=swg21606838 If a db2fmp entry is logged in the
db2diag.log, the entry should contain the process ID (PID) and thread
ID (TID). Below is a sample of a db2diag.log entry which identifies
the... [More]
Tags:  im_techtip d2pd routine db2 function defined stored procedure luw user udf jdbc |