Download DB2 Upgrade DB2

Donate to Peter Watts legal defense fund

December 11th, 2009 by Leons Petrazickis

My friend and a great sf author Dr Peter Watts has just been beaten up by US border guards and charged with assaulting an officer. This kangaroo circus might end with a two year imprisonment. Please give what you can to his legal defense fund.

Story:
Boing Boing

Send money via Paypal to:
donate@rifters.com

I just donated $50. Cory Doctorow gave $1000. Contesting criminal charges in US court gets very expensive, so every little bit matters.

Posted in personal | 1 Comment »

DB2 Express-C 9.7.1

December 4th, 2009 by Leons Petrazickis

At work, we’ve just put out the 9.7.1 refresh of DB2 Express-C. By all accounts, it’s a solid release. There’s a changelog here, and you can discuss it in the forum.

I recommend picking it up if you are running the free edition of DB2.

Posted in db2 | No Comments »

CASCON 2009 Workshop - Deploying MediaWiki on IBM DB2 in the Cloud

November 4th, 2009 by Leons Petrazickis

I’m hosting a workshop today at CASCON. The resources for it are below.

Materials

Resources

Downloads

Posted in db2, mediawiki | No Comments »

Easy OLTP scaling with DB2 pureScale

October 14th, 2009 by Leons Petrazickis

OLTP is a database use where there are lots and lots of simple transactions or queries. For example, a typical website uses a database in the OLTP way. This is in contrast to a data warehouse, where there is usually only a few complex queries for generating reports.

IBM just announced DB2 pureScale, a way of easily scaling up the number of transactions a database can handle. The scaling is horizontal, in the sense that it’s accomplished by adding more servers rather than making the servers bigger.

DB2 pureScale is:

  • Transparent. Client applications don’t need to know how many database servers there are or which one they are accessing.
  • Easy. Adding a new machine is a matter of running two commands.
  • Resilient. If one node goes down, the other nodes take over and there is virtually no data loss.

There is an upcoming Chat with the Lab about it:

DB2 pureScale: Scaling Databases without Limits
Event Date: 10/21/2009
Event Time: 11:30 - 13:00 EDT (GMT-04:00)
Hosted By: Rav Ahuja (IBM)
Presented By: Sal Vella (IBM), Matt Huras (IBM), Aamer Sachedina (IBM)

Register now

Posted in db2 | No Comments »

MediaWiki with DB2 support 1.16alpha

September 23rd, 2009 by Leons Petrazickis

MediaWiki 1.15 was released with partial DB2 support, but unfortunately there were some changes to the database schema that I missed and it didn’t work out of the box. Since then, I’ve committed several fixes to the main development trunk. The trunk is currently destined to become 1.16alpha, though theoretically I could backport these to the 1.15 branch.

My Apache is currently crashing willy-nilly on startup. Hopefully, there are no silly development bugs left in.:-)

Posted in mediawiki | No Comments »

Error: Unable to open NFC target disk

September 22nd, 2009 by Leons Petrazickis

I ran into the following error while converting a virtual machine on a VMWare ESX Server to OVF using the VMWare OVF Tool.

Disk Transfer Failed
Error: Unable to open NFC target disk

Googling suggested that a network problem or a permissions problem might be at fault. In fact, it turned out the problem was that someone had started the image on the ESX server mid-way through conversion. The OVF Tool cannot convert a running image — it requires a stopped machine. Stopping the vm made the problem go away.

Posted in vm | No Comments »

Selection, Insertion, Deletion, and Updation

August 31st, 2009 by Leons Petrazickis

In the future, we might all say “updation”.

Posted in links | No Comments »

device br0 already exists; can’t create bridge with the same name

August 21st, 2009 by Leons Petrazickis

Here’s how you solve either of the following errors on Ubuntu (and possibly Debian):

device br0 already exists; can't create bridge with the same name
device eth0 is already a member of a bridge; can't enslave it to bridge br1.

Removing the device specs from /etc/network/interfaces and restarting the network doesn’t actually remove the device if already active. You need to do it manually.

List the active devices:

ifconfig | more
 

And then do this to any that you don’t want there, such as br0, eth0, eth1, etc:

ifconfig br0 down
# and so on
 

This deactivates the device. At this point you’ll need to restart the network layer twice:

sudo /etc/init.d/networking restart
sudo /etc/init.d/networking restart
 

And you should be sitting pretty. On some systems, networking is known as network, as in:

sudo /etc/init.d/network restart
sudo /etc/init.d/network restart
 

Posted in unix | No Comments »

Continuing to work on DB2 support for MediaWiki

August 15th, 2009 by Leons Petrazickis

No fresh download quite yet, but I just made a large commit to the MediaWiki source of the last week’s work. This is going in the trunk — aka MediaWiki 1.16alpha. There are a few bugs I hope to catch this weekend, at which point I’ll put up a fresh archive of working code.

config/index.php:
* Made installation on IBM DB2 more robust
* Replaced E_ALL error reporting mode with E_ALL | E_STRICT

includes/db/DatabaseIbm_db2.php
* Enabled DB2_CASE_LOWER option for all connections and statements
* Enabled DB2_DEFERRED_PREPARE_ON for all statements — delays statement preparation until execution to reduce database load
* Enabled DB2_ROWCOUNT_PREFETCH_ON for all statements — makes db2_num_rows() work correctly
* Cleaned up error handling
* Cleaned up method signatures
* Rewrote insertion to use prepared statements — required for inserting more than 32k of text
* Insertion will never try to insert a NULL value into a primary key
* Now relying on implicit casting in DB2 9.7 — no longer sniffing to see if column is integer or string before adding quotes
* Implemented actual prepared statement handling — required for correct INSERT, UPDATE behaviour
* In install mode, the class will print additional messages to the install bullet scroll
* Added bitwise operation abstraction (BITNOT, BITAND, BITOR)

includes/specials/SpecialAncientpages.php
* Added skeleton DB2 syntax to the database-specific switch statement

maintenance/convertLinks.inc
* Made limit clause database-agnostic

maintenance/ibm_db2/README
* Contents replaced with link to http://www.mediawiki.org/wiki/Manual:IBM_DB2

maintenance/ibm_db2/tables.sql
* Revised types to better match the main schema
* All tables names now the same as MySQL — was using Postgres schema’s names before
* Added some additional indices
* Added the change_tag, tag_summary, valid_tag, user_properties, log_search, and l10n_cache tables
* Added several new columns

maintenance/storage/compressOld.inc
* Made limit clause database-agnostic

Posted in mediawiki | No Comments »

Moving DB2 from one hostname to another

July 10th, 2009 by Leons Petrazickis
SQL6031N  Error IN the db2nodes.cfg file at line number "1".  Reason code "10".

DB2 caches your machine’s hostname in several places. If your machine is changing its hostname, or if you are somehow moving an existing installation to a machine with a different hostname, you will need to adjust the hostname stored by DB2. Hostname change is common in virtual and cloud environments, so even better than adjusting it would be writing a script that adjusts it for you.

Here’s my rudimentary stab at a such a script:

#!/bin/sh
echo -n "Discovering the new hostname "
UNAME_CACHE=$(uname -n)

echo -n "Adjusting hostname list for unconfigured database partitioning feature "
# this may need to be changed if DPF preconfigured
if [ -e /home/db2inst1/sqllib/db2nodes.cfg ]; then
    chmod 666 /home/db2inst1/sqllib/db2nodes.cfg
    su - db2inst1 -c "cp /home/db2inst1/sqllib/db2nodes.cfg /home/db2inst1/sqllib/db2nodes.cfg.old"
    su - db2inst1 -c "echo 0 $UNAME_CACHE 0 > /home/db2inst1/sqllib/db2nodes.cfg"
fi

echo -n "Making registry writable "
chmod 666 /var/db2/*

echo -n "Adjusting the DB2 hostname "
UNAME_CACHE=$(uname -n)
/opt/ibm/db2/V9.7/adm/db2set -g db2system=$UNAME_CACHE

echo -n "Updating DAS configuration "
# todo
# db2 uncatalog node <old_hostname>
db2 catalog admin tcpip node $UNAME_CACHE remote $UNAME_CACHE system $UNAME_CACHE
db2 update admin cfg using DB2SYSTEM $UNAME_CACHE
db2 update admin cfg using SMTP_SERVER $UNAME_CACHE
 

This doesn’t cover all cases. For example, if you use extended operating system security, you may also need to set the db2accountname and db2instowner parameters. A quick check with db2set -all should tell you if this applies in your case — if there is something that looks like a hostname in those parameters already, you need to change them.

I may also have missed other necessary changes. Please let me know if I did.:-)

References

Edit: Revised to use proper authorities, incorporate official instructions

Posted in db2 | 2 Comments »

« Previous Entries