Installing SQL

Installing SQL. 1

Introduction. 1

 

This document describes what we did to install and test the Jazz SQL features.

Introduction

Jazz was first developed and tested with a version of DB2 installed into the local development environment also used to develop Jazz.  Once the basic SQL facilities are tested Jazz will then be tested with SQL Server as well.   Jazz should then work with local and remote DB2, with SQL Server (which is assumed to always be local), and while it won’t have been tested with Oracle any issues should be very minor and quickly resolved.

Installing DB2

Download and Install

IBM DB2 Developer-C for Windows was installed to a 64-bit Windows-10 laptop from the IBM Web Site.  (Google this if you want to do the same).   Installation options were all default:

·         Installation type: typical

·         User information:  None – use local user account, User name db2admin

·         Uncheck [  ] Set up your DB2 Server to send notifications

·         Enable operating system security. 
DB2 administrators group: None – use local group, group name DB2ADMNS
DB2 users group:  None – use local group, group name DB2USERS

Add current user to DB2ADMNS group

Current user (me) is RobertBW10

Verify Installation

In Administrator Command Window: run command db2val

DBI1379I  The db2val command is running. This can take several minutes.

 

DBI1333I  Installation file validation for the DB2 copy DB2COPY1

      was successful.

 

DBI1337I  The partitioned database environment validation for the

      instance DB2 was successful.

 

DBI1339I  The instance validation for the instance DB2 was

      successful.

 

DBI1343I  The db2val command completed successfully. For details, see

      the log file C:\Users\ADVANC~1\DOCUME~1\DB2LOG\db2val-Sat Aug 25 12_10_43 2018.log.

Install and activate Sample Database

Run command db2sampl and then activate: -

then connect, and list active databases

List some data from SAMPLE

With the database connected, execute SELECT fieldlist FROM EMPLOYEE, e.g.

NB: if you close the Administrator DB2 CLP command window and reopen it you’ll need to re-execute the DB2 CONNECT command.  However you don’t need this with each DB2 SELECT command within a session.

Making DB2 available to Visual Studio

You may not need to do this: we did in order to develop the “Import from SQL” utility, and you may need to do this if you’re using Micro Focus Enterprise Developer with Visual Studio.  To make the library IBM.Data.DBQ available to Visual Basic or C# (so that IMPORTS IBM.Data.DB2 is accepted and you are able to define objects as type DB2Connection), either

            Visual Studio/menu: Project/Add Reference

or         Visual Studio/Solution Explorer: Right Click References, click Add Reference

 

From either Add Reference option, navigate to the location where DB2 has been installed (for me this was C:\Program Files\IBM\SQLLIB).  Browse down to IBM.Data.DB2.dll, which you’ll find in \BIN\netf20\.  Thus for me the reference added was C:\Program Files\IBM\SQLLIB\BIN\netf20\IBM.Data.DB2.dll .