Monday 30 May 2016

DB2 on Windows - SQL1042C An unexpected system error occurred

I see this on Windows: -


When I tried to start DB2: -

db2start

I saw this: -

ADM12026W  The DB2 server has detected that a valid license for the product "DB2 Express Edition" has not been registered.
DB2 : The service has returned a service-specific error code.

SQL1022C  There is not enough memory available to process the command.  SQLSTATE=57011

I checked, and, yep, I have no license :-(

db2licm -l

Product name:                     "DB2 Express Edition"
License type:                     "License not registered"
Expiry date:                      "License not registered"
Product identifier:               "db2exp"
Version information:              "10.5"
Max number of Value Units:        "200"
Max amount of memory (GB):        "64"

Thankfully I had a license key downloaded: -

-rw-r--r--@  1 davidhay  staff  3056932 30 May 16:58 DB2_Exp_Ed_PVU_QS_Activation_V10.5.zip

which I unzipped to find: -

30/05/2013  03:14    <DIR>          .
30/05/2013  03:14    <DIR>          ..
30/05/2013  03:14               903 db2exp_c.lic
30/05/2013  03:14               905 sam32.lic
30/05/2013  03:14    <DIR>          UNIX
30/05/2013  03:14    <DIR>          Windows
               2 File(s)          3,474 bytes
               4 Dir(s)  209,877,737,472 bytes free


db2licm -a db2exp_c.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: "C:\IBM\SQLLIB\license\en"

db2licm -l

Product name:                     "DB2 Express Edition"
License type:                     "CPU Option"
Expiry date:                      "Permanent"
Product identifier:               "db2exp"
Version information:              "10.5"
Max number of Value Units:        "200"
Max amount of memory (GB):        "64"
Enforcement policy:               "Soft Stop"

That solved the license problem ….

The SQL1042C problem was slightly more difficult - I suspect it was due to the fact that I'd switched my Windows 2008 R2 VM from a standalone server to an Active Directory domain controller and/or changed the hostname ….

Still, the license trick worked ….

No comments:

Visual Studio Code - Wow 🙀

Why did I not know that I can merely hit [cmd] [p]  to bring up a search box allowing me to search my project e.g. a repo cloned from GitHub...