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.


Planning for Storage, Server, and Network Infrastructure

Questions to ask when planning storage and server infrastructure

Storage Requirements

  • What our their current storage environment? (What technology do we use? NetApp, EMC, HP, Hitachi, Compellant?)
  • What is our current amount of usable storage?
  • What is our current data in GB / TB? How much of that data is deemed critical as opposed to 2nd tier, or even archivable?
  • What growth increase are we seeing from year to year? (25%? 30%? 40%? More?)
  • Is this our largest variable IT cost within our overall budget?

Server Infrastructure

  • How many servers do we have within our overall Infrastructure environment?
  • What percentage is comprised of Power, Linux or “Wintel”?
  • Do we have a vendor standard? (HP, Dell, IBM?)
  • What is our overall server utilization (7%? 10%? 20%? 50%? More?)
  • Do we utilize virtualization in our server infrastructure environment?
  • If so, what percentage of our environment is virtualized?
  • What version / type of virtualization do we use?
  • Are we looking to do a server consolidation project to help us save on additional software maintenance and energy costs?

Network Infrastructure

  • Do we have (primarily) our own data center or do we store all of our equipment at a co-location / managed services location? (and if so, whom?)
  • What is our current network environment (Cisco? Avaya?)
  • Do we standardize on a vendor?
  • How old / new is their network environment?
  • What kind of connectivity do they have? (T1? T3? DS?)

Security Solutions

  • Do we have a set standard for our security environment?
  • Do we do quarterly security assessments? (PCI and/or FFIEC Assessments?) (Who do we use?)
  • Are there areas we need to improve?

Software Maintenance

Do we have a goto partner we standardize on for software and hardware maintenance contracts?

Projects

  • What are there next three primary projects?
  • What is our IT budget?
  • What is our Calendar year? Jan – Dec? July – June? Etc.

For more information about planning for storage, servers, and network infrastructure, look at our data warehouse pages.


Remove old or bogus address form Outlook email auto-complete address book

Problem

As a result of people changing their email address, or just simple typos, the MS Outlook auto-complete list ends up with a number of bogus queries.

Solution

To remove a name or email address from Outlook’s auto-complete list, simply follow these 4 steps:

  • Create a new email message in Outlook (don’t worry, you can cancel it as soon as the task is complete)
  • Start typing the name or address you want to remove
  • Use the down arrow key to highlight the desired (undesired) entry — make sure you actually use the arrow keys on the keyboard: if you use the mouse, the address will be selected in your recipient list, and you have to start over
  • Press the Del key on your keyboard, et voilà, the unwanted entry is gone

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.


How to limit access to a web site on an IIS web server by IP address

Problem

You have a private web site for management purposes, and you want to limit access to it by IP address.

Solution

  • Open the IIS management MMC.
  • In the left hand treeview, drill down to the website in question.
  • The main window of the IIS7 MMC will now display all the familiar management icons.
  • Under the ‘IIS’ group you will find one named ‘IP Address and Domain Restrictions’.
  • Open this and you will see an empty list.
  • Step one here is to select ‘Edit Feature Settings’ From the right-hand menu and select the ‘Deny’ option. (this block all -undefined- IP ranges)
  • Step two will be to ‘Add Allow Entry’ for your defined remote user’s IP range.

Backing up MS SQL 2005 with SSQL management studio express

Problem

You have a production database that you need to write SQL reports against. You are an experienced IT professional, and you know that writing SQL against the production data is not advisable. As a result you have decided to take a copy of your MS SQL Server 2005 production database and stand it up in a development environment.

Solution

  • Download MSSQL management studio express at http://www.microsoft.com/downloads/en/details.aspx?FamilyID=c243a5ae-4bd1-4e3d-94b8-5a0f62bf7796
  • In MSSQL management studio, configure a new SQL server connection, you will need an IP address, username, and password to enter in the following dialog box :
    Connect To MS SQL Server 2005
    Connect To MS SQL Server 2005
  • Available databases will then appear in the left hand tree view.
  • ‘right-click’ on the database in question and drill down to Tasks -> Backup
  • In the ‘Destination’ area, select a path –Local- to the SQL server in question (sample dialog pasted here)
    Backup MS SQL Server 2005 DataBase
    Backup MS SQL Server 2005 DataBase
  • The produced .bak file will be importable to almost any more recent version of MSSQL.

You may also create a ‘scripted backup (similar to a MySQL dump) by proceeding from the second step:

  • right click on the database in question and drill down to Script database as -> CREATE to -> File
  • and select a file local to the remote workstation.

Depending on your database size, a backup may take quite some time.


Installing Informix IDS 11.x on Mac OS X

Problem

Installing IDS 11 on Mac OS X

Solution

After installing the server, update the sqlhosts file and replace the default host name by * so that the server listens on all IPs. The sqlhosts file may be names sqlhosts.ol_server_name, and its contents would look like:

ol_server_name onsoctcp * ol_server_name
dr_server_name drsoctcp * dr_server_name

References

When IDS 11 is officially released, more information will be published here. For now, the following links have pointers: