Slakshmi 060001JD9S Visits (366)
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.
a) On DB2 Primary system:
Step 2: UPDATE THE JDBC CONNECTION URL WITH THE clie
Sample program to test the automatic Client re-route:
To compile the program:
Step 3: Once you run the above program, it connects to the primary. On the DB2 server, do a failover to the standby. Now the application will automatically re-route the connection to the former standby.
John G 2700020XST Visits (876)
Using Virtual IP (VIP) provides a more elegant solution for Automatic Client Reroute between HADR Primary and Standby servers. The client does not have to be aware of the IP address of the Primary or the Standby server and can connect to the database only via the VIP. In cases where there have to be changes made to the Primary and Standby IP address/hostname, the client is still able to connect to the Primary using the VIP. Here is a demo showing VIP in action
KateDawson 060001TQ2C Visits (472)
As we wind down 2013, we thought it would be fun to see our most popular posts of the year:
Here is a list of the most popular posts since launching this blog waaaaaaaay back in 2009:
And finally, here is a link to the 100 technical support tip series we ran in 2011 and 2012:
Slakshmi 060001JD9S Visits (739)
Looking for information about end of support dates for DB2 products on Linux, Unix and Windows to plan ahead for upgrade?
Here are the some links you will find it useful.
List of End of support dates for different versions of DB2 Products on Linux, Unix and Windows:
Common FAQ on End of Support products:
MaryKassey 270002GKDM Visits (759)
Check this out!
Here is a full list of Developer Works articles on DB2 for Linux, Unix and Windows Optimizer that our experts have published to this date which you may find useful.
We hope that you find these articles useful and keep watching for more!
Tech Tip: IBM Universal JDBC Driver behavior when calling ResultSetMetaData.getColumnName and getColumnLabel against a DB2 LUW server
MaryKassey 270002GKDM Visits (1816)
For the IBM® Data Server Driver for JDBC and SQLJ version 4.0 and later, the default behavior of Resu
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 useJ
1) Example of Resu
2) Example of Resu
Conclusion: From the above examples, we see that 3.62.56 uses the label name getInt (DW_TRADE_HIER_ID) and
4.12.55 actually uses the column name getInt (DW_POSITION_ID). It is
expected that JCC throws an exception when using getColumnName with JDBC 4.0
driver. If users want to use getColumnName instead of getColumnLabel with JDBC 4.0
gorddbds 060001JCXS Visits (957)
Additional information on CLPPlus can be found at the following URLs.
A Basic Description of the Utility.
CLPPlus command line options.
Running a script file with CLPPlus
Slakshmi 060001JD9S Visits (1069)
An ODBC driver manager is not supplied on UNIX platforms as part of the operating system. Using ODBC on UNIX systems, therefore, requires a separate commercial or open source ODBC driver manager.
The unixODBC Driver Manager is an open source ODBC driver manager for use on UNIX platforms. This driver manager is supported for ODBC applications on supported DB2® platforms.
To run ODBC applications on Linux or UNIX operating systems, you must configure the UnixODBC Driver Manager.
Here are the steps to install and configure UnixODBC for ODBC applications connecting to DB2 database using IBM DB2 ODBC driver:
1) Download the latest unixODBC source code from here
2) Untar the source files.
gzip -d unix
3) For AIX® only: Configure the C compiler to be thread-enabled:
To compile a 64-bit version of the driver manager using the xlc_r compilers, set the environment variables OBJECT_MODE and CFLAGS:
4) Install the driver manager in either your home directory or the default /usr/local prefix:
(Home directory) Issue the following command in the directory where you untarred the source files:
Here is an example to install the UnixODBC driver manager in a DB2 instance home directory on a 32 bit Linux server:
Log in as the DB2 instance owner(example: db2v97) and run the following command from the directory where the UnixODBC source files are untarred:
./configure --prefix=$HOME --enable-gui=no --enable-drivers=no
5) Build and install the driver manager:
<The above steps will create the /lib, /include, /bin for the UnixODBC driver manager under DB2 instance home directory - /home/db2v97>
6) Add that path to the lib to LD_LIBRARY_PATH:
7) Create odbc.ini and odbcinst.ini as per the documentation: