Managing DB2 licenses isn’t exactly the glory work of DB2. It’s not fun, and the only scenario you might come out of messing with them with Kudos is if you’re dealing with an expired Try&Buy license – and then only if it’s someone else’s fault there was a Try&Buy in the first place.
Licensing as a whole can be confusing, and even trying to get a straight answer out of IBM on some things can be difficult. So I’m not going to cover the “how much” or “with what” types of questions here. This is just a simple “I have a license file, what do I do with it?” type article – with a few tips for licensing file problems I’ve seen at the end.
DB2’s handling of licenses always seemed a bit easier to me than some software products’. You don’t have to type some long string in or anything, you just have to have the right file.
You can actually install full-on DB2 ESE from the FixPacks that anyone can download from the Web. However, if you do it that way, you’ll end up with a 60 or 90 day Try&Buy license, and when that time period is up, DB2 stops working.
If you download your fully licensed code from Passport Advantage, then it doesn’t usually automatically include the license file – the license file is usually a separate download. However, the code shows “License not registered”, and will never stop working via an expiration. Once when on the phone with support they seemed surprised that I even cared about getting the license file applied when it was in this state. So maybe IBM doesn’t care if you leave it this way, as long as your paperwork and payments are in order.
If you are an IBM Partner and download your code from PartnerWorld, it comes in that same “License not registered” state, but you cannot get a real full license file that way – you have to get it from Passport Advantage.
How to check your license status
You can check the status of your license files and server license status using the db2licm command:
> db2licm -l Product name: "DB2 Enterprise Server Edition" License type: "License not registered" Expiry date: "License not registered" Product identifier: "db2ese" Version information: "9.7"
In this installation, you can see I’ve got it in that permanent state where it won’t expire, but it doesn’t have my license file applied either.
How to Add a License File
First, you have to get the license file from your install media or Passport Advantage, and place it on your server. If you’re using WebSphere Commerce, it’s a fully separate (very small) download, and may indicate in the name that it’s a “Restricted” license, because your DB2 license is only for use with WebSphere Commerce.
The file name varies depending on whether it’s a full license or a restricted one like what comes with WebSphere Commerce. It used to just be db2ese.lic – but that is now what gets you “License not registered”, I think. The restricted one that I use is db2ese_o.lic.
We use the same command with different arguments to add a license file:
> db2licm -a ./db2ese_o.lic LIC1402I License added successfully. LIC1426I This product is now licensed for use as outlined in your License Agreement. USE OF THE PRODUCT CONSTITUTES ACCEPTANCE OF THE TERMS OF THE IBM LICENSE AGREEMENT, LOCATED IN THE FOLLOWING DIRECTORY: "/opt/IBM/db2/V9.7/license/en_US.iso88591"
And always immediately check to make sure the license information is updated. I’ve had license issues before where it didn’t say there was a problem, but it also didn’t apply the license properly.
> db2licm -l Product name: "DB2 Enterprise Server Edition" License type: "Restricted" Expiry date: "Permanent" Product identifier: "db2ese" Version information: "9.7"
When License Files Go Wrong
It is pretty rare to have a problem with this process, but I’ve seen it a couple of times. the first thing to never do is to never recursively change owners or permissions on db2 files. I’ve seen someone change the owner of /opt/IBM/db2/V9.7/license/nodelock before and have issues because of that.
Being aware of /opt/IBM/db2/V9.7/license/nodelock is important. Just last year, I had an issue where this file appeared to have some corruption, and every time I went to add the license, I got:
LIC1416N The license could not be added to the nodelock file automatically. The return code is "-110".
There were a number of things I tried, but with support’s help, what finally worked was to make a backup copy of /opt/IBM/db2/V9.7/license/nodelock and then just delete it entirely and run the db2licm -a command again. It only worked for me because I have a pretty simple ESE-only license setup.
Another thing to try if you’re having issues adding a license file is to simply re-down/upload the file – it could be a simple file transfer issue.
Has anyone else had pain points with managing or adding license files?
I was doing some trail setup in my laptop and can i redo or reapply trail license key without uninstalling the software as today i can see that my trail 90 day period is finished. What’s your suggestion on this ?
To my knowledge, there is no way around the trial limitations.
Thanks very much Ember. It really worked.
I have two servers running DB2 ESE v8.2. Unfortunately one of them has it’s license expired because the previous installation forgot to apply the license, while another one with a valid legal license. I have misplaced the CD and the license key.
When we apply the license key, entitlement information must have goes to some files in the server. What are these files and could we transfer these files to another DB2 server to make it run?
DB2 licenses are applied by using a file and not a key. You really have to have the file to make it work. It is usually named something.lic, and is in the original media if you copied it anywhere. It should also be available easily on Passport Advantage – which should have downloads for all software you are entitled to. If you don’t have access to IBM’s passport advantage, I’m sure IBM would be able to help you get access. There is no way other than applying the correct file to be able to access a database with an expired license.
We have a license of AESE installed on the server and we want to downgrade the license to ESE, does it requires outage ? or Just need to apply the license can help us.
You will need to remove the old license with the -r option on db2licm, and add the new one.
I would recommend testing it on a test environment. I’m not sure if you remove the license if connections are immediately restricted – I suspect you would still be able to connect, but would have problems on the next db2start. I’m also not sure if you would remove the old license before or after adding the new one.
When we have “restricted” license, what restrictions does it have? We are installing IBM Data Stage and IBM says that we have a DB2 restricted license with the file “db2ese_o.lic”. I could not be able to found what are those restrictions.
You really have to read the license and/or ask IBM to know. At one point, I saw a restricted license that did not include TSA with DB2. They are nearly always restricted to only databases with the content from the application they come from – even creating tables not related to that application could be a violation. It is always best to check with IBM.