Monday, 17 December 2018

Fun and Games with IBM DB2 on Windows

Long story, very short, I've been having some fun n' games with a DB2 11.1 installation on Windows Server 2012 FP2.

I was struggling to install DB2 afresh even I thought I'd uninstalled it earlier.

As ever, being a doofus, I'd also fiddled around with AD: -

  1. Installed DB2 11.1, plus fix pack
  2. Turned my Windows server into an Active Directory Domain Controller
  3. Tried/failed to uninstall DB2
  4. Turned my Windows server back into a standalone server
  5. Tried/failed to uninstall DB2
In one particular case, I managed to cause the server crash n' burn simply by running the command: -

db2unins -f

which was singularly impressive.

However, I was still unable to install a fresh copy of DB2, even though I thought I'd uninstalled it .....

I fiddled and faffed around, and eventually got some more debug: -

C:\temp\UNIVERSAL\db2\windows>wininst.exe -e ese -t c:\db2log.trc -l c:\db2log.t

The resulting log file was of interest: -

type c:\db2log.txt

=== Verbose logging started: 17/12/2018  16:05:36  Build type: SHIP UNICODE 5.00
.9600.00  Calling process: C:\Windows\system32\MSIEXEC.EXE ===
MSI (c) (EC:20) [16:05:36:996]: Font created.  Charset: Req=0, Ret=0, Font: Req=
MS Shell Dlg, Ret=MS Shell Dlg

MSI (c) (EC:20) [16:05:36:996]: Font created.  Charset: Req=0, Ret=0, Font: Req=
MS Shell Dlg, Ret=MS Shell Dlg

MSI (c) (EC:D0) [16:05:36:996]: Resetting cached policy values
MSI (c) (EC:D0) [16:05:36:996]: Machine policy value 'Debug' is 0
MSI (c) (EC:D0) [16:05:36:996]: ******* RunEngine:
           ******* Product: C:\temp\UNIVER~1\db2\windows\DB2 Server.msi
           ******* Action:
           ******* CommandLine: **********
MSI (c) (EC:D0) [16:05:36:996]: Machine policy value 'TransformsSecure' is 1
MSI (c) (EC:D0) [16:05:36:996]: Machine policy value 'DisableUserInstalls' is 0
MSI (c) (EC:D0) [16:05:36:996]: Specified instance {0C2D546C-8629-44E4-9202-0D5F
EA15FECF} via transform :ESE1033.mst;C:\temp\UNIVER~1\db2\windows\SERVER\1033.MS
T is already installed. MSINEWINSTANCE requires a new instance that is not insta
MSI (c) (EC:D0) [16:05:36:996]: MainEngineThread is returning 1639
=== Verbose logging stopped: 17/12/2018  16:05:36 ===

This blog post: -

introduced me to the Windows Installed Command Line: -

wmic product get /format:csv > c:\temp\software.csv

which provided me with this: -

WIN2012,1,Microsoft Visual C++ 2017 x86 Additional Runtime - 14.12.25810,Microsoft Visual C++ 2017 x86 Additional Runtime - 14.12.25810,,,{7FED75A1-600C-394B-8376-712E2A8861F2},20181213,,,C:\ProgramData\Package Cache\{7FED75A1-600C-394B-8376-712E2A8861F2}v14.12.25810\packages\vcRuntimeAdditional_x86\,5,1033,C:\Windows\Installer\a2987.msi,Microsoft Visual C++ 2017 x86 Additional Runtime - 14.12.25810,C:\Windows\Installer\a2987.msi,{93D97CAA-B398-4F6A-8898-9AAA305C718C},vc_runtimeAdditional_x86.msi,,,,,,,,Microsoft Corporation,14.12.25810,2
WIN2012,1,VMware Tools,VMware Tools,,,{748D3A12-9B82-4B08-A0FF-CFDE83612E87},20181213,,C:\Program Files\VMware\VMware Tools\,C:\Program Files\Common Files\VMware\InstallerCache\,5,1033,C:\Windows\Installer\a2992.msi,VMware Tools,C:\Windows\Installer\a2992.msi,{F8A2F64E-4E92-4740-A305-687ECF5B7653},{748D3A12-9B82-4B08-A0FF-CFDE83612E87}.msi,,,,,,,,VMware, Inc.,,2
WIN2012,1,Microsoft Visual C++ 2017 x64 Additional Runtime - 14.12.25810,Microsoft Visual C++ 2017 x64 Additional Runtime - 14.12.25810,,,{2CD849A7-86A1-34A6-B8F9-D72F5B21A9AE},20181213,,,C:\ProgramData\Package Cache\{2CD849A7-86A1-34A6-B8F9-D72F5B21A9AE}v14.12.25810\packages\vcRuntimeAdditional_amd64\,5,1033,C:\Windows\Installer\a298f.msi,Microsoft Visual C++ 2017 x64 Additional Runtime - 14.12.25810,C:\Windows\Installer\a298f.msi,{6D0A1ACD-F1C9-464F-8C70-F10295482CBE},vc_runtimeAdditional_x64.msi,,,,,,,,Microsoft Corporation,14.12.25810,2
WIN2012,1,Google Update Helper,Google Update Helper,,,{60EC980A-BDA2-4CB6-A427-B07A5498B4CA},20181217,,,C:\Program Files (x86)\Google\Update\\,5,1033,C:\Windows\Installer\7761e6.msi,Google Update Helper,C:\Windows\Installer\7761e6.msi,{D91BA6B5-F113-423F-B5A8-A4E6EA34919E},GoogleUpdateHelper.msi,,,,,,,,Google Inc.,,0
WIN2012,1,Microsoft Visual C++ 2017 x86 Minimum Runtime - 14.12.25810,Microsoft Visual C++ 2017 x86 Minimum Runtime - 14.12.25810,,,{828952EB-5572-3666-8CA9-000B6CE79350},20181213,,,C:\ProgramData\Package Cache\{828952EB-5572-3666-8CA9-000B6CE79350}v14.12.25810\packages\vcRuntimeMinimum_x86\,5,1033,C:\Windows\Installer\a2983.msi,Microsoft Visual C++ 2017 x86 Minimum Runtime - 14.12.25810,C:\Windows\Installer\a2983.msi,{F194F15D-77FE-4813-9B85-C2FA80E6E984},vc_runtimeMinimum_x86.msi,,,,,,,,Microsoft Corporation,14.12.25810,2
WIN2012,1,DB2 Server Edition - DBSKLMV30,DB2 Server Edition - DBSKLMV30,,,{0C2D546C-8629-44E4-9202-0D5FEA15FECF},20181217,,C:\IBM\DB2SKLMV30\,C:\IBM\DB2SKL~1\awse\image\db2\Windows\,5,0,C:\Windows\Installer\66fa6e.msi,DB2 Server Edition - DBSKLMV30,C:\Windows\Installer\66fa6e.msi,{F463DB06-86CB-44C9-A09F-C75B3020B3AF},DB2 Server.msi,,,,,|:ESEinst0.mst;:ESE1033.mst;C:\IBM\DB2SKL~1\awse\image\db2\Windows\SERVER\1033.MST,,,IBM,11.1.2020.1393,0
WIN2012,1,Microsoft Visual C++ 2017 x64 Minimum Runtime - 14.12.25810,Microsoft Visual C++ 2017 x64 Minimum Runtime - 14.12.25810,,,{C99E2ADC-0347-336E-A603-F1992B09D582},20181213,,,C:\ProgramData\Package Cache\{C99E2ADC-0347-336E-A603-F1992B09D582}v14.12.25810\packages\vcRuntimeMinimum_amd64\,5,1033,C:\Windows\Installer\a298b.msi,Microsoft Visual C++ 2017 x64 Minimum Runtime - 14.12.25810,C:\Windows\Installer\a298b.msi,{1C423F21-E891-44F3-8FE9-E37D44470EF1},vc_runtimeMinimum_x64.msi,,,,,,,,Microsoft Corporation,14.12.25810,2

which proved that DB2 was still installed.

I dug around further, and then decided to retry my previous command: -

db2unins -f

which just worked, and I was then able to validate that DB2 was suitably removed, via the aforementioned wmic command.

So, the moral of the story .....

(a) Don't fiddle with things
(b) Products installed BEFORE promoting a Windows box to a domain controller MAY need to be removed AFTER reverting the box BACK to a standalone server

But I've learned more .....

.... which is nice :-) 

No comments:

TIL - read-only variables in Linux

 A co-worker was seeing an exception: -  line 8: TMOUT: readonly variable when trying to SCP a file from a remote Linux box. I did some digg...