PowerShell Script for Local DB2 Database Activation

It is no secret that I’ve been doing more work with DB2 on Windows lately. I know a number of clients who are looking for DBAs with experience with DB2 on Windows and are frustrated that they cannot find more candidates. Truthfully, it is not a steep learning curve to work with DB2 on Windows when you’re used to DB2 on Linux or UNIX, but one of the more painful areas is scripting. Unless you’re lucky enough to have always scripted in an OS-agnostic Perl and are able to get Perl installed on all your Windows servers, scripting is a difficult area of conversion. Those of us who are familiar with ksh or bash often use small scripts just from the command line, and can whip up other scripts quickly as needed. Batch is still a bit of a mystery to me. It never works quite how I think it should. I am a PowerShell fan, and have written a number of scripts in it at this point. I cannot say I have fully embraced the object-orientation that PowerShell enables, but at least I have a language that makes sense to me. I thought I’d share a script that is particularly useful.

Continue reading »

Introduction to Using the PowerShell Command Line with DB2 on Windows

I have worked with DB2 on Windows on and off over the years and have largely not enjoyed it all that much. Most likely because the vast majority of my time is spent on UNIX and Linux systems, so when I end up at a windows command line, my fingers type things like “ls” and “grep” before I can even stop them. I think this is a common condition for DB2 consultants and DBAs – most of us spend the majority of our time on Linux or UNIX or even both and then have to jump into a Windows system and still be proficient.

Continue reading »