DB2 Support for Data Migration When it is time to upgrade from DB2 on Intel to DB2 on Power for example, taking a backup/restore approach isn’t possible as DB2′s backups are platform dependent. The solution is to use a DB2 command called db2move. Basics of db2move db2move allows to export data from DB2 at different [...]
Migrating Data to DB2 9.7 LUW
Problem You reached the limit or your unhappy with the performance or features of your database server, and you want to move to DB2. The transition can be simple with respect to your code, as it may be just a matter of changing a few lines of code for the connection string, and setting the [...]
DB2 9.7.2 Log files on Windows 7
Problem Since Windows Vista (that includes Windows 7), the place where programs store some of their information has changed. This makes finding the DB2 log files (equivalent of db2diag.log) more difficult. Solution The log files have moved under the directory tree node C:/Program Data/IBM/DB2/DB2COPY1/DB2. Under that directory there is a log and an events directory. [...]
Create Explain Tables in DB2 9.7
Problem The explain tables allow to create access plans and visualize them. Before the explain feature of DB2 can be used, the EXPLAIN tables need to be generated. Solution To create the EXPLAIN tables, the following command needs to be issued while connected to the database that the access plain needs to be generated in: [...]
Compiling C code on Windows 7 for DB2 9.7 64bit
Problem The %DB2PATH%\SQLLIB\samples\c directory on windows contains many examples of C routines to extend DB2 or to work with DB2 from C programs. This article describes how to compile the sample code for 64 bit. Solution Set the environment (VC includes the batch file that allows to set the environment variable): C:\progra~2\micros~2.0\vc\vcvarsall.bat x64
Netapp Automation for DB2 9.7 (or Oracle)
Problem You have one or more NetApp storage systems (F960 or later series), running Data ONTAPĀ® 7G (or later). You would like to take advantage of the snapshot capabilities, to facilitate the database backup process. However, you don’t want to use the default root login for the automated logins, nor do you want to use [...]
DB2 Query Writing Best Practices
Problem Writing efficient SQL SELECTqueries for DB2 can be tricky. Some general SQL guidelines apply, and there are also specific practices that apply only to DB2. Solution Here is a list of tips you can use to write good SELECT queries: Avoid SELECT * in your queries. Instead, state the columns you want to select. [...]
DB2 Discovery Kit
I have posted a number of tips to use DB2. If you haven’t used DB2 before, it is one of the best databases out there, and best of all, it is available completely free from IBM. Get your DB2 discovery kit from IBM. As Grant Allen puts it in Beggining DB2, “IBM has even thought [...]
Register DTD for pureXML with DB2 9.7
Problem Even though XML schema has been around for a decade, still many APIs reference a DTD in the XML documents sent back and fourth. Such is the OpenSRS API. DB2 requires an XML schema or a DTD to be registered before it will process XML documents that refer to an XML Schema or a [...]
Change Host Name of DB2 9.7 Server on AIX
Synopsis After changing the name of the host on which DB2 9.7 is running, the following error message is received when trying to start the database: 09/28/2009 02:32:50 0 0 SQL6048N A communication error occurred during START or STOP DATABASE MANAGER processing. SQL1032N No start database manager command was issued. SQLSTATE=57019 Solution For each database [...]