+ All Categories
Home > Documents > LSCAS Lab Setup Guide€¦ · Lab Set Up Guide February 2007 Edition The information contained in...

LSCAS Lab Setup Guide€¦ · Lab Set Up Guide February 2007 Edition The information contained in...

Date post: 05-Oct-2020
Category:
Upload: others
View: 0 times
Download: 0 times
Share this document with a friend
22
DB2 SQL Workshop (Course Code CF12) Lab Set Up Guide ERC 4.1 IBM Certified Course Material V3.1.0.1 cover
Transcript
Page 1: LSCAS Lab Setup Guide€¦ · Lab Set Up Guide February 2007 Edition The information contained in this document has not been submitted to any formal IBM test and is distributed on

V3.1.0.1

cover

���

Front cover

DB2 SQL Workshop (Course Code CF12)

Lab Set Up Guide ERC 4.1

IBM Certified Course Material

Page 2: LSCAS Lab Setup Guide€¦ · Lab Set Up Guide February 2007 Edition The information contained in this document has not been submitted to any formal IBM test and is distributed on

Lab Set Up Guide

Trademarks

IBM® is a registered trademark of International Business Machines Corporation.

The following are trademarks of International Business Machines Corporation in the United States, or other countries, or both:

Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.

Windows is a trademark of Microsoft Corporation in the United States, other countries, or both.

UNIX® is a registered trademark of The Open Group in the United States and other countries.

Linux® is a registered trademark of Linus Torvalds in the United States, other countries, or both.

Other company, product, or service names may be trademarks or service marks of others.

AIX DB2 iSeriesOS/390 POWER QMFWebSphere z/OS 400

February 2007 Edition

The information contained in this document has not been submitted to any formal IBM test and is distributed on an “as is” basis without any warranty either express or implied. The use of this information or the implementation of any of these techniques is a customer responsibility and depends on the customer’s ability to evaluate and integrate them into the customer’s operational environment. While each item may have been reviewed by IBM for accuracy in a specific situation, there is no guarantee that the same or similar results will result elsewhere. Customers attempting to adapt these techniques to their own environments do so at their own risk.

© Copyright International Business Machines Corporation 1999, 2007. All rights reserved.This document may not be reproduced in whole or in part without the prior written permission of IBM.Note to U.S. Government Users — Documentation related to restricted rights — Use, duplication or disclosure is subject to restrictions set forth in GSA ADP Schedule Contract with IBM Corp.

Page 3: LSCAS Lab Setup Guide€¦ · Lab Set Up Guide February 2007 Edition The information contained in this document has not been submitted to any formal IBM test and is distributed on

Lab Set Up GuideV3.1.0.1

TOC

Contents

Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v

Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii

Requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1Hardware Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

Hardware Requirements for Workstations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1Hardware Requirements for z/OS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

Software Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2Software Requirements for Workstations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2Software Requirements for z/OS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Product Document Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3Lab Environment for Workstations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Teams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4Userids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4Authorities for Userids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4DB2 Authorities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

Lab Environment for z/OS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6Teams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6Userids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6Data Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6Authorities for Userids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6DB2 Authorities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

Set Up Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9Set Up Instructions for Workstations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9Set Up Instructions for z/OS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10Verification Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

© Copyright IBM Corp. 1999, 2007 Contents iii

Page 4: LSCAS Lab Setup Guide€¦ · Lab Set Up Guide February 2007 Edition The information contained in this document has not been submitted to any formal IBM test and is distributed on

Lab Set Up Guide

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

iv DB2 SQL Workshop © Copyright IBM Corp. 1999, 2007

Page 5: LSCAS Lab Setup Guide€¦ · Lab Set Up Guide February 2007 Edition The information contained in this document has not been submitted to any formal IBM test and is distributed on

Lab Set Up GuideV3.1.0.1

TMK

Trademarks

The reader should recognize that the following terms, which appear in the content of this training document, are official trademarks of IBM or other companies:

IBM® is a registered trademark of International Business Machines Corporation.

The following are trademarks of International Business Machines Corporation in the United States, or other countries, or both:

Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.

Windows is a trademark of Microsoft Corporation in the United States, other countries, or both.

UNIX® is a registered trademark of The Open Group in the United States and other countries.

Linux® is a registered trademark of Linus Torvalds in the United States, other countries, or both.

Other company, product, or service names may be trademarks or service marks of others.

AIX® DB2® iSeries™OS/390® POWER™ QMF™WebSphere® z/OS® 400®

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

© Copyright IBM Corp. 1999, 2007 Trademarks v

Page 6: LSCAS Lab Setup Guide€¦ · Lab Set Up Guide February 2007 Edition The information contained in this document has not been submitted to any formal IBM test and is distributed on

Lab Set Up Guide

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

vi DB2 SQL Workshop © Copyright IBM Corp. 1999, 2007

Page 7: LSCAS Lab Setup Guide€¦ · Lab Set Up Guide February 2007 Edition The information contained in this document has not been submitted to any formal IBM test and is distributed on

Lab Set Up GuideV3.1.0.1

LSGp

Purpose

This Lab Set Up Guide provides directions for installing, preparing, and verifying the lab hardware and software in preparation for conducting a class of course CF12.

The Requirements sections of this document may also be used to determine the specific hardware and software needed to conduct a class.

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

© Copyright IBM Corp. 1999, 2007 Purpose vii

Page 8: LSCAS Lab Setup Guide€¦ · Lab Set Up Guide February 2007 Edition The information contained in this document has not been submitted to any formal IBM test and is distributed on

Lab Set Up Guide

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

viii DB2 SQL Workshop © Copyright IBM Corp. 1999, 2007

Page 9: LSCAS Lab Setup Guide€¦ · Lab Set Up Guide February 2007 Edition The information contained in this document has not been submitted to any formal IBM test and is distributed on

Lab Set Up GuideV3.1.0.1

LSG

Requirements

The following tables list the hardware, software, and other materials needed to set up a lab to conduct a class of course CF12.

Hardware Requirements

Hardware Requirements for Workstations

Table 1 lists the hardware needed to prepare one student lab set. When preparing for a class, multiply the items below by the number of lab sets needed for the class Hardware requirements. You don't need a client/server environment for this course, so it is probably easiest to set up each workstation with the code for DB2 single user.

Hardware Requirements for z/OS

Table 2 lists the hardware needed to prepare one student lab set. When preparing for a class, multiply the items below by the number of lab sets needed for the class.

Table 3 lists any additional hardware needed that is not part of the student lab sets.

Table 1: UDB hardware for one student lab setMachine Type

ModelMinimum Memory

Minimum Free DASD

Features (Name)

Feature Code

Workstation Any 512 MB 400 MB CD-ROM N/A

Table 2: z/OS hardware for one student lab setMachineAnything that allows the student to use a TSO session.

Table 3: z/OS hardware not part of student lab setsMachineA z/OS system that runs DB2 V8 or V7 ensures that all labs can be successfully completed. If an older version of DB2 is used, you will have to run the machine exercises to see what is not available (for example, FETCH FIRST n ROWS ONLY was not available before Version 7).

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

© Copyright IBM Corp. 1999, 2007 Requirements 1

Page 10: LSCAS Lab Setup Guide€¦ · Lab Set Up Guide February 2007 Edition The information contained in this document has not been submitted to any formal IBM test and is distributed on

Lab Set Up Guide

Software Requirements

Software Requirements for Workstations

Table 4 lists the software needed to prepare the student and/or instructor lab set(s). When preparing for a class, be sure that you have the correct number of licensed copies of any non-IBM software.

The Operating System requirements on Windows depends on the DB2 edition (PE, WSE or ESE) you are installing; please refer to the appropriate Quick Beginnings manual.

Please note that while any platform can be used, the machine exercises have been tested only in the Windows (and z/OS) environments.

Software Requirements for z/OS

DB2 for z/OS or OS/390 V7 or later. If an earlier version is used, some of the exercises may not work. SPUFI or QMF must be accessible to students. Other tools that access DB2 for z/OS may also be made available at the instructor's discretion.

Table 4: UDB software for one student lab set

Operating System Release Version LPPs OPPsnon-IBM Software

Windows XP/NT/2000/ME

With latest fix packDB2 for Windows V7 or later

LinuxDepends on distribution - see DB2 documentation

DB2 for Linux V7 or later

AIX 5.1 or laterDB2 for AIX V7 or later

Other UNIX Depends on system - see DB2 documentation

DB2 V7 or later for the appropriate platform

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

2 DB2 SQL Workshop © Copyright IBM Corp. 1999, 2007

Page 11: LSCAS Lab Setup Guide€¦ · Lab Set Up Guide February 2007 Edition The information contained in this document has not been submitted to any formal IBM test and is distributed on

Lab Set Up GuideV3.1.0.1

LSG

Product Document Requirements

Table 5 lists documentation needed to conduct the class. Quantities are specified for each class, each lab set, or each student.

Note: It is only necessary to supply the manuals for the platforms being used in the lab environment. Providing a softcopy of the manual is acceptable.

Table 5: Product documentation needed for classDocument Name

Form Number Entire Class Each Lab Set Each Student

IBM DB2 V9 SQL Reference for Linux, UNIX, and Windows (Volumes 1 and 2)

SC10-4249

SC10-4250

IBM DB2 UDB SQL Reference Volumes 1 and 2 (Version 8)

SC09-4844

SC09-4845

IBM DB2 UDB for z/OS (V8): SQL Reference

SC18-7426

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

© Copyright IBM Corp. 1999, 2007 Requirements 3

Page 12: LSCAS Lab Setup Guide€¦ · Lab Set Up Guide February 2007 Edition The information contained in this document has not been submitted to any formal IBM test and is distributed on

Lab Set Up Guide

Lab Environment for Workstations

The following sections describe the environment for the lab exercises.

Note: The subsequent steps apply to lab setups using a client/server environment. If you use a single user environment, the steps listed below are not necessary. In this case, one workstation with a local DB2 must be provided for each team.

Teams

The students will perform the lab exercises in teams or alone. One workstation should be provided for each team or student.

Userids

Instructor Userid

For each class, the instructor should have a userid through which they can connect to the server.

Userids for Teams

Each team should have a userid which allows connection to the server.

Authorities for Userids

Authorities for Instructor Userids

The instructor userid must have the following authorization:

• The instructor userid must be able to connect to the server.

In addition, the instructor userids must have authorities for the DB2 systems used by the class.

Authorities for Student Userids

The student userids, that is, the userids for the teams, must have the following authorization:

• Each student userid must be able to connect to SAMPLE database.

In addition, the student userids must have authorities for the DB2 systems of their team as described later on.

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

4 DB2 SQL Workshop © Copyright IBM Corp. 1999, 2007

Page 13: LSCAS Lab Setup Guide€¦ · Lab Set Up Guide February 2007 Edition The information contained in this document has not been submitted to any formal IBM test and is distributed on

Lab Set Up GuideV3.1.0.1

LSG

DB2 Authorities

DB2 Authorities for Instructor Userids

The instructor's userid should have the listed authorities if the database for the students is not created in advance.

• SYSADM to create the SAMPLE database

• SELECT on sample tables WITH GRANT OPTION if the sample database was created by another userid.

DB2 Authorities for Student Userids

The userids for a team should have the following authorities if a client server environment is used.

• CONNECT TO SAMPLE.

• SELECT on sample tables

• CREATETAB and use of USERSPACE1 in SAMPLE database.

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

© Copyright IBM Corp. 1999, 2007 Requirements 5

Page 14: LSCAS Lab Setup Guide€¦ · Lab Set Up Guide February 2007 Edition The information contained in this document has not been submitted to any formal IBM test and is distributed on

Lab Set Up Guide

Lab Environment for z/OS

The following sections describe the environment for the lab exercises.

Teams

The students will perform the lab exercises in teams or alone. One userid should be provided for each team or student.

Userids

Instructor Userid

For each course, the instructor should have a userid through which he/she can log on to the z/OS system, used during the course.

Userids for Teams

Each team should have a userid which allows to log on to the z/OS system used during the course.

Data Sets

Data Sets for Instructor Userids

Partitioned data set which can be used for SPUFI.

Data Sets for Student Userids

Partitioned data set which can be used for SPUFI.

Authorities for Userids

Authorities for Instructor Userids

The instructor userid must have the following authorization:

• The instructor userid must be able to define and delete partitioned data sets for the students.

In addition, the instructor userids must have authorities for the DB2 systems used by the class.

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

6 DB2 SQL Workshop © Copyright IBM Corp. 1999, 2007

Page 15: LSCAS Lab Setup Guide€¦ · Lab Set Up Guide February 2007 Edition The information contained in this document has not been submitted to any formal IBM test and is distributed on

Lab Set Up GuideV3.1.0.1

LSG

Authorities for Student Userids

The student userids, that is, the userids for the teams, must have the following authorization:

• Each student userid must have read/write access to its partitioned data set which is used for SPUFI.

In addition, the student userids must have authorities for the DB2 systems of their team as described later on.

DB2 Authorities

DB2 Authorities for Instructor Userids

The instructors userid should have as a minimum the listed authorities if the database and table space for the student has not been created in advance. The set-up has been tested with an instructor userid having SYSADM authority.

• CREATE DATABASE

• CREATE TABLESPACE

• USE OF STOGROUP, the stogroup used for the setup

• USE OF BUFFERPOOL, the bufferpool used for the setup

• SELECT on sample tables WITH GRANT OPTION

DB2 Authorities for Student Userids

The userids for a team should have the following authorities:

• CREATETAB in DATABASE, TABLESPACE that are provided.

• SELECT ON sample tables / views that are provided.

• USE OF PLAN (SPUFI or QMF, depending on what will be used)

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

© Copyright IBM Corp. 1999, 2007 Requirements 7

Page 16: LSCAS Lab Setup Guide€¦ · Lab Set Up Guide February 2007 Edition The information contained in this document has not been submitted to any formal IBM test and is distributed on

Lab Set Up Guide

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

8 DB2 SQL Workshop © Copyright IBM Corp. 1999, 2007

Page 17: LSCAS Lab Setup Guide€¦ · Lab Set Up Guide February 2007 Edition The information contained in this document has not been submitted to any formal IBM test and is distributed on

Lab Set Up GuideV3.1.0.1

LSG

Set Up Instructions

Set Up Instructions for Workstations

The following describes the configurations of the student and/or lab set systems.

Step 1: Operating system and DB2 setup

• Install the workstation operating system(s) you want to use.

• Install DB2 V8 (preferably) or V7 for the operating system(s) you chose.

Step 2: Set up a workstation

You have only to establish the sample database. No further setup is necessary. Create the sample database as described in the following:

• Open a DB2 command window.

• Start DB2 using the command: db2start

• Create the sample database using the command: db2sampl - v8

Step 3: Test the lab environment

• Connect to SAMPLE using the command DB2 connect to sample

• Run the command: DB2 list tables for all

• Verify that all the tables described at the beginning of the lab guide exists. Use SELECTs to verify that each table contains data.

END OF SETUP

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

© Copyright IBM Corp. 1999, 2007 Set Up Instructions 9

Page 18: LSCAS Lab Setup Guide€¦ · Lab Set Up Guide February 2007 Edition The information contained in this document has not been submitted to any formal IBM test and is distributed on

Lab Set Up Guide

Set Up Instructions for z/OS

The following describes the configurations of the student and/or lab set systems.

Please note that there has been no modification to the lab exercise in this version of the course, therefore if you already have a set-up procedure in place for the former version, you do not need to change it.

Note: The views DEPARTMENT, EMPLOYEE, PROJECT, and EMP_ACT are used as SAMPLE TABLES during the course to match the content of the sample tables in DB2 UDB for Linux, UNIX and Windows. The views only show those rows which are available on the LUW platforms.

Step 1: Retrieve course material from repository

Retrieve the course material for course CF12 ERC 4.0 from the worldwide ITES repository.

Step 2: Ensure that instructor and student userids have been set up

Ensure that instructor and student TSO userids can log on to the z/OS system and that they have the required authorities. The instructor id must be able to allocate a dataset for each student userid, and must have the necessary DB2 authorities (see DB2 Authorities above). The set-up by the instructor will establish the necessary student DB2 privileges.

If the instructor has to grant additional privileges to the student ids (if for example, we want the student to CREATE TABLE ... IN DATABASE..., they need to be granted CREATETS privilege in the database, and use of a STOGROUP and BUFFERPOOL), it may need SYSADM authority.

Step 3: Send lab exercise material to instructor userid

Retrieve the cf124labfiles.zip file from the repository and unzip it. The command file which can be used to send the files to the host assumes that they will be located in the C:\CF124 directory. The following files should be created:

• cf124.allocstu

• cf124.creasamp

• cf124.createam

• cf124.dropxx

• cf124.populate

• cf124send.cmd

• cf124.tmxxview

• Readme.1st

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

10 DB2 SQL Workshop © Copyright IBM Corp. 1999, 2007

Page 19: LSCAS Lab Setup Guide€¦ · Lab Set Up Guide February 2007 Edition The information contained in this document has not been submitted to any formal IBM test and is distributed on

Lab Set Up GuideV3.1.0.1

LSG

Step 4: Receive lab exercise material on instructor userid

Log on to instructor userid. Allocate a partitioned dataset (PDS) called ’instuid.CF12V4.CNTL’ (where instuid is the instructor’s TSO userid) with the following characteristics: RECFM(FB), LRECL(80), BLKSIZE(multiple of 80) and a few directory blocks (there will initially be only six members in it).

You will have to upload all files you unzipped earlier except the Readme.1st and the cf124send.cmd files in text mode as members of the CF12V4.CNTL dataset. The Readme.1st file describes a possible way to do so if you have the “send” command available on your workstation.

Step 5: Create views, databases and table spaces for the student IDs

Please follow the instructions in the Readme.1st file. The set-up is a little simpler if the DB2 sample tables exist and the instructor userid has at least SELECT privilege on them WITH GRANT OPTION, so you should check if this is the case.

Step 6: Verify that objects are created

Verify that all the objects listed in step 5 are created. Use SELECT statements to test that the views correspond to the descriptions in the Exercise Guides.

END OF SETUP

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

© Copyright IBM Corp. 1999, 2007 Set Up Instructions 11

Page 20: LSCAS Lab Setup Guide€¦ · Lab Set Up Guide February 2007 Edition The information contained in this document has not been submitted to any formal IBM test and is distributed on

Lab Set Up Guide

Verification Procedures

To verify the correct installation of the lab exercises, it is highly recommended that you perform all lab exercises once using a student userid.

As a minimum, from each student workstation (for Windows) and from each student userid (z/OS), run the following queries:

• SELECT COUNT(*) FROM EMPLOYEE -- should be 32

• SELECT COUNT(*) FROM DEPARTMENT -- should be 9

• SELECT COUNT(*) FROM PROJECT -- should be 20

• SELECT COUNT(*) FROM EMP_ACT -- should be 74

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

12 DB2 SQL Workshop © Copyright IBM Corp. 1999, 2007

Page 21: LSCAS Lab Setup Guide€¦ · Lab Set Up Guide February 2007 Edition The information contained in this document has not been submitted to any formal IBM test and is distributed on

V3.1.0.1

backpg

Back page
Page 22: LSCAS Lab Setup Guide€¦ · Lab Set Up Guide February 2007 Edition The information contained in this document has not been submitted to any formal IBM test and is distributed on

���®


Recommended