by Vikram Khatri | May 20, 2009
I am going to show you an easy way to do online schema changes in DB2. The best to learn things is by doing some simple examples. My intent is to make you an expert in 1/2 hour if you learn the following concepts. Create a database with and without automatic storage...
by Vikram Khatri | Apr 30, 2009
Finally DB2 implemented a long standing demand for setting the Java application name so that you could see the name through DB2 utilities instead of seeing db2jcc_applica. You set a connection property clientProgramName to your chosen name and the db2 utilities will...
by Mark Mulligan | Apr 27, 2009
There are DB2 LUW configuration parameters that can be set to AUTOMATIC and managed by the DB2 automatic memory manager (STMM). One advantage of this is that DB2 will automatically adjust the memory it uses to get the work done based on the characteristics of the...
by Vikram Khatri | Apr 22, 2009
Use this DB2 Stored Procedure to build an INSERT statement. This is very useful when you are developing some Java or .Net program or any other program and need an easy way to do this. Thanks to Serge Rielau of DB2 Toronto lab for sharing this with the DB2 community....
by Vikram Khatri | Mar 5, 2009
Thanks to Serge Rielau for insight in DB2 MERGE. For example, if you have this Oracle UPDATE statement and wondering how can you use this in DB2. Here is the solution. Oracle UPDATE UPDATE ( SELECT clm.c2 wc1, m.c2 wc2 FROM schema1.table1 m, schema1.table2 clm WHERE...
by Vikram Khatri | Jan 14, 2009
If you have DB2 scripts that you want to run through your Java programs, you normally use Runtime.getRuntime().exec method to run system commands. The following sample code tells how to run DB2 scripts. The following code shows it for both Windows and Unix systems....
by Vikram Khatri | Jan 10, 2009
Are you looking for Matt Devlin’s Perl Scripts for DB2? Even though, they are old but still they are relevant with new release of DB2 particularly if you know how to modify them. Matt Devlin’s website http://mattdevlin.net is no longer available but you...
by Vikram Khatri | Dec 18, 2008
If you use MTK (Migration Toolkit from IBM) to migrate your database to DB2 on Windows platform, the migration goes smooth but you may see problem when you FTP data file and LOAD script to Unix platform if you do not do it right. For example, you chose ASC (ASCII)...
by Mark Mulligan | Nov 26, 2008
Mark Mulligan – (mark.mulligan.sr@sbcglobal.net) DB2 DBA 29 November 2008 Download Scripts Introduction Have you ever run the db2 “call get_dbsize_info(?,?,?,0)” command to get the size of your DB2 LUW database and noticed that the size is much smaller...
by Mark Mulligan | Nov 21, 2008
Mark Mulligan – (mark.mulligan.sr@sbcglobal.net) DB2 DBA 16 November 2008 Introduction If you have application jobs or users that run the DB2 load utility and would like to keep track of this information over time there is valuable information stored in the DB2...
by Vikram Khatri | Nov 14, 2008
Thanks to Max Petrenko of DB2 Toronto Lab for sharing a very useful script to remove check pending status from the DB2 tables after LOAD or other operations. It is easy to generate a check pending script, but the importance of this script is that it builds the...
by Mark Mulligan | Nov 14, 2008
Mark Mulligan – (mark.mulligan.sr@sbcglobal.net) DB2 DBA 01 November 2008 A critical part of any database disaster recovery plan is to make sure that the environment surrounding the database is the way it was before the disaster in order to provide the same level of...
by Vikram Khatri | Aug 11, 2008
Say, you want to concatenate all rows of a column and show it as a single row in the same fashion aggregate function works. $ db2 “create table t1(line# int not null, word varchar(20))” $ db2 “insert into t1...
by Vikram Khatri | Jul 11, 2008
Edin I. Aganagic shares his tips on how to increase incremental refresh/maintenance performance of MQTs in DB2. Create an index on the GROUP BY columns. It helps speed up MQT look-ups needed to decide whether existing row needs to be changed, new one inserted, or last...
by Vikram Khatri | Jul 8, 2008
Download DB2 Logger from here Make sure that you read Readme.txt file before you compile the tool.
by Vikram Khatri | Jul 7, 2008
You can always turn off global logging by setting global_logging to N. However, if you want to shave every millisecond from your stored procedure’s execution time, comment out all CALL DB2. statements when you are sure that your SQL-PL or external stored...
by Vikram Khatri | Jul 7, 2008
The logger stored procedures run under the DB2 fenced user. Log in as the DB2 fenced user and try again to remove it. If the DB2 fenced user is nobody, ask your system administrator to free the shared memory using the ipcrm command.
by Vikram Khatri | Jul 7, 2008
Yes. This is an open source stored procedure logger. Please retain the IBM Copyright message in each source file.
by Vikram Khatri | Jul 7, 2008
Did you copy the bldrtn and bldapp files from ~/sqllib/samples/c to your directory? Try again and if you still get error, please send me a note and tell me what did you do to fix the errors.
by Vikram Khatri | Jul 7, 2008
I have not tested this framework on the Solaris platform. Please let me know the errors and I will try to fix them.