DB2 UDB Evaluation Guide For Linux And Windows - Kev009

Transcription

Front coverDB2 UDB EvaluationGuide for Linux andWindowsInstall and configure DB2 UDB V8.1 forLinux and WindowsBuild a Web-based applicationusing DB2 UDB and PHPExplore the new featuresof DB2 UDB V8.1Whei-Jen ChenAngus BeatonDavid KlineGlen Johnsonibm.com/redbooks

International Technical Support OrganizationDB2 UDB Evaluation Guide for Linux and WindowsApril 2003SG24-6934-00

Note: Before using this information and the product it supports, read the information in“Notices” on page xvii.First Edition (April 2003)This edition applies to DB2 Universal Database Version 8.1 for use with SuSE Linux Version 8.1,Red Hat Linux Version 8.0, and Windows 2000 operating systems. Copyright International Business Machines Corporation 2003. All rights reserved.Note to U.S. Government Users Restricted Rights -- Use, duplication or disclosure restricted by GSA ADPSchedule Contract with IBM Corp.

ContentsFigures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ixTables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvNotices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviiTrademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviiiPreface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xixThe team that wrote this redbook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiAcknowledgement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiiBecome a published author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiiComments welcome . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiiiChapter 1. Introduction to DB2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.1 DB2 UDB features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.2 Version 8 highlights . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.3 DB2 database objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61.4 DB2 UDB architecture and processes. . . . . . . . . . . . . . . . . . . . . . . . . . . . 101.5 Accessing and updating DB2 data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12Chapter 2. Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152.1 Obtaining the DB2 trial code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162.1.1 Downloading DB2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162.1.2 Downloading the DB2 documentation . . . . . . . . . . . . . . . . . . . . . . . . 172.2 Installing DB2 on Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182.2.1 Installation requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192.2.2 Installation preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202.2.3 Installing DB2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202.2.4 Installing the DB2 Application Development Client . . . . . . . . . . . . . . 272.2.5 Post installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302.3 Installing DB2 on Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322.3.1 Installation requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332.3.2 Installation preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332.3.3 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342.3.4 Post installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362.4 Advanced installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422.4.1 Using a generated response file . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432.4.2 Using db2 install . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452.4.3 RPM command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Copyright IBM Corp. 2003. All rights reserved.iii

Chapter 3. Navigating DB2 with GUIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473.1 Introduction to GUI tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483.2 Control Center . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483.3 Command Center . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513.3.1 Interactive and Query Results tabs . . . . . . . . . . . . . . . . . . . . . . . . . . 523.3.2 Script tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 553.3.3 Access Plan tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 623.4 Configuration Advisor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 643.5 Design Advisor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 663.6 Task Center . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 683.7 Journal. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 823.7.1 Task History tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 833.7.2 Database History tab. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 843.7.3 Messages tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 893.7.4 Notification Log tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 913.8 Health Center and Memory Visualizer. . . . . . . . . . . . . . . . . . . . . . . . . . . . 913.8.1 Health Center . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 933.8.2 Memory Visualizer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1033.9 Development Center . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1043.10 Configuration Assistant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1063.11 Replication Center . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1073.12 Information Center. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109Chapter 4. DB2 Order Entry Web Application. . . . . . . . . . . . . . . . . . . . . . 1114.1 Application description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1124.1.1 The Apache Web Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1124.1.2 Redbooks ordering - Web shopping cart application . . . . . . . . . . . 1134.2 Application setup - Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1144.2.1 Preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1144.2.2 Setup database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1154.2.3 Setup Apache Web Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1164.2.4 Verify Web Server setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1184.3 Application setup - Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1224.3.1 Setup Apache Web Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1224.3.2 Setup database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1234.3.3 Setup PHP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1254.3.4 Verify Web Server Setup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1274.4 Using the DB2 Web application. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1304.4.1 Order Entry application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1314.5 Understanding the DB2/PHP Web application code . . . . . . . . . . . . . . . . 139Chapter 5. Application development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1475.1 Preparing for application development . . . . . . . . . . . . . . . . . . . . . . . . . . 148ivDB2 UDB Evaluation Guide for Linux and Windows

5.1.1 Creating a development environment . . . . . . . . . . . . . . . . . . . . . . . 1485.1.2 Connecting DB2 applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1495.2 DB2 Development Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1515.2.1 DB2 Development Center . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1515.2.2 DB2 Project Deployment Tool. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1515.2.3 DB2 Command Center . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1525.2.4 SQL Assist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1525.2.5 Visual Explain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1555.2.6 Command-line explain tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1565.2.7 Integration with other tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1565.3 Development features within DB2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1585.3.1 Stored procedures. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1585.3.2 Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1655.3.3 User Defined Functions (UDFs) . . . . . . . . . . . . . . . . . . . . . . . . . . . 1685.3.4 SQL development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1735.4 Application interfaces to DB2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1785.4.1 DB2 APIs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1795.4.2 Embedding SQL statements in your applications . . . . . . . . . . . . . . 1805.4.3 DB2 Call Level Interface (DB2 CLI) . . . . . . . . . . . . . . . . . . . . . . . . 1815.4.4 Java Database Connectivity application (JDBC). . . . . . . . . . . . . . . 1825.4.5 Embedded SQL for Java (SQLj) . . . . . . . . . . . . . . . . . . . . . . . . . . . 1835.4.6 ActiveX Data Objects and Remote Data Objects (Windows only) . 1845.4.7 ADO.NET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1855.4.8 Other interfaces. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1855.5 Programming languages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1855.5.1 Java. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1855.5.2 C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1865.5.3 PHP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1875.5.4 Perl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1875.5.5 COBOL (Windows only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1885.5.6 Visual Basic (Windows only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1885.5.7 Visual C and Visual J (Windows only) . . . . . . . . . . . . . . . . . . 1895.5.8 Object REXX (Windows only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1895.6 DB2 scripting in Linux and Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1905.6.1 Creation and management of scripts within DB2 . . . . . . . . . . . . . . 1905.6.2 Operating system scripting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191Chapter 6. Database management. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1956.1 Basic configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1966.1.1 Database manager configuration . . . . . . . . . . . . . . . . . . . . . . . . . . 1976.1.2 Database configuration file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2006.1.3 Administration server configuration . . . . . . . . . . . . . . . . . . . . . . . . . 2046.1.4 The DB2 profile registry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206Contentsv

6.1.5 Client connectivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2086.2 Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2116.2.1 Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2126.2.2 Authorization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2136.2.3 Authorities and privileges at the database level . . . . . . . . . . . . . . . 2156.3 Database backup and recovery. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2166.3.1 Database backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2176.3.2 Database recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2366.3.3 Task scheduling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2496.3.4 Data movement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2556.4 Monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2646.4.1 DB2 Health Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2656.5 Performance tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2836.5.1 DB2 system design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2846.5.2 Using the DB2 configuration parameters . . . . . . . . . . . . . . . . . . . . 2916.5.3 SQL tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2986.5.4 Application considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306Chapter 7. Additional DB2 features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3097.1 Replication. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3107.1.1 What is replication? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3107.1.2 Why use replication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3107.1.3 What are the components of DB2 replication? . . . . . . . . . . . . . . . . 3117.1.4 What can you do next? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3137.2 Data Warehouse Center . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3147.2.1 What is the Data Warehouse Center? . . . . . . . . . . . . . . . . . . . . . . 3147.2.2 What are the tasks required to create a warehouse? . . . . . . . . . . . 3147.2.3 What is the architecture of the Data Warehouse Center?. . . . . . . . 3157.2.4 What can you do next? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3177.3 DB2 and XML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3187.3.1 What is XML? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3187.3.2 DB2 XML Extender . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3187.3.3 Using SQL/XML to access data . . . . . . . . . . . . . . . . . . . . . . . . . . . 3207.3.4 Using the stored XML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3227.3.5 Further information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3237.4 Accessing WebSphere MQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3247.4.1 What is WebSphere MQ? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3257.4.2 How does DB2 interact with MQ? . . . . . . . . . . . . . . . . . . . . . . . . . . 3267.4.3 Further information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328Chapter 8. High availability, scalability, and parallelism . . . . . . . . . . . . . 3298.1 High availability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3308.1.1 Data redundancy strategies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330viDB2 UDB Evaluation Guide for Linux and Windows

8.1.2 Failover products. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3378.1.3 HA administration features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3428.2 Scalability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3468.3 Parallelism. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352Chapter 9. Selection guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3579.1 DB2 product family . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3589.2 DB2 UDB product offerings for Linux and Windows . . . . . . . . . . . . . . . . 3599.2.1 DB2 Enterprise Server Edition (ESE) . . . . . . . . . . . . . . . . . . . . . . . 3609.2.2 DB2 Workgroup Server Unlimited Edition (WSUE) . . . . . . . . . . . . . 3639.2.3 DB2 Workgroup Server Edition (WSE) . . . . . . . . . . . . . . . . . . . . . . 3649.2.4 DB2 Universal Database Personal Edition (PE) . . . . . . . . . . . . . . . 3659.2.5 DB2 Universal Developer’s Edition . . . . . . . . . . . . . . . . . . . . . . . . . 3659.2.6 DB2 Personal Developer's Edition (PDE) . . . . . . . . . . . . . . . . . . . . 3679.2.7 DB2 Express . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3679.3 Licensing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3689.3.1 Adding a license to DB2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3689.3.2 Upgrade DB2 trial code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3709.4 Data management tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3709.4.1 DB2 Performance Expert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3719.4.2 DB2 Recovery Expert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3719.4.3 DB2 High Performance Unload . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3729.4.4 DB2 Table Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3729.4.5 DB2 Web Query tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3739.5 Other products. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3739.5.1 DB2 Connect. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3739.5.2 DB2 Information Integrator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3759.6 Going further with DB2 UDB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3769.6.1 How to buy DB2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3779.6.2 Where you can find out about education on DB2 . . . . . . . . . . . . . . 3789.6.3 How you can get certified in DB2 . . . . . . . . . . . . . . . . . . . . . . . . . . 3809.6.4 Where you can find additional information about DB2 . . . . . . . . . . 381Appendix A. Additional material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383Locating the Web material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383Using the Web material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383System requirements for downloading the Web material . . . . . . . . . . . . . 384How to use the Web material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384Related publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385IBM Redbooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385Other publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385Online resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386How to get IBM Redbooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387Contentsvii

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389viiiDB2 UDB Evaluation Guide for Linux and Windows

p between DB2 database objects . . . . . . . . . . . . . . . . . . . . . 9DB2 UDB architecture overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11Download DB2 trial code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16DB2 Technical Support Web site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18DB2 Setup wizard on Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21Steps to install DB2 UDB Enterprise Server using DB2 Setup wizard. . 22Creating an instance owner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24Creating a local DB2 tools database . . . . . . . . . . . . . . . . . . . . . . . . . . . 25Configuring the administration contacts . . . . . . . . . . . . . . . . . . . . . . . . . 26Specifying contact information for Health Monitor notification . . . . . . . . 27Steps to install DB2 UDB Administration Client using DB2 Setup wizard29DB2 for Linux First Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31DB2 Setup Launchpad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35Connect to SAMPLE database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37Select from employee table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38DB2 services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39DB2 commands: force application all, db2stop, db2start . . . . . . . . . . . . 40Installation directory structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40Database directory structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41Control Center . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49Control Center - connect to SAMPLE database . . . . . . . . . . . . . . . . . . 50Control Center - connect to SAMPLE database . . . . . . . . . . . . . . . . . . 51Command Center icon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51Command Center. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52Command Center - connect to SAMPLE database . . . . . . . . . . . . . . . . 53Command Center - Interactive tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54Command Center - Query Results tab. . . . . . . . . . . . . . . . . . . . . . . . . . 55Command Center - Script tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56Command Center - enter commands under Script tab . . . . . . . . . . . . . 57Command Center - Script tab save commands option . . . . . . . . . . . . . 58Command Center - Save script to Task Center option under Script tab 59Command Center - open a script under Script tab . . . . . . . . . . . . . . . . 60Command Center - Select a script to open under Script tab . . . . . . . . . 61Command Center - execute a script under Script tab . . . . . . . . . . . . . . 62Command Center - using Script tab to create access plan . . . . . . . . . . 63Command Center - Access Plan tab. . . . . . . . . . . . . . . . . . . . . . . . . . . 64Configuration Advisor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65Opening Configuration Advisor through Control Center . . . . . . . . . . . . 66 Copyright IBM Corp. 2003. All rights reserved.ix

573-584-14-24-34-4xLaunch Design Advisor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67Design Advisor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68Task Center . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69Task Center - scheduling a task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70Task Center - Task category for scheduling a task . . . . . . . . . . . . . . . . 71Task Center - New task category for scheduling a task. . . . . . . . . . . . . 72Task Center - Command Script for scheduling a task . . . . . . . . . . . . . . 73Task Center - Run properties for scheduling a task. . . . . . . . . . . . . . . . 74Task Center - schedule a task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75Task Center - Add a task to schedule . . . . . . . . . . . . . . . . . . . . . . . . . . 76Task Center - specify user id for scheduling a task . . . . . . . . . . . . . . . . 77Task Center - set notification for scheduling a task . . . . . . . . . . . . . . . . 78Task Center - Notification type of scheduling a task . . . . . . . . . . . . . . . 79Task Center - Add task to a schedule . . . . . . . . . . . . . . . . . . . . . . . . . . 80Task Center - show task result for a scheduled task . . . . . . . . . . . . . . . 81Task Center - schedule a task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82Journal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83Journal - Task History tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84Journal - Database History tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85Journal - browse history under Database History tab . . . . . . . . . . . . . . 86Journal - Database selection under Database History tab. . . . . . . . . . . 87Journal - select a instance under Database History tab . . . . . . . . . . . . 88Journal - select a database under Database History tab . . . . . . . . . . . . 89Journal - Messages tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90Journal - Notification Log tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91Health Center . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92Memory Visualizer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93Status Beacon configuration options . . . . . . . . . . . . . . . . . . . . . . . . . . . 94Health Center - server options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96Health Center - Configure Notifications . . . . . . . . . . . . . . . . . . . . . . . . . 97Health Center - Configure Global Health Indicator Default Settings . . . 98Health Center - changing log utilization threshold to 0 percent . . . . . . . 99Health Center - Show Details. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100Warning information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101Memory Visualizer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103Development Center . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105Configuration Assistant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107Replication Center . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108Information Center . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109Modular nature of Apache Web Server . . . . . . . . . . . . . . . . . . . . . . . . 113Redbooks ordering window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119Test PHP function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120Test DB2 connectivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121DB2 UDB Evaluation Guide for Linux and Windows

B2 query output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122Apache installation wizard on Windows . . . . . . . . . . . . . . . . . . . . . . . . 123Wizard to install PHP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126Verify PHP setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128Verify DB2 connectivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129DB2 query output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130Main menu and home page for Apache Server . . . . . . . . . . . . . . . . . .

DB2 UDB Evaluation Guide for Linux and Windows April 2003 International Technical Support Organization SG24-6934-00