Migrating Data Between DB2 Servers

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 levels of granularity. It also has a very simple syntax to allow exporting all of the data and structure of a database.

Exmaple of db2move


su - db2inst1
mkdir /tmp/db2export
cd /tmp/db2export
db2move sample export

Where db2inst1 is the db2 instance owner, /tmp/db2export is where the DB2 data and structures are being exported, and sample is the database name.

For more DB2 Support hints, please visit our DB2 category.


NetApp downgrade firmware

Downgrading firmware on a NetApp SAN

If you have just reclaimed a shelf from a NetApp SAN that you would like to use with an older head, you will notice that the drives are not recognized. This is due the the fact that DataOntap upgrades the drives automatically when you plug them in to an updated shelf, but it won’t downgrade or even recognize correctly drives that come from an higher level revision.

Downgrading drives while keeping the contents is actually impossible.

Actually downgrating the firmware on NetApp SAN drives

Chances are that you don’t really need to downgrade the firmware on the drives, and you can just skip to the next section.

If you are sure you need to downgrade the drives, here are the basic steps:

  • Get a linux box, with a qlogic HBA, and cables that can attach to the shelf that has the drives to downgrade
  • Make sure only the drives that you want to downgrade are in the shelf
  • Make sure the proper disk qualification package is on the filer (if not, download the Disk Qualification Package as a zip file from: http://now.netapp.com/NOW/download/tools/diskqual/ and extract it to the /etc directory of the NetApp)
  • Download all current disk firmware from http://now.netapp.com/NOW/download/tools/diskfw/
  • Get the right firmware for your disk (the new you just downloaded, or an old one, if you need to downgrade) — the old firmware is already on the root volume of the netapp
  • Use the proper firmware upgrade tool from your manufacturer to flash the firmware from the Linux box

Wiping labels on NetApp SAN drives

If you simply can’t get the old filer head to recognize the drives that had new labels, the only viable solution to get the drives to work is to reconnect the shelf to the old filer head that was running a newer firmware.

Erasing labels on NetApp SAN drives

  • Boot into maintenance mode (CTRL+C at boot and then Option 5)
  • list the drives: label summary
  • erase the labels: label wipe 4.23 where 4.23 is the drive number to wipe
  • exit maintenance mode: halt

Chances are that this will still not allow the older filer to see the drives properly. The next step always works: zero the drives.

Zeroing spares on NetApp filer

  • Boot into maintenance mode (CTRL+C at boot and then Option 5)
  • list the drives: label summary
  • force the drives to become spares: label makespare 4.23 where 4.23 is the drive number
  • exit maintenance mode and boot:
    > halt
    ok boot
  • zero the spare drives: drive zero spares
  • remove the shelf or the drives from the new filer, and you can now put them back into the old filer, as they will be recognized just fine.

For more information about our SAN support, look at NetApp SAN.


NetApp route add default gateway

NetApp SAN default gateway setup

DataOntap is a FreeBSD based operating system built by NetApp. However, most of the command line interface commands differ from the usual FreeBSD commands. When a new NetApp installation is performed, or a NetApp migration is needed, typically the IP address needs to be changed, as well as the default gateway. The first step before changing the network configuraiton is to check if the current configuration, and capture it in case you need to back out of the migration. The following paragraphs show how to check existing configuration, and how to set the new gateway. NetApp SAN

Show NetApp SAN network config

To print the current network config, run:
ifconfig -a

To set a new network IP, run:
ifconfig e0 192.168.1.2 netmask 255.255.255.0

Where e0 is your network interface name, and 192.168.1.2 is the new IP of the NetApp.

Show NetApp SAN route config

To print the current routes, run:
route -ns

Setup NetApp SAN default route

Delete NetApp SAN current default route

route delete default

Add NetApp SAN new default route

route add 0.0.0.0 IP_OF_DEFAULT_GW 1
For example, if the fedault gateway is 192.168.1.1:
route add 0.0.0.0 192.168.1.1 1
For more information about our SAN support, look at NetApp SAN.


High Availability Asterisk

Problem

If you have tried to set up high availability for an asterisk VoIP PBX, you probably notices that it is easy to do in theory, but in practice, it isn’t quite always working as expected. For example, Trixbox has ways to set up high availability (HA), but when it comes down to it, the configuration adds too much complexity, and the system overall becomes less stable.

Solution

Generation D has come out with a clustering product for Asterisk that cost $2,000 for two nodes and the web interface. They claim 7s to fail over completely, and provide an API to enable integration with other systems. If we manage to secure a demo, we will provide more details on setup and performance.


Online fax service with SSL API

Problem

You need to create an online application that is capable of sending a FAX securely (PCI, HIPAA or other compliance).

Solution

After trying trustfax and eFax, neither of which has a secure API, Ralph found that Metro Fax has a SSL API for developers and the cost is reasonable.

The following SDK as well as some supporting documentation below will help you get started: WsfSDK

The MetroFax webservice gateway is available at:

https://wsf.metrofax.com/webservice.asmx

And there is supporting documentation (NDoc) available below:

https://wsf.metrofax.com/doc

The attached SDK contains sample implementations of numerous common methods.


Lotus Protector for Mail Security

Enterprise Class Email Protection

If you need to go beyond classic SPAM and Virus filtering for your IBM Domino environment, we recommend you take a look at Lotus Protector for Mail Security. Starting at only $29.50 one time license fee per user, it is easy to see how the ROI over 1 year beats most commercially available solutions, and the ROI the 2nd year can mean as much as 75% savings over comparable solutions. A 90 day trial is available to test drive the product.


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 correct compatibility mode in DB2. But how do you move your data?

Solution

IBM has published a data migration toolkit, that has been updated to work best with DB2 9.7. Make sure you have service pack 2 installed, which is the latest service pack available as of this writing.

If you are migrating from MySQL or PostgreSQL, enable the ability to do limits and offsets in the where clause with:
db2stop force
echo Set compatibility to 01 or 0F
db2set DB2_COMPATIBILITY_VECTOR=01
db2start

References


Trouble shooting sendmail base configuration

There is a simple command that can be used to make sure that the basic configuration of sendmail is correct:
echo \$Z | sendmail -d0.1
The output of that command should look like:

Version 8.13.1
Compiled with: DNSMAP HESIOD HES_GETMAILHOST LDAPMAP LOG MAP_REGEX
MATCHGECOS MILTER MIME7TO8 MIME8TO7 NAMED_BIND NETINET NETINET6
NETUNIX NEWDB NIS PIPELINING SASLv2 SCANF SOCKETMAP STARTTLS
TCPWRAPPERS USERDB USE_LDAP_INIT

============ SYSTEM IDENTITY (after readcf) ============
(short domain name) $w = host-name
(canonical domain name) $j = host-name.domain.com
(subdomain name) $m = domain.com
(node name) $k = host-name
========================================================


Get grep right

Problem

When you look for a process in the ps output, the command line of grep often shows up:
ps auwwx | grep sshd
root 648 0.0 0.0 3732 1012 ? S Apr06 0:00 /usr/sbin/sshd
user 20807 0.0 0.0 4836 680 pts/0 S 04:31 0:00 grep /sshd
$

This can make writing scripts for automating sys admin tasks difficult.

Solution

There are many ways to get around this problem. Grep has for example exclusion pattern option. However, there is a simple way when you use a shell that allows character regular expressions: using a simple expression that will not alter what you are searching for, yet prevent the command line itself from being matched. For example:
$ ps auwwx | grep /ssh[d]
root 648 0.0 0.0 3732 1012 ? S Apr06 0:00 /usr/sbin/sshd

Notice the grep command line doesn’t appear any more in the results.

References