IBM DB Getting started with Data Studio Hands-On Lab. Information Management Cloud Computing Center of Competence.

Similar documents
IBM DB Getting started with DB2 Hands-on Lab. Information Management Cloud Computing Center of Competence. IBM Canada Lab

IBM DB DB2 application development Hands-On Lab. Information Management Cloud Computing Center of Competence. IBM Canada Lab

IBM Software Information Management. IBM DB2 GSI Start-up Guide. IBM DB GoGrid Server Image (GSI) Get Started Guide

IBM DB2 9.7 Academic Workshop. Course Workbook. IBM Canada. Information Management Ecosystem Partnerships V

Rational Developer for IBM i (RDI) Distance Learning hands-on Labs IBM Rational Developer for i. Maintain an ILE RPG application using.

Best practices. Starting and stopping IBM Platform Symphony Developer Edition on a two-host Microsoft Windows cluster. IBM Platform Symphony

Getting Started with InfoSphere Streams Quick Start Edition (VMware)

Tivoli Access Manager for Enterprise Single Sign-On

Rational Developer for Power Systems Software

IBM Integration Designer Version 8 Release 5. Hello World for WebSphere DataPower Appliance IBM

IBM Decision Server Insights. Installation Guide. Version 8 Release 6

Tivoli Access Manager for Enterprise Single Sign-On

Tivoli Access Manager for Enterprise Single Sign-On

A Quick Look at IBM SmartCloud Monitoring. Author: Larry McWilliams, IBM Tivoli Integration of Competency Document Version 1, Update:

IBM WebSphere Sample Adapter for Enterprise Information System Simulator Deployment and Testing on WPS 7.0. Quick Start Scenarios

Contents. Configuring AD SSO for Platform Symphony API Page 2 of 8

Tivoli Access Manager for Enterprise Single Sign-On

Installing Watson Content Analytics 3.5 Fix Pack 1 on WebSphere Application Server Network Deployment 8.5.5

Managing IBM Db2 Analytics Accelerator by using IBM Data Server Manager 1

IBM Cognos Dynamic Query Analyzer Version Installation and Configuration Guide IBM

Best practices. Reducing concurrent SIM connection requests to SSM for Windows IBM Platform Symphony

Work offline with i Projects

IBM WebSphere. IBM WebSphere Adapter for PeopleSoft Enterprise Quick Start Scenarios

Integrating IBM Rational Build Forge with IBM Rational ClearCase and IBM Rational ClearQuest

SMASH Proxy Version 1.0

IBM Tivoli Access Manager for Enterprise Single Sign-On: Authentication Adapter Version 6.00 September, 2006

IBM Operational Decision Manager. Version Sample deployment for Operational Decision Manager for z/os artifact migration

IBM Spectrum LSF Process Manager Version 10 Release 1. Release Notes IBM GI

Best practices. Linux system tuning for heavilyloaded. IBM Platform Symphony

Release Notes. IBM Tivoli Identity Manager GroupWise Adapter. Version First Edition (September 13, 2013)

Patch Management for Solaris

CONFIGURING SSO FOR FILENET P8 DOCUMENTS

IBM Rational Synergy DCM-GUI

Release Notes. IBM Security Identity Manager GroupWise Adapter. Version First Edition (September 13, 2013)

Release Notes. IBM Tivoli Identity Manager Universal Provisioning Adapter. Version First Edition (June 14, 2010)

Teradata Studio Express

Introduction to IBM Data Studio, Part 1: Get started with IBM Data Studio, Version and Eclipse

Introduction to IBM Data Studio, Part 1: Get started with IBM Data Studio, Version and Eclipse

IBM Operational Decision Manager Version 8 Release 5. Configuring Operational Decision Manager on Java SE

Integrated use of IBM WebSphere Adapter for Siebel and SAP with WPS Relationship Service. Quick Start Scenarios

DB2 for z/os Stored Procedure support in Data Server Manager

Tivoli Access Manager for Enterprise Single Sign-On

IBM Algo Financial Modeler Version Foundation/Lite Installation Guide IBM

IBM Watson Explorer Content Analytics Version Upgrading to Version IBM

TIBCO ActiveMatrix BusinessWorks Installation

IBM Maximo Spatial Asset Management Version 7 Release 5. Installation Guide

Implementing IBM CICS JSON Web Services for Mobile Applications IBM Redbooks Solution Guide

Release Notes. IBM Tivoli Identity Manager Rational ClearQuest Adapter for TDI 7.0. Version First Edition (January 15, 2011)

Tivoli Access Manager for Enterprise Single Sign-On

Tivoli Access Manager for Enterprise Single Sign-On

Akana API Platform: Upgrade Guide

Hands-on Lab Session 9909 Introduction to Application Performance Management: Monitoring. Timothy Burris, Cloud Adoption & Technical Enablement

IBM Cloud Orchestrator. Content Pack for IBM Endpoint Manager for Software Distribution IBM

Scan Center. Version 1.2. Administrator's Guide

IBM VisualAge for Java,Version3.5. External Version Control

Firmware Update Guide

Version 2 Release 1. IBM i2 Enterprise Insight Analysis Maintaining a deployment IBM

IBM XIV Provider for Microsoft Windows Volume Shadow Copy Service. Version 2.3.x. Installation Guide. Publication: GC (August 2011)

IBM Storage Driver for OpenStack Version Installation Guide SC

IBM Maximo for Aviation MRO Version 7 Release 6. Installation Guide IBM

iscsi Configuration Manager Version 2.0

BlueMix Hands-On Workshop

IBM z/os Management Facility V2R1 Solution Guide IBM Redbooks Solution Guide

Cloud Platform. Version User's Guide

Secure Held Print Jobs

PetaLinux SDK User Guide. Eclipse Plugin Guide

Tivoli Endpoint Manager for Patch Management - AIX. User s Guide

IBM Spectrum LSF Version 10 Release 1. Readme IBM

IBM Storage Provider for VMware VASA Version User Guide GC

Implementing IBM Easy Tier with IBM Real-time Compression IBM Redbooks Solution Guide

IBM. Combining DB2 HADR with Q Replication. IBM DB2 for Linux, UNIX, and Windows. Rich Briddell Replication Center of Competency.

Version 9 Release 0. IBM i2 Analyst's Notebook Premium Configuration IBM

Version 1.2 Tivoli Integrated Portal 2.2. Tivoli Integrated Portal Customization guide

Log & Event Manager UPGRADE GUIDE. Version Last Updated: Thursday, May 25, 2017

IBM. IBM i2 Analyze Windows Upgrade Guide. Version 4 Release 1 SC

Best practices. Defining your own EGO service to add High Availability capability for your existing applications. IBM Platform Symphony

CSCI 161: Introduction to Programming I Lab 1a: Programming Environment: Linux and Eclipse

Version 9 Release 0. IBM i2 Analyst's Notebook Configuration IBM

RSE Server Installation Guide: AIX and Linux on IBM Power Systems

IBM i2 ibridge 8 for Oracle

CodeWarrior Development Tools mwclearcase Plug-in User Guide

Installing and Configuring Tivoli Monitoring for Maximo

IBM Storage Driver for OpenStack Version Installation Guide SC

IBM Maximo Spatial Asset Management Version 7 Release 5. Installation Guide

IBM Platform HPC V3.2:

IBM LoadLeveler Version 5 Release 1. Documentation Update: IBM LoadLeveler Version 5 Release 1 IBM

Integration Designer Version 8.0 Version 8 Release 5. Hello World Part 2: Service Components and Web Interfaces IBM

Print Management On-Premises

Policy Commander Console Guide - Published February, 2012

Release Notes. IBM Tivoli Identity Manager Oracle PeopleTools Adapter. Version First Edition (May 29, 2009)

IBM Extended Command-Line Interface (XCLI) Utility Version 5.2. Release Notes IBM

Enterprise Caching in a Mobile Environment IBM Redbooks Solution Guide

IBM Maximo for Service Providers Version 7 Release 6. Installation Guide

IBM Initiate Master Data Extract Version 10 Release 0. User's Guide GI

IBM Tivoli Identity Manager Authentication Manager (ACE) Adapter for Solaris

IBM Content Analytics with Enterprise Search Version 3.0. Expanding queries and influencing how documents are ranked in the results

Netcool/Impact Version Release Notes GI

Tivoli Access Manager for Enterprise Single Sign-On

IBM Security QRadar Version Customizing the Right-Click Menu Technical Note

Getting Started. Version 2.1

Transcription:

IBM DB2 9.7 Getting started with Data Studio Hands-On Lab I Information Management Cloud Computing Center of Competence IBM Canada Lab

Contents 1. INTRODUCTION...2 2. OBJECTIVES...2 3. SUGGESTED READING...3 4. GETTING STARTED: THE BASICS OF IBM DATA STUDIO...3 4.1 ECLIPSE FUNDAMENTALS...3 4.1.1 DATA ORGANIZATION WORKSPACES AND PROJECTS...3 4.1.2 USER INTERFACE VIEWS AND PERSPECTIVES...5 5. ENVIRONMENT SETUP REQUIREMENTS...6 6. LAUNCHING DATA STUDIO...8 6.1 DATABASE CONNECTIONS...10 6.1.1 CONNECTING TO THE SAMPLE DATABASE...10 6.1.2 MODIFYING DATABASE PARAMETERS...12 6.1.3 STOPPING AND STARTING YOUR DB2 INSTANCE...14 7. SUMMARY...16 1. Introduction Data Studio is a free Eclipse-based tool that can be used for database administration and development. 2. Objectives By the end of this lab, you will be able to: Understand the basics of the Eclipse-based environment Establish a database connection Modify database parameters Start and stop a DB2 instance 2

3. Suggested reading Getting started with IBM Data Studio for DB2 (Chapters 1-3) https://www.ibm.com/developerworks/wikis/display/db2oncampus/free+ebook+- +Getting+started+with+IBM+Data+Studio+for+DB2 A free ebook that can quickly get you up to speed with IBM Data Studio IBM Data Studio Information Center http://publib.boulder.ibm.com/infocenter/idm/v2r2/index.jsp A repository complete with tutorials on developing and administering with IBM Data Studio. 4. Getting Started: The Basics of IBM Data Studio This section of the lab introduces you to the basics of IBM Data Studio and how you can quickly get up and running with it. After completing this section, you will be able to: Launch Data Studio Create a new database connection Disconnect and reconnect to a database 4.1 Eclipse Fundamentals IBM Data Studio is built upon the Eclipse platform and, as such, is said to be an Eclipsebased development environment. The Eclipse platform is a framework that allows integrated development environments (IDE) to be created; plug-ins exist to allow development in Java, C/C++, PHP, COBOL, Ruby, and more. Developers using Eclipse will appreciate the familiar look and feel that IBM Data Studio offers. 4.1.1 Data Organization Workspaces and Projects In an Eclipse-based environment, all development takes place within a project, which is a directory that contains all of the source code, graphics, and other collateral. This is a concept with which most are familiar from using other IDE s. In Data Studio, you will typically work with Data Development projects, but other project types exist for Java development, web development, and more. Each project you create must be contained within a workspace, which is a directory in your file system. A workspace directory contains subdirectories for each of the projects 3

created within it. For example, Figure 4-1 demonstrates a scenario in which a workspace has been created on the path /workspace, and three projects BankApp, BookStore, and WebSite have been created within the workspace. Notice that the projects have all been created as subdirectories of /workspace. /workspace /workspace/bankapp /workspace/bookstore /workspace/website Figure 4-1 Workspace-project hierarchy In an Eclipse-based environment, workspaces and projects can easily be navigated via the Project Explorer view (we ll cover views in an upcoming section). When an Eclipse-based environment is opened, the user chooses which workspace to use in the dialog displayed in Figure 4-2. It is possible to create a new workspace by entering a new, non-existent path, or to work with an existing workspace by specifying an existing path. Additionally, users can choose to only work with one particular workspace (and to never be bothered again!) by checking the Use this as the default and do not ask again checkbox. Of course, this can always be undone by modifying a setting in the program preferences. Figure 4-2 Workspace selection Figure 4-3 shows how the workspace hierarchy from Figure 4-1 looks in the Project Explorer. 4

Figure 4-3 The Project Explorer view 4.1.2 User Interface Views and Perspectives Eclipse-based environments offer easy-to-use, customizable graphical interfaces through the use of views and perspectives. Just as workspaces contain projects, Eclipse perspectives contain views. In fact, we ve already seen an example of a view. In Figure 4-3, we saw that the Project Explorer view shows all projects in a workspace and files contained within them. A view is nothing more than a task pane a docked window that allows objects to be viewed and possibly manipulated. Eclipse-based environments define perspectives as a collection of views appropriate for a particular task or line of work. When a perspective is opened, all views associated with it are opened in the environment, and any other views previously opened are hidden. In IBM Data Studio, you will generally work with two perspectives: The Database Administration and the Data perspectives. To switch between perspectives, click the desired name in the toolbar: If the perspective you are looking for is not displayed, simply click the bring up a list of available perspectives. toolbar icon to Eclipse-based environments allow creation of custom perspectives by specifying which views to load. The figure below shows the Database Administration perspective. 5

Figure 4-4 The Database Administration Perspective 5. Environment Setup Requirements To complete this lab you will need the following: DB2 Academic Training VMware image VMware Player 2.x or VMware Workstation 6.x or later For help on how to obtain these software, and how to work with the VMWare image, please follow the instructions specified in the lab VMware Basics and Introduction. 1. At the login prompt, login with the db2inst1 credentials: Username: db2inst1 Password: password 6

Note: It is very important not to login as root user at this point. 2. Open a terminal window by right-clicking on the Desktop and choosing the Open Terminal item. 3. Ensure that the DB2 Database Manager has been started by issuing the following command at the prompt: db2inst1@db2rules:~> db2start Note: This command will only work if you logged in as the user db2inst1. If you accidentally logged in as another user, type su db2inst1 at the command prompt password: password. 4. This lab assumes you have the SAMPLE database created. You can check the list of existing databases using the command below: db2inst1@db2rules:~> db2 list db directory 7

5. If the SAMPLE databse is not on the list, you can create it using the following command: db2inst1@db2rules:~> db2sampl 6. Launching Data Studio 1. Click on the Computer button in the bottom left corner of the screen, and select Data Studio 2.2.1.0 2. In the Select a workspace dialog, accept the default path. Click OK. 3. Data Studio will now start with the Welcome homepage. 8

4. Close this window by clicking the Close button ( ) located at the top left to bring you into the Database Administration perspective as shown below. If your screen does not look like the one below, make sure you open the Database Administration perspective by clicking on Window -> Open perspective -> Other -> Database Administration. 9

6.1 Database Connections Before you can do anything productive with Data Studio, a connection must be established to a database. The Administration Explorer view in Data Studio allows you to do this. From this view it is possible to interact with and manipulate database artifacts. Since we will be working with the SAMPLE database, let s connect to this database. 6.1.1 Connecting to the SAMPLE database 1. Since the SAMPLE database was created prior to invoking Data Studio, Data Studio should be able to detect it. From the Administration Explorer, drill down the tree as shown below: 2. Right-click on SAMPLE [DB2 Alias] and choose Properties. Then click on the Driver properties tab. 3. In the Properties pane, ensure the following information is provided: Database: SAMPLE Host: localhost Port number: 50001 User name: db2inst1 Password: password Make sure you click on the Save password checkbox so you don t have to type this all the time as shown in the figure below. 10

4. Click the Test Connection button located on the bottom right corner. You should receive the message Ping succeeded. If not, verify you entered the information correctly and try again. Click OK when the test is successful. 5. Now that your connection properties have been verified, from the Administration Explorer, right click again on SAMPLE [DB2 Alias] and choose Connect 6. After a few seconds, the connection to the database SAMPLE should be established. Notice the connection icon besides SAMPLE now displays to hands interlocking. This signifies that you are connected to the database. 11

6.1.2 Modifying Database Parameters Data Studio can perform several administrative functions within DB2. One of these functions is the ability to manipulate database parameters. 1. In the Administration Explorer, right-click on the SAMPLE database, and choose Set up and Configure -> Configure. 12

2. This action will open a new view to configure parameters for the SAMPLE database. From this view it is possible to modify several parameters related to the database configuration as well as parameters related to the instance to which this database belongs. We will not modify any parameters at this time, so simply close the view after you are done exploring. 13

6.1.3 Stopping and Starting your DB2 instance In the previous section you notice that it is possible to modify instance level parameters. Some modifications actually require an instance re-start to come into effect. That is why from Data Studio you have the ability to stop and start the instance. 1. To stop the instance, from the Administration Explorer, right-click on the instance name (db2inst1 in this example) and choose Stop. 14

2. A window will appear asking you to select a connection profile. The Administration Explorer actually display connection profiles which include database, user ID, password, and other information as you input earlier. You could create different connection profiles. For example, for the same SAMPLE database, you could create a connection profile called SAMPLE1 which connects to the database using a different user ID and password. When you stop the instance, Data Studio asks you which connection profile to use, which basically means which user ID will be performing this operation. In our example we only have one connection profile, SAMPLE. So choose that connection profile, and click OK. 3. Then you need to click the Run button to stop the instance. 4. In the SQL Results view you will be able to notice the status of your command that will go from Running while in process to Succeeded once it is completed. In the Status panel you can also appreciate the command executed as well as the output from the console. 15

5. Now start the instance, following the same steps as above, but this time choosing Start. 6. Exit Data Studio. 7. Summary You can hopefully see by now that IBM Data Studio is a highly productive environment for DB2 development and administration. Over the course of the following labs, we ll see how fast and easy it is to create and execute SQL and XQuery scripts; develop and test stored procedures in SQL and Java; create and alter database objects; analyze query execution; etc. 16

Copyright IBM Corporation 2011 All Rights Reserved. IBM Canada 8200 Warden Avenue Markham, ON L6G 1C7 Canada IBM, IBM (logo), and DB2 are trademarks or registered trademarks of International Business Machines Corporation in the United States, other countries, or both. Linux is a trademark of Linus Torvalds in the United States, other countries, or both UNIX is a registered trademark of The Open Group in the United States, other countries, or both Windows is a trademark of Microsoft Corporation in the United States, other countries, or both. VMware is a trademark or VMware Inc. in the United States, other countries, or both. Other company, product, or service names may be trademarks or service marks of others. Information concerning non-ibm products was obtained from the suppliers of those products, their published announcements or other publicly available sources. IBM has not tested those products and cannot confirm the accuracy of performance, compatibility or any other claims related to non-ibm products. Questions on the capabilities of non-ibm products should be addressed to the suppliers of those products. The information in this publication is provided AS IS without warranty. Such information was obtained from publicly available sources, is current as of July 2009, and is subject to change. Any performance data included in the paper was obtained in the specific operating environment and is provided as an illustration. Performance in other operating environments may vary. More specific information about the capabilities of products described should be obtained from the suppliers of those products. References in this publication to IBM products or services do not imply that IBM intends to make them available in all countries in which IBM operates. The following paragraph does not apply to the United Kingdom or any other country where such provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON- INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or implied warranties in certain transactions, therefore, this statement may not apply to you. This information could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in new editions of the publication. IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this publication at any time without notice. Any performance data contained herein was determined in a controlled environment. Therefore, the results obtained in other operating environments may vary significantly. Some measurements may have been made on development-level systems and there is no guarantee that these measurements will be the same on generally available systems. Furthermore, some measurement may have been estimated through extrapolation. Actual results may vary. Users of this document should verify the applicable data for their specific environment. 17