Db2

 View Only

Downloading and installing IBM Data Server Manager on Ubuntu Linux

By Lynn Chou posted Fri August 17, 2018 08:26 PM

  

Learning objectives

While IBM Data Server Manager (DSM) allows DBAs to administer, monitor, manage, and optimize the performance of Db2 databases, it also provides developers with an easy-to-use testing environment. Developers can use DSM to create data objects like tables and views, as well as execute SQL statements before they are integrated into their database application designs. And, after building and running their applications against a Db2 database, developers can use DSM to quickly and easily verify the results of any SQL operations performed.

This tutorial walks you through the process of downloading and installing DSM, and connecting to the SAMPLE Db2 database that you created previously in the Downloading and installing Db2 Developer-C on Ubuntu Linux tutorial.

From there, you will use the DSM SQL Editor to run commands against the SAMPLE database and see the results.

Prerequisites

To complete this tutorial, you should have a basic understanding of the Linux command line, as this will be required to perform the installation.

As this tutorial is intended to be completed as an extension of the Db2 Developer-C tutorial, you will need the following items:

  • An Intel-based X86 server capable of supporting a 64-bit Operating System
  • Monitor
  • Keyboard
  • Mouse
  • An Internet connection

The system you will be installing to has the Ubuntu Linux 18.04 LTS (Desktop) operating system up and running, with a working installation of Db2 Developer-C V11.1.3.3.

You will download the DSM installation package from the IBM developerWorks site. However, you will need to have an active IBM account to access the DSM download page. If you do not have these credentials, you can create a free IBM account from the Create an IBM account page.

Step 1: Downloading DSM (Duration: 5 minutes)

To download DSM to your Db2 Developer-C server:

  1. In your web browser, open the IBM Data Server Manager product page.
  2. If prompted, enter your IBM account credentials and sign in.
IBM sign in

  1. Click Download now.
  2. Enter your IBM account User ID and password and then click Sign in.
DSM download signin

  1. From the Download using http tab, go to the right of the ibm-datasrvmgr-linux-x86_64.tgz option and click Download now.
DSM Build
  1. When prompted, save the file to your Db2 Developer-C server.
Save Db2 Dev_C
  1. When the download is complete, extract the file to a location on your hard drive.

Step 2: Installing DSM (Duration: 15 minutes)

Once you have downloaded and extracted the installation package onto your hard drive, you will need to open a terminal window and use the command line to navigate to the folder where the DSM software is stored, and then run the setup script. You will find this file in the /ibm- datasrvmgr-linux-x86_64/ibm-datasrvrmg folder.

To extract the DSM installation package:

  1. Create a directory named software in the /home directory and make it accessible to everyone by running the following commands from the terminal window:
mkdir /home/software
chmod 777 /home/software

  1. Move the DSM installation package from your /Downloads folder to the /home/software folder by running the following command from the terminal window:
mv /home/*<AdminUser>*/Downloads/*.tgz /home/software
where <AdminUser> is the name of the administrative user.

  1. Go to the /home/software directory and extract the installation package by running the following commands from the terminal window:
cd /home/software
gunzip *.tgz
tar -xvf ibm-datasrvmgr-linux-x86_64.tar

  1. Remove the tar file (it’s no longer needed) by executing the following command:

rm ibm-datasrvmgr-linux-x86_64.tar

The installation package is now extracted to the /home/software/ ibm-datasrvmgr-linux-x86_64
folder.

To install DSM on your Db2 Developer-C server:

  1. From within the /home/software folder, navigate to the folder that contains the extracted DSM installation files by executing the following command:

cd ibm-datasrvmgr-linux-x86_64

  1. Using the command prompt, navigate to the extracted folder and run the following command:

 ./setup.sh -gui.

  1. When prompted, accept the license agreement and click Next.
Accept T_C

Page 2 of the wizard presents several fields with some pre-set values.

The port options include:

  • Web console HTTP access: The port that is used to access the DSM web console from a web browser.
  • Web console HTTPS access: The secure port that is used to access the DSM web console from a web browser.
  • Status port used internally for checking and stopping the server: The port that is used internally to verify the status of the server and to stop the server.

Data Server Manager also uses a Java virtual manager (JVM) for database monitoring tasks. The pre-set values for Xms (initial memory allocation pool) and Xmx (maximum memory allocation pool) are sufficient for completing this tutorial, but these values can be changed from inside DSM, by going to Settings > Product Setup.

  1. Enter a User ID (e.g., admin) and Password (e.g., passw0rd) in the fields provided. Accept the remaining default values, and then click Run Setup.
Config_DSM
A progress bar appears during the installation.


ProgressBar

  1. When DSM has been successfully installed, you will be presented with two live URLs for connecting to the DSM console. Bookmark these URLs in your browser and then click Finish.
Setup_complete

Step 3: Logging into DSM (Duration: 1 minute)

You log into your DSM server using the user ID and password that you created during installation.

To log into DSM:

  1. From your browser, go to the URL http://localhost:11080/console to open the DSM sign-in page.
  2. In the fields provided, enter the User ID and password you created during the DSM installation process (e.g., admin, passw0rd), and then click Sign In.
DSM_signin_page

The DSM console should appear in your browser.

DSM Console

Step 4: Connecting to the sample database (Duration: 5 minutes)

Once you have access to the DSM console, the first thing you will need to do is establish a connection to a database. For our purposes, we will connect to the SAMPLE database that you created when installing Db2 Developer-C.

To create a connection to the SAMPLE database:

  1. From the menu, select Settings > Manage Connections.
Manage_connection
  1. Select Add > Add a connection.
Add_connection
  1. In the fields provided, enter the values needed for connecting to the SAMPLE database on your Db2 Developer-C server:
  • Database connection name: A unique identifier of the connection that can include letters, numbers, hyphens, underlines, and the @ symbol
  • Data server type: For our purposes, this will be the IBM Db2 option
  • Database name: The name of the database (e.g., SAMPLE)
  • Host name: The host name or IP address of your Db2 Developer-C server. This information can be found in the /etc/hosts file on your Linux machine
  • Port number: The port configured for your database. The default value is 50000, but you can also find out port number information in the /etc/services file on your Linux machine.

Below the fields are two check box options:

  • Enable operation
  • Enable data collection

Operation credentials provide the connected user with full database administration access to the database. This allows the user to administer, tune, and query the connected database. Data collection credentials allow the connected user to collect data from the connected database.

For the purposes of this tutorial, you will only need operational access to the database.

  1. Click the Enable operation check box.
Enable_operation
  1. Click the Credential tab and, in the fields provided, enter the credentials for accessing the SAMPLE database. These should be the same credentials that were created when connecting to the SAMPLE database as part of the Db2 Developer-C installation process (e.g., db2inst1, ibmdb2).
  2. Click Test Connection.
Test_connection
  1. When the connection test completes successfully, click OK.

Your new connection should now appear in the Database Connection page.

Step 5: Running queries (Duration: 1 minute)

Once you have a connection to the Db2 SAMPLE database, you can use DSM to view tables, add columns to tables, and run queries from the SQL Editor.

To run a simple query against your Db2 SAMPLE database:

  1. Ensure that your connection to the SAMPLE database appears in the database selector bar at the top of the console.
  2. From the menu, select Run SQL.
Run_SQL
  1. In the SQL Editor window, enter the following SELECT statement:

SELECT * FROM Department

  1. Click Run.
Run

 

If the query runs successfully, you should see 14 records from the Department table in the Results pane at the bottom of the console.

Summary

You should now have a good understanding of how to obtain and install DSM on an Ubuntu Linux Db2 server. You should also be able to use DSM to create a connection to a database, and then use the SQL Editor to run queries against a connected database.

For more detailed information on how to use DSM to manage databases and monitor database activity over time, refer to the IBM Data Server Manager V2.1.x Knowledge Center.


#Db2
0 comments
40 views

Permalink