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.
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.
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:
On the next page, I click on my OS:
That drops down, and from there, I click on “DB2 Universal Fix Pack”:
On the next screen, I click the box next to the fixpack, and then click “Continue”:
On the next screen, I click the radio button next to “Download using your browser (HTTPS)”, and then click “Continue”:
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”
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);' 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
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.