Transferring a DB2 LUW Fixpack Directly to a UNIX, Linux, or Windows Server

Posted by

Edited 2018-02-01. This page is now obsolete. The newest version of this is: Using FTPS to get a Fix Pack Directly to a Db2 Server

This seems to change every few years, so I thought I’d document what’s working for me today.

The Problem

It used to be so easy to get DB2 fixpacks from IBM at the command line. It has gotten steadily more difficult over the years. At one point, I could go in and get a location that could work via FTP or http even after it was supposedly not allowed.

The day that I’m writing this, I had to apply Fixpack 6 on a 10.5 server, but when I went to unzip the file that I had transferred earlier in the week, I got an error. Given that I work from home, uploading DB2 code files for the base code or for fixpacks takes 6-8 hours over my slow home connection. So in order to keep from blowing out my change window, I did some serious googling.

The Solution

First, Get File Location

My goal was to get to an actual file location so I could use wget or some other tool to get the file. To do that, I have to first go through a series of steps on the IBM sites. I start out here: http://www-01.ibm.com/support/docview.wss?uid=swg27007053

On that page, I click on the fixpack I want:
Screenshot_011616_023454_PM

On the next page, I click on my OS:
Screenshot_011616_023606_PM

That drops down, and from there, I click on “DB2 Universal Fix Pack”:
Screenshot_011616_023801_PM

On the next screen, I click the box next to the fixpack, and then click “Continue”:
Screenshot_011616_023955_PM

On the next screen, I click the radio button next to “Download using your browser (HTTPS)”, and then click “Continue”:
Screenshot_011616_024146_PM

And now I am finally to the point where I can get what I need. Note that at some point before now, it is likely to ask you to log in with your IBM ID. I’m nearly always logged in anyway, but if you don’t have one, IBM IDs are completely free and you’ll need one when working with DB2. On this screen, I right-click on the blue “v10.5fp6_aix64_universal_fixpack.tar.gz” and select “Copy link address”
download_screenshot_011616_025053_PM

Getting the File on the AIX/Linux server

This was an AIX server, and while I have access to root, I would consider installing tools to help me transfer files a bit beyond what I should do with my root access. I first tried wget, and got:

> wget filename
ksh: wget:  not found.

I had replaced ‘filename’ with the really long url copied in the last step. I think this approach would work on Linux or on AIX servers that had the right tools installed. So I fell back to Perl, and got it this way instead:

perl -e 'use LWP::Simple; getprint($ARGV[0]);' https://delivery04.dhe.ibm.com/reallylongurl/v10.5fp6_aix64_universal_fixpack.tar.gz > v10.5fp6_aix64_universal_fixpack.tar.gz

I was a bit worried if a compressed file would transfer this way, since if I was using ftp, I would be doing this in binary mode. But it worked, and I was able to get the file onto the server in less than a tenth of the time it would have taken me to upload it using my slow home connection. I was able to uncompress/untar and install the fixpack from this file without a problem.

Getting the File on the Windows server

Now, why would you need to do this on Windows, where you have a browser and could navigate to the location directly? Well, some Windows servers don’t allow the use of Java, which the download website requires. There are also often restrictions on what websites can be accessed from the browsers on Windows servers. So this technique is useful there, as well. Here’s one way to get the file using the same link as derived above:

bitsadmin  /transfer db2fix_download  /download  /priority normal https://delivery04.dhe.ibm.com/reallylongurl/v9.7fp11_ntx64_universal_fixpack.exe  D:\desired_location\v9.7fp11_ntx64_universal_fixpack.exe

Summary

I don’t guarantee that this method will work, but it did for me in this case, and it is worth trying when IBM doesn’t give us an easier method.

Lead Db2 Database Engineer and Service Delivery Manager , XTIVIA
Ember is always curious and thrives on change. Working in IT provides a lot of that change, but after 17 years developing a top-level expertise on Db2 for mid-range servers and more than 7 years blogging about it, Ember is hungry for new challenges and looks to expand her skill set to the Data Engineering role for Data Science. With in-depth SQL and RDBMS knowledge, Ember shares both posts about her core skill set and her journey into Data Science. Ember lives in Denver and work from home for XTIVIA, leading a team of Db2 DBAs.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.