Before you start
This tutorial introduces new users of IBM DB2 to relational database concepts through a fun and interactive game called The DB2 Detective Game. It assumes no prior database knowledge or programming experience in the Structured Query Language (SQL). The recommended audience is small business owners, students, teachers or professors, or anyone wanting to gain an understanding of data management.
To play this game, you should have IBM DB2 9 installed, the DB2Game database loaded, and the clue file running.
- Download DB2 9 from the product download Web page.
- Choose the appropriate image, depending on your workstation platform.
- Click Download, and sign in with your IBM ID. If you do not have an IBM ID, you can register for free.
- View your personal information and the product license. Click I confirm.
- Select a download method (Download Director or HTTP), and click Download now.
- Once the download is complete, navigate to the folder containing the downloaded file.
- Unzip the file.
- Find setup.exe in the unzipped folder, and double-click it. The DB2 Setup Launchpad appears.
- Within the DB2 Setup Launchpad, click Install a Product from the panel on the left.
- Click Install New under DB2 Express.
- In the installer, click Next to view the License Agreement. You will need to Accept the agreement to continue, and click Next .
- Choose a Typical installation, and click Next .
- Confirm that you plan to "Install DB2 Express Edition on this computer and save your settings in a response file," then click Next.
- Verify the installation directory, and click Next.
- On the User Information screen, set the Domain to None — use local user account, using the pull-down menu. Use db2admin as the user name, and set a password. (Optionally, you can select the LocalSystem account, but there are limitations introduced if this option is used — click Help to learn more.)
- Make sure the check box "Use the Same User Name and Password for the remaining DB2 Services" is checked, and click Next.
- On the Configure DB2 instances screen, click Next.
- Click Finish to start the DB2 product installation when you reach the Start copying files and create response file screen.
- When the installation is complete, a window with the message "Setup is complete" appears. Click Finish to complete the installation procedure.
- A window entitled "DB2 First Steps" now appears. Click Create profile. Your Web browser opens a page called "DB2 First Steps." This page contains many useful links to information on DB2, but it is not used during this tutorial.
Install the DB2 Detective Game database
- Ensure DB2 Express-C 9 is installed.
- Download the DB2 Detective Game database file from the Downloads section of this tutorial.
- Create a directory called db2game in drive C.
- Unzip the db2detectivefiles.zip file to that directory.
- From the Windows Start menu, choose All Programs > IBM DB2 > General Administration Tools > Control Center.
- From the menu at the top of the interface, select Tools > Command Editor. A command editor window pops up and allows you to enter SQL statements.
- From the menu, select Selected > Open. From the Look in drop-down menu, select C:\, and navigate to the db2game directory. From the file list, choose db2game.txt, and click OK.
- Click the Execute icon (the icon looks like a "Play" button).
In order to run the game's clue file (db2game.jar), it has to be set up to open with Java Virtual Machine (JVM) software (javaw.exe, for example). To set this up:
- Right-click the db2game.jar file.
- Select Properties.
- Under the General tab, specify the type of file as Executable Jar File.
- Opens with window should reflect a JVM that you have locally installed on your machine. If this is not the case, click Change....
- From the Open With window, locate and select your JVM software (javaw.exe, for example).
- Click OK.
- Click Apply.
- Click OK.
You can now launch the db2game.jar file. Double-click the icon, or you can create a shortcut to the file for easier access.
Note: If you encounter any problems during installation, you can post a question on the DB2 Express Forum.
Create a shortcut to the DB2 Detective Game
To create a shortcut to the db2game.jar file on your desktop:
- Right-click anywhere on the desktop.
- Select New > Shortcut.
- In the field called "Type the location of the item", type C:\db2game\db2game.jar.
- Click Next.
- In the field called "Type a name for this shortcut", , type db2game (it should already appear by default).
- Click Finish.

