CONFIGURATION AND ADMINISTRATION OF DB2 UNIVERSAL DATABASE V5 BY USERS OF VISUALAGE TEAMCONNECTION ENTERPRISE SERVER V3 Document Number TR 29.3076 Angel Rivera TeamConnection Development IBM Software Solutions Research Triangle Park, North Carolina (C) Copyright 1998, IBM Corp. ii DB2 UDB V5 with VA TC V3 ABSTRACT VisualAge TeamConnection Enterprise Server Version 3 uses DB2 Universal Database V5 (DB2 UDB V5) to store objects and parts. There is little information about the operational details for installing, configuring and maintaining DB2 UDB in the VisualAge TeamConnection manuals. The main objective of this technical report is to fill this gap. This technical report provides a collection of hints and tips for the installation, configuration and maintenance of DB2 UDB V5 for the supported platforms: o AIX o HP-UX o Solaris o Windows NT o OS/2 Warp ITIRC KEYWORDS o TeamConnection o VisualAge TeamConnection o DB2 o DB2 Universal Database o DB2 UDB o installation o configuration o administration ABSTRACT iii iv DB2 UDB V5 with VA TC V3 ABOUT THE AUTHOR ANGEL RIVERA Mr. Rivera is a Advisory Software Engineer in the VisualAge TeamConnection and CMVC development group. He joined IBM in 1989 and since then has worked in the development and support of library systems. Mr. Rivera has an M.S. in Electrical Engineering from The Univer- sity of Texas at Austin, and B.S. in Electronic Systems Engi- neering from the Instituto Tecnologico y de Estudios Superiores de Monterrey, Mexico. Mr. Rivera is currently working towards being a Certified DB2 UDB Administrator. ABOUT THE AUTHOR v REVISION, 11-DEC-1998 Added the following sections: o Important information about installing the code and creating user ids o Manual methods to create DB2 instances in UNIX CONTENTS ABSTRACT . . . . . . . . . . . . . . . . . . . . . . . . . III ITIRC KEYWORDS . . . . . . . . . . . . . . . . . . . . . iii ABOUT THE AUTHOR . . . . . . . . . . . . . . . . . . . . . . V Angel Rivera . . . . . . . . . . . . . . . . . . . . . . . v FIGURES . . . . . . . . . . . . . . . . . . . . . . . . . . . X 1.0 INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . 1 1.1 Overview of this chapter . . . . . . . . . . . . . . . 1 1.2 Acknowledgements . . . . . . . . . . . . . . . . . . . 3 1.3 How to get the most up to date version of this technical report . . . . . . . . . . . . . . . . . . . . . 3 1.4 Summary of important points to remember . . . . . . . 4 1.5 Important information about installation for TeamConnection and DB2 . . . . . . . . . . . . . . . . . . 6 1.5.1 Packaging details of DB2 UDB V5 with VisualAge TeamConnection V3 . . . . . . . . . . . . . . . . . . . . 7 1.5.2 Can VA TC work with other members of the DB2 UDB family? . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.5.3 Applying fixes for DB2 Universal Database . . . . . 8 1.5.4 Miscellaneous installation details . . . . . . . . 8 1.6 Assumptions . . . . . . . . . . . . . . . . . . . . . 9 1.7 Relationship between a DB2 instance and a VisualAge TeamConnection family . . . . . . . . . . . . . . . . . . 10 1.7.1 What is the directory structure for DB2 and TeamConnection? . . . . . . . . . . . . . . . . . . . . 12 1.7.2 What are the UNIX DB2 environment variables needed in a family? . . . . . . . . . . . . . . . . . . . . . . 13 1.8 Comments about the performance tuning for DB2 . . . 14 1.9 Where to begin the installation of DB2 UDB . . . . . 14 2.0 INSTALLATION OF DB2 FOR UNIX . . . . . . . . . . . . . 15 2.1 Overview of this chapter . . . . . . . . . . . . . . 15 2.2 Important information about installing the code and creating user ids . . . . . . . . . . . . . . . . . . . . 16 2.3 The TeamConnection installation tool tcinst.ksh will invoke DB2 Installer . . . . . . . . . . . . . . . . . . 16 2.3.1 Other methods to install in UNIX . . . . . . . . 17 2.4 Planning and prerequisites . . . . . . . . . . . . . 17 2.4.1 What is the full path where DB2 is installed (DB2_HOME)? . . . . . . . . . . . . . . . . . . . . . . 17 2.4.2 How much space will be used during the installation of DB2? . . . . . . . . . . . . . . . . . . . . . . . . 18 2.5 Uninstalling ObjectStore . . . . . . . . . . . . . . 18 2.6 Installation Steps . . . . . . . . . . . . . . . . . 19 2.6.1 Identify and record the parameter values . . . . 19 2.6.2 (Optional) Create a file system for the DB2 instance and TC family . . . . . . . . . . . . . . . . . 21 Contents vii 2.6.3 Update kernel configuration parameters (not required for AIX) . . . . . . . . . . . . . . . . . . . 23 2.6.4 Mount the CD-ROM . . . . . . . . . . . . . . . . 28 2.6.5 Install VisualAge TeamConnection . . . . . . . . 31 2.6.6 Install DB2 UDB Workgroup Edition using DB2 Installer . . . . . . . . . . . . . . . . . . . . . . . 31 2.6.7 Post-installation tasks . . . . . . . . . . . . . 58 2.7 What to do next . . . . . . . . . . . . . . . . . . 61 3.0 INSTALLATION OF DB2 FOR WINDOWS . . . . . . . . . . . 63 3.1 Overview of this chapter . . . . . . . . . . . . . . 63 3.2 Planning and prerequisites . . . . . . . . . . . . . 64 3.2.1 What is the full path where DB2 is installed? . . 64 3.2.2 How much space will be used during the installation of DB2? . . . . . . . . . . . . . . . . . . . . . . . . 64 3.3 Uninstalling ObjectStore . . . . . . . . . . . . . . 65 3.4 Installation Steps . . . . . . . . . . . . . . . . . 65 3.4.1 Identify and record parameter values . . . . . . 65 3.4.2 Create a DB2 administration ID in Windows NT . . 66 3.4.3 Install DB2 UDB Personal Edition in Windows NT . 67 3.5 What to do next . . . . . . . . . . . . . . . . . . 70 4.0 INSTALLATION OF DB2 FOR OS/2 . . . . . . . . . . . . . 71 4.1 Overview of this chapter . . . . . . . . . . . . . . 71 4.2 Planning and prerequisites . . . . . . . . . . . . . 72 4.2.1 What is the full path where DB2 is installed? . . 72 4.2.2 How much space will be used during the installation of DB2? . . . . . . . . . . . . . . . . . . . . . . . . 72 4.3 Uninstalling ObjectStore . . . . . . . . . . . . . . 72 4.4 Installation Steps . . . . . . . . . . . . . . . . . 73 4.4.1 Identify and record parameter values . . . . . . 73 4.4.2 Create a DB2 administration ID in OS/2 . . . . . 74 4.4.3 Install DB2 UDB Personal Edition in OS/2 . . . . 76 4.5 What to do next . . . . . . . . . . . . . . . . . . 78 5.0 CREATION OF A FAMILY USING THE NEW DB2 INSTANCE . . . 79 5.1 Overview of this chapter . . . . . . . . . . . . . . 79 5.2 Using tcadmin to create the family database . . . . 81 5.3 Creation of the user ID for the family . . . . . . . 81 5.4 Customization of local files (profile, teamcv3x.ini and Teamcgui) . . . . . . . . . . . . . . . . . . . . . . 82 5.5 Using tcadmin to create the family database . . . . 83 5.6 DB2 configuration parameters when creating a family 86 5.7 What to do next . . . . . . . . . . . . . . . . . . 87 6.0 CONFIGURING THE CONTROL CENTER TO CONTROL REMOTE UNIX DATABASES . . . . . . . . . . . . . . . . . . . . . . . 89 6.1 Overview of this chapter . . . . . . . . . . . . . . 89 6.2 Relationship between Control Center and Administration Server . . . . . . . . . . . . . . . . . . . . . . . . . 89 6.3 Installing the DB2 GUI Tools . . . . . . . . . . . . 91 6.3.1 Installing the Client Application Enabler in Windows NT . . . . . . . . . . . . . . . . . . . . . . . 92 6.3.2 Installing the Client Application Enabler in OS/2 93 viii DB2 UDB V5 with VA TC V3 6.4 Configuring the DB2 Control Center . . . . . . . . . 94 6.4.1 Setup of the UNIX Server . . . . . . . . . . . . 94 6.4.2 Setup of the Intel workstation (adding a remote system) . . . . . . . . . . . . . . . . . . . . . . . . 96 6.5 Adding a database in the Control Center . . . . . . 97 6.6 What to do next . . . . . . . . . . . . . . . . . . 98 7.0 ADMINISTRATION OF DATABASES WITH DB2 TOOLS . . . . . . 99 7.1 Overview of this chapter . . . . . . . . . . . . . . 99 7.2 Control Center . . . . . . . . . . . . . . . . . . . 99 7.3 Additional facilities from the Control Center . . . 100 7.4 Understanding System Administrative (SYSADM) Authority . . . . . . . . . . . . . . . . . . . . . . . . 101 7.5 Where are the files used with the profile registry? 101 7.6 What other system-wide files are needed by DB2? . . 102 7.6.1 System-wide files in UNIX needed by DB2 . . . . . 102 7.7 What to do next . . . . . . . . . . . . . . . . . . 103 8.0 WORKING WITH DB2 INSTANCES . . . . . . . . . . . . . . 105 8.1 Overview of this chapter . . . . . . . . . . . . . . 105 8.2 Creating Instances . . . . . . . . . . . . . . . . . 106 8.2.1 Using the DB2 Installer in UNIX . . . . . . . . . 106 8.2.2 Using db2icrt to manually create DB2 instances 107 8.3 Listing Instances . . . . . . . . . . . . . . . . . 108 8.4 How to enable the proper profile when login into the DB2 instance . . . . . . . . . . . . . . . . . . . . . . 108 8.5 Starting and Stopping a DB2 Server Instance . . . . 109 8.5.1 Starting a DB2 Server Instance . . . . . . . . . 109 8.5.2 Stopping a DB2 Server Instance . . . . . . . . . 109 8.6 Auto-Starting Instances (UNIX) . . . . . . . . . . . 109 8.6.1 Enabling auto-starting . . . . . . . . . . . . . 110 8.6.2 Disabling auto-starting . . . . . . . . . . . . . 110 8.7 Updating Instances . . . . . . . . . . . . . . . . . 110 8.8 Removing Instances . . . . . . . . . . . . . . . . . 111 8.9 What to do next . . . . . . . . . . . . . . . . . . 112 9.0 WORKING WITH THE DB2 ADMINISTRATION SERVER IN UNIX . . 113 9.1 Overview of this chapter . . . . . . . . . . . . . . 113 9.2 Understanding the Administration Server . . . . . . 113 9.3 Creating the Administration Server . . . . . . . . . 113 9.3.1 Using the DB2 Installer in UNIX . . . . . . . . . 114 9.3.2 Using the DB2 line command dasicrt in UNIX . . . 114 9.4 Listing the Administration Server . . . . . . . . . 115 9.5 How to enable the proper profile when login into the Administration Server . . . . . . . . . . . . . . . . . . 115 9.6 Starting the Administration Server . . . . . . . . . 115 9.7 Stopping the Administration Server . . . . . . . . . 116 9.8 Removing the DB2 Administration Server . . . . . . . 116 APPENDIX A. NAMING RESTRICTIONS FOR DB2 USER IDS, GROUP IDS, INSTANCES AND DATABASES . . . . . . . . . . . . . . 117 APPENDIX B. INSTALLING THE DB2 SOFTWARE DEVELOPMENT KIT 119 B.1 Installing the DB2 SDK in UNIX . . . . . . . . . . . 119 Contents ix B.2 Installing the DB2 SDK in Windows NT . . . . . . . . 119 B.3 Installing the DB2 SDK in OS/2 . . . . . . . . . . . 120 APPENDIX C. UNINSTALLATION OF DB2 . . . . . . . . . . . . 121 C.1 Uninstalling DB2 from UNIX . . . . . . . . . . . . . 121 C.1.1 Stop and backup the VisualAge TeamConnection families . . . . . . . . . . . . . . . . . . . . . . . . 121 C.1.2 Stop the Administration Server . . . . . . . . . 121 C.1.3 Stop all DB2 Instances . . . . . . . . . . . . . 122 C.1.4 Remove the Administration Server . . . . . . . . 122 C.1.5 Remove the DB2 Instances . . . . . . . . . . . . 122 C.1.6 Clean up the DB2 registry . . . . . . . . . . . . 123 C.1.7 Remove the DB2 Products . . . . . . . . . . . . . 123 C.2 Uninstalling DB2 from Windows NT . . . . . . . . . . 125 C.3 Uninstalling DB2 from OS/2 . . . . . . . . . . . . . 125 APPENDIX D. BIBLIOGRAPHY AND SERVICE SUPPORT . . . . . . . 127 D.1 DB2 Universal Database . . . . . . . . . . . . . . . 127 D.1.1 DB2 UDB manuals . . . . . . . . . . . . . . . . . 127 D.1.2 Service support for DB2 UDB . . . . . . . . . . . 127 D.2 VisualAge TeamConnection Enterprise Server Version 3 128 D.2.1 VisualAge TeamConnection manuals . . . . . . . . 128 D.2.2 Service support via Internet for VisualAge TeamConnection . . . . . . . . . . . . . . . . . . . . . 128 D.3 Technical reports about VisualAge TeamConnection . . 128 APPENDIX E. COPYRIGHTS, TRADEMARKS AND SERVICE MARKS . . . 131 FIGURES 1. Relationship between all DB2 and TeamConnection players 10 2. Parameters for the DB2 Instance . . . . . . . . . . . 19 3. Parameters for the DB2 Fenced User ID . . . . . . . . 20 4. Parameters for the DB2 Administration Server (DAS) . . 20 5. HP-UX Kernel Configuration Parameters (Recommended Values) . . . . . . . . . . . . . . . . . . . . . . . 23 6. Solaris Kernel Configuration Parameters (Recommended Values) . . . . . . . . . . . . . . . . . . . . . . . 26 7. DB2 Installer screen . . . . . . . . . . . . . . . . . 33 8. Install DB2 V5 screen . . . . . . . . . . . . . . . . 34 9. DB2 Universal Database Workgroup Edition screen . . . 35 10. DB2 Product Messages screen . . . . . . . . . . . . . 36 11. DB2 Product Library screen . . . . . . . . . . . . . . 37 12. Summary Report screen for the installation of the code 39 13. Warning screen before unpacking the installation images 40 14. Installation progress screen . . . . . . . . . . . . . 40 15. Notice screen of completion of the installation . . . 41 x DB2 UDB V5 with VA TC V3 16. Status Report screen . . . . . . . . . . . . . . . . . 41 17. View Log File screen . . . . . . . . . . . . . . . . . 42 18. DB2 Installer screen - Create instances . . . . . . . 45 19. Create DB2 Services screen, snapshot 1 . . . . . . . . 46 20. DB2 Instance screen . . . . . . . . . . . . . . . . . 47 21. DB2 Instance Protocol screen . . . . . . . . . . . . . 48 22. Customization of TCP/IP Protocol screen . . . . . . . 48 23. User-Defined Functions screen . . . . . . . . . . . . 49 24. Create DB2 Services screen, snapshot 2. . . . . . . . 50 25. Administration Server screen . . . . . . . . . . . . . 51 26. Notice screen about DB2SYSTEM . . . . . . . . . . . . 51 27. Summary Report screen for the configuration tasks . . 52 28. Warning screen before configuring the DB2 instance . . 53 29. Configuration progress screen . . . . . . . . . . . . 53 30. Notice screen of completion of the configuration of instances. . . . . . . . . . . . . . . . . . . . . . . 54 31. Parameters for the DB2 Instance . . . . . . . . . . . 66 32. Parameters for the DB2 Administration Server (DAS) . . 66 33. Parameters for the DB2 Instance . . . . . . . . . . . 74 34. Parameters for the DB2 Administration Server (DAS) . . 74 35. Parameters for the sample VisualAge TeamConnection family . . . . . . . . . . . . . . . . . . . . . . . . 80 36. Relationship between Control Center and Administration Server . . . . . . . . . . . . . . . . . . . . . . . . 90 Figures xi xii DB2 UDB V5 with VA TC V3 1.0 INTRODUCTION 1.1 OVERVIEW OF THIS CHAPTER VisualAge TeamConnection Enterprise Server Version 3 uses DB2 Universal Database V5 (DB2 UDB V5) to store objects and parts. There is little information about the operational details for configuring and maintaining DB2 UDB in the VisualAge TeamConnection manuals. The main objective of this technical report is to fill this gap. This technical report provides a collection of hints and tips for the installation, configuration and maintenance of DB2 UDB V5 for the supported platforms: o AIX o HP-UX o Solaris o Windows NT o OS/2 Warp This TR is not a tutorial for DB2, nor a substitute to the appro- priate manuals and training materials. If you need training on the administration aspects of DB2, you should take the DB2 UDB Administration class. See the DB2 home page for more details on this type of education: http://www.software.ibm.com/data/db2/ The structure of this TR is as follows: o Installation of DB2 for UNIX and creation of DB2 instances. See 2.0, "Installation of DB2 for UNIX" on page 15. At the time this TR was written, there was no "silent" installation option for the DB2 Installer utility in UNIX; that is the reason that when installing VisualAge TeamConnection in UNIX, you have to interact with DB2 Installer. Thus, a suggested installation sequence is pre- sented with the snapshot of all the screens displayed to the user, with the suggested values to be entered and default values to be accepted. o Installation of DB2 for Windows NT and creation of DB2 instances. See 3.0, "Installation of DB2 for Windows" on page 63. When installing the VisualAge TeamConnection family server, the DB2 installation utility for Windows NT is invoked in Introduction 1 silent mode. However, just in case you need to interact directly with this DB2 installation utility, the installation sequence is presented in this document. o Installation of DB2 for OS/2 and creation of DB2 instances. See 4.0, "Installation of DB2 for OS/2" on page 71. When installing the VisualAge TeamConnection family server, the DB2 installation utility for OS/2 is invoked in silent mode. However, just in case you need to interact directly with this DB2 installation utility, the installation sequence is presented in this document. o Creating a VisualAge TeamConnection Family using the newly created DB2 instance. See 5.0, "Creation of a family using the new DB2 Instance" on page 79 o Configuring the DB2 Control Center to control remote UNIX databases. See 6.0, "Configuring the Control Center to control remote UNIX databases" on page 89 It is highly recommended to use the DB2 Control Center, which is available only for Intel workstations, to control the DB2 databases in UNIX. o Overview of the administration of databases with DB2 tools. See 7.0, "Administration of databases with DB2 tools" on page 99. o Working with DB2 instances: See 8.0, "Working with DB2 Instances" on page 105. o Using the DB2 Administrator Server in UNIX: how to create, start, stop, remove, etc. See 9.0, "Working with the DB2 Administration Server in UNIX" on page 113. The administration of a VisualAge TeamConnection family is not covered in this TR. We plan to have a document that will be dedicated to this topic; please visit our home page men- tioned in the section 1.3, "How to get the most up to date version of this technical report" on page 3. o Appendix to document the naming restrictions for DB2 user IDs, group IDs, instances and databases (which in turn cause restrictions on the names for the VisualAge TeamConnection family names). See Appendix A, "Naming restrictions for DB2 user IDs, group IDs, instances and databases" on page 117. o Appendix on how to install the DB2 Software Development Kit. This is targeted only for the members of the VisualAge TeamConnection development team to setup their build machines. See Appendix B, "Installing the DB2 Software Development Kit" on page 119. 2 DB2 UDB V5 with VA TC V3 o Appendix on how to uninstall DB2. See Appendix C, "Uninstal- lation of DB2" on page 121. o Appendix on the bibliography for the products, and how to get customer support. See Appendix D, "Bibliography and Service Support" on page 127. 1.2 ACKNOWLEDGEMENTS I would like to thank all the people who gave me feedback when I was preparing this technical report, especially: 1. Lee Perlov, who helps customers to install, configure and use our product. 2. Clifford Meyers, who prepares the installation for UNIX. 3. David Gauck, who prepares the installation for Intel. 4. Tim Orlowski, who develops code for TeamConnection. 5. Norma Christopher, who tests the code in Windows NT. 6. Evan Thompson, who does performance testing. 7. Joe Breal, who thoroughly reviewed this document. I want to thank Dodde Stark for editing this technical report. 1.3 HOW TO GET THE MOST UP TO DATE VERSION OF THIS TECHNICAL REPORT The most up to date version of this technical report can be obtained from the IBM VisualAge TeamConnection Enterprise Server: o Library home page by selecting the item Library at URL: HTTP://WWW.SOFTWARE.IBM.COM/AD/TEAMCON o FTP site by accessing the URL: FTP://FTP.SOFTWARE.IBM.COM/PS/PRODUCTS/TEAMCONNECTION/PAPERS See the file README.index.txt for details. In those URLs you can also find other technical reports related to VisualAge TeamConnection. By the way, this technical report is located in the CD-ROMs from VisualAge TeamConnection: UNIX /cdrom/db2pubs/en_US/trtc3db2.X INTEL D:\db2pubs\enu/trtc3db2.X Introduction 3 Where X is PDF, HTM or TXT. 1.4 SUMMARY OF IMPORTANT POINTS TO REMEMBER Based on the frequent questions and problems that I have seen when users are using DB2 for the first time, I am providing the following summary of important points that new users should remember when using DB2: o If NIS is being used in the target host, then you can only use the DB2 installer utility to install the code, but you cannot use this utility to create all the user IDs; if you use it, then this utility will fail when trying to update the services file and to create the user IDs. The DB2 error message DBI1766W will be displayed. Thus, you will have to perform the manual creation of the DB2 instance and other user IDs, and the manual update to the services file. For more details see 2.3.1, "Other methods to install in UNIX" on page 17. o If you have already DB2 V1 or V2 installed in your system, then you have to be very careful when installing DB2 UDB V5, because the libraries for DB2 may not be linked fine. If DB2 V1 or V2 is not really used in your system for a pro- duction application, then it is suggested to uninstall it prior to installing DB2 UDB V5. o Let the DB2 installer utility create all user IDs and group IDs, and make all the necessary updates to the system files (such as /etc/services). If you create a db2inst1 user ID, for example, then if you specify it when using DB2 installer, the creation of the DB2 instance will fail. In case you cannot let the DB2 installer create the user IDs, then you will need to bypass DB2 installer and manually create the instance. For more details see 2.3.1, "Other methods to install in UNIX" on page 17. o It is important to follow all the instructions in the readme file for applying the fixpak and hotfix for DB2 UDB, spe- cially the "after installation" instructions to update the DB2 instances, rebinding the bind files to the DB2 instances and rebinding to the existing DB2 databases. If you do not follow these instructions, then you very likely will encounter SQL1072C error messages and the db2start command will not complete. 4 DB2 UDB V5 with VA TC V3 o After the DB2 instances are created, all the instance-related activities (such as db2start or db2stop) must be done by first logging in as the DB2 instance owner. Do not use the user ID "root" to start or stop the DB2 instances. If you do so, the root ID will not have the proper environment variables and the instance will not be started. o You need to modify the .profile for the DB2 instance to allow the automatic setup of the environment variables upon login. 1. Edit the .profile. 2. Add the following line after the line "export PATH": . ./sqllib/db2profile 3. Save and exit the .profile. 4. Logout and login again to have a clean environment. For more details, see 2.6.7.4, "Update the profile for the DB2 instances" on page 59. o (UNIX) To simplify the family administration, use one user ID and its file system ONLY for one TeamConnection family. That is, if the family is named "tcfamily", then it should be located in a file system that is related to the family name, such as "/home/tcfamily". o (UNIX) Ensure that you can display correctly a X Windows application. You can try the following harmless application that will display a clock in a window (as a background process): xclock & +--- IF YOU DO NOT SEE THE XCLOCK WINDOW, THEN STOP! -------+ | | | If you do not see the xclock window, then STOP! This | | means that your DISPLAY variable is not setup correctly, | | and that you will NOT see the window from the tcadmin | | tool. | | | | You will need to fix the DISPLAY variable or issue the | | xhosts command to properly display an X Windows applica- | | tion. If you are still having problems, consult your | | Unix manuals or local help desk. | | | +-----------------------------------------------------------+ o (UNIX) When using tcadmin to create a family (such as "tcfamily"), in order to obtain the recommended home direc- tory (such as "/home/tcfamily"), you need to specify the fol- lowing in the Create Family dialog: Introduction 5 Name: tcfamily Path: /home These 2 fields are concatenated to form the complete path name; in this case is "/home" + "/" + "tcfamily", which produces "/home/tcfamily". You will get the cumbersome path "/home/tcfamily/tcfamily" if you specify: Name: tcfamily Path: /home/tcfamily o (UNIX) In order for the DB2 instance to allow the creation of the DB2 database by the VisualAge TeamConnection family, the primary group ID of the instance (such as the default db2iadm1) MUST be either the primary group ID or part of the group set for the family user ID. If the family user ID does not have the proper group ID then when trying to create the family by using tcadmin (or the sample utility "dbcreate"), you will get a DB2 error message saying that you do not have enough authority to create a database. 1.5 IMPORTANT INFORMATION ABOUT INSTALLATION FOR TEAMCONNECTION AND DB2 Unfortunately, the hardcopy documentation for VisualAge TeamConnection needs to be sent to the printer months before the general availability of the product. Thus, after we sent the material to the printer, sometimes we discover that we need to add/modify information into the manuals, and we provide the fol- lowing mechanisms: o For the most current installation instructions for VisualAge TeamConnection Enterprise Server Version 3, refer to the softcopy Installation Guide, install.pdf, install.htm (master file), or install.txt. All Installation Guide formats are located in the following directories in the CD-ROMs for VisualAge TeamConnection: softpubs/ (for UNIX) or nls\doc\ (for Intel) o Getting auxiliary software for VisualAge TeamConnection. To download the latest fixes for DB2 Universal Database and the auxiliary code for TeamConnection: - Acrobat Reader for PDF files. 6 DB2 UDB V5 with VA TC V3 - Java for tcadmin and tcmerge. - Netscape Navigator for displaying the online help. ... select the "download" item from our home page: http://www.software.ibm.com/ad/teamcon 1.5.1 Packaging details of DB2 UDB V5 with VisualAge _____________________________________________________ TeamConnection V3 _________________ The installation CD-ROMs for VisualAge TeamConnection Enterprise Server Version 3, include the installation images for DB2 Uni- versal Database Version 5. That is, the customer who buys VisualAge TeamConnection gets a copy of the necessary runtime components for DB2 UDB. It is important to clarify that this version of DB2 UDB which is packaged with the CD-ROMs for VisualAge TeamConnection is the same version that customers would get if they buy DB2 UDB directly. That is, the DB2 development group did not compile the DB2 code that is bundled with VisualAge TeamConnection with special options; only the packaging is slightly different. If you already have bought DB2 UDB V5 independently of VisualAge TeamConnection, and if you already have installed it in your system, there is no reason for uninstalling your version of DB2 and installing the version of DB2 provided by VisualAge TeamConnection. You can continue with 5.0, "Creation of a family using the new DB2 Instance" on page 79. You should not use the version of DB2 UDB provided with VisualAge TeamConnection for other database applications. 1.5.2 Can VA TC work with other members of the DB2 UDB family? _______________________________________________________________ The DB2 Universal Database (DB2 UDB) Version 5 is a family of products that have the same database engine and have unique fea- tures that differentiate the members of the family and justify the extra price. For VA TC we use the basic functionality of DB2 UDB and we do not exploit other functions such as the DB2 Connect (to distribute the databases across other nodes). In theory, VisualAge TeamConnection should work with any member of the DB2 UDB family. For practical reasons we ship the minimum version of DB2 for a particular platform: Personal edition for Intel and Workgroup for UNIX. Actually we have informally tested VA TC with Workgroup in Intel and Enterprise edition in Unix. Introduction 7 1.5.3 Applying fixes for DB2 Universal Database ________________________________________________ After installing VisualAge TeamConnection and DB2 UDB, you must apply the latest DB2 UDB fixpak and interim fix (hot fix) for your operating environment. For detailed instructions on how to apply the fixes, see the appropriate readme file, based on your operating environment, as follows: UNIX: //db2/fixes/readme.db2 Windows NT: \dbfilesw\fixes\readmew.db2 OS/2: \dbfileso\fixes\readmeo.db2 Where is the CD-ROM drive/mount point, and is aix4, hpux10, or solaris. These files are ASCII format, and can be browsed using any common text browser native to your operating system. +--- IT IS IMPORTANT TO FOLLOW ALL THE INSTRUCTIONS! -----------+ | | | It is important to follow all the instructions in the readme | | file, specially the "after installation" instructions to | | update the DB2 instances, rebinding the bind files to the DB2 | | instances and rebinding to the existing DB2 databases. If | | you do not follow these instructions, then you very likely | | will encounter SQL1072C error messages and the db2start | | command will not complete. | | | +---------------------------------------------------------------+ 1.5.4 Miscellaneous installation details _________________________________________ o The VisualAge TeamConnection installation utility will check for DB2 Universal Database Version 5 and attempt to install DB2 if it is not present. For Intel environments, if you issue one of the following commands from the root directory of the VisualAge TeamConnection CD-ROM, the installation utility will bypass all DB2 checking and installation. install -nodb {for OS/2} or setup -nodb {for Windows} 8 DB2 UDB V5 with VA TC V3 1.6 ASSUMPTIONS o DB2 (in any version) has not been installed previously in your target system. This document does not cover migration from previous versions nor co-existence of DB2 UDB V5 with other versions of DB2. o It is assumed that this is the first installation of DB2 UDB V5 in your system. In case you have tried before but did not achieve a complete and successful installation, then you need to cleanup your system; otherwise, you may encounter problems when running the procedures specified in this document. See the DB2 Quick Beginnings manual for details. o In UNIX, the DB2 Installer utility will be used. It is highly recommended that you install and configure DB2 Universal Database products in UNIX using DB2 Installer because it takes care of creating the necessary group IDs, user IDs, DB2 instances. Furthermore, this utility updates the /etc/services file by adding the new port numbers. If you are familiar with DB2 V1 or V2, you might not know that the DB2 Installer is a great utility, and you might be tempted to extrapolate from your knowledge of DB2 V1 or V2 and try to create the DB2 instance by hand. If you decide to do it manually, then you need to be aware of the required Fenced User ID and of the highly recommended DB2 Adminis- tration Server. o To facilitate the maintenance of a DB2 database in UNIX, the DB2 Control Center utility will be used in an Intel work- station (because there is no such utility in UNIX yet). In fact, the examples in this TR will use the Control Center from Windows NT. The DB2 Control Center greatly facilitates the maintenance activities of local and remote databases, and this is the mechanism that will be described in this TR. o The only communication protocol for DB2 discussed here will be TCP/IP because this is the only one used by VisualAge TeamConnection. o The default values from the DB2 Installer that are used in a pristine system will be used in this document. For example, the first DB2 instance to be created will be called "db2inst1". o Only the English prompts and messages will be shown. Introduction 9 o For illustration purposes, the VisualAge TeamConnection family name and DB2 database name of "tcfamily" will be used, which is located in the host "oem-ppc3". 1.7 RELATIONSHIP BETWEEN A DB2 INSTANCE AND A VISUALAGE TEAMCONNECTION FAMILY The relationship between a DB2 instance, which is a logical data- base server environment, and a VisualAge TeamConnection family is explained in this section. To clarify the subject, the UNIX system will be used because there is a clear distinction between all these players (using examples from AIX). The objects used by a VisualAge TeamConnection Version 3 family (such as the family "tcfamily" which resides in /home/tcfamily) are stored inside a DB2 database, which is controlled by one DB2 instance (such as the DB2 instance "db2inst1" which resides in /home/db2inst1). The VisualAge TeamConnection family server daemon runs the code from TC_HOME (such as /usr/teamc), which in turn uses services from the DB2 instance which runs the DB2 code from /home/db2inst1 and from where the actual DB2 code is installed (such as /usr/lpp/db2_05_00). For a summary of the directory structure, see 1.7.1, "What is the directory structure for DB2 and TeamConnection?" on page 12. The Figure 1 shows the relationship between all these players. Also, see 1.7.2, "What are the UNIX DB2 environment variables needed in a family?" on page 13 for the syntax on how to include the environment variables into the UNIX profile for the family. +---------------------------+ +----------------------------------+ | VA TC Family | | DB2 Instance | | DB2DBDFT=tcfamily | | DB2INSTANCE= db2inst1 | | TC_DBPATH=/home/tcfamily | | DB2INSTANCE_HOME=/home/db2inst1 | | DB2_DBPATH=database ------|----|--> /home/db2inst1/db2inst1 | | * teamcd server daemon | | | | | | | | +-|-------------------------+ +--- --------|---------------------+ | | V V +---------------------------+ +----------------------------------+ | VA TC Code | | DB2 UDB Code | | TC_HOME=/usr/teamc | | DB2_HOME=/usr/lpp/db2_05_00 | +---------------------------+ +----------------------------------+ Figure 1. Relationship between all DB2 and TeamConnection players 10 DB2 UDB V5 with VA TC V3 Based on these relationships, please keep in mind the following recommendations when you create DB2 instances and VisualAge TeamConnection families: o Each VisualAge TeamConnection family that are used to main- tain production code and documents (that is, not for just tutorial purposes), should be isolated in one DB2 instance and that DB2 instance should not be shared by any other pro- duction family. By having one production family per DB2 instance, you will insure that if this DB2 instance stops working, it will not affect other DB2 instances (and consequently, it will not affect other families). o In UNIX, even though it is recommended to have one DB2 instance per family, it is highly recommended to use dif- ferent names for the family itself, and the DB2 user IDs (instance, fenced user ID, administration server). For example: - Use "db2inst1" for the DB2 instance and "tcfamily" for the TeamConnection family. Use "db2as" for the DB2 Administration Server and use "db2fenc1" for the DB2 Fenced User ID. - Do not use the same user ID (such as "tcfamily" or "db2inst1") for both the DB2 instance and the TeamConnection family, because there will be actions that you want to do only for the DB2 instance or the family but not both. By having different names you will avoid confusion. o In a UNIX machine, for medium/large production families it is recommended to isolate each DB2 instance and its associated VisualAge TeamConnection database in its own file system. For more details, see 2.6.2, "(Optional) Create a file system for the DB2 instance and TC family" on page 21. Better yet, try to setup this file system into its own hard disk. In that way, the hard disk will be totally dedicated to the DB2 instance and the TeamConnection family. This should have better performance than a setup in which a single hard disk has to serve other applications besides the desired pair of DB2 instance and TeamConnection family. o In a UNIX machine, you can have several DB2 instances, each one will have a different user ID and group ID. This means that you can have multiple TeamConnection families running on that server, one family per DB2 instance. o Although in principle it is possible to have multiple DB2 instances in an Intel machine (with a very bad performance), Introduction 11 in reality you should count on having ONLY one DB2 instance and thus, only one TeamConnection family per each Intel machine. 1.7.1 What is the directory structure for DB2 and __________________________________________________ TeamConnection? _______________ This section provides a summary of the default directory struc- ture used by DB2 UDB and VisualAge TeamConnection: o DB2 UDB - code The UNIX location cannot be changed! AIX /usr/lpp/db2_05_00 HP-UX /opt/IBMdb2/V5.0 SOLARIS /opt/IBMdb2/V5.0 WINDOWS NT c:\sqllib OS/2 WARP c:\sqllib o DB2 instance (such as db2inst1) The UNIX location cannot be changed if you use the DB2 installer! AIX /home/db2inst1 HP-UX /home/db2inst1 SOLARIS /export/home/db2inst1 WINDOWS NT c:\sqllib OS/2 WARP c:\sqllib o DB2 Administration Server (such as db2as) The UNIX location cannot be changed if you use the DB2 installer! AIX /home/db2as HP-UX /home/db2as SOLARIS /export/home/db2as WINDOWS NT c:\sqllib OS/2 WARP c:\sqllib o VisualAge TeamConnection code The AIX location cannot be changed if you use smit installp images! AIX /usr/teamc HP-UX /opt/teamc SOLARIS /opt/teamc WINDOWS NT AND 95 c:\teamc OS/2 WARP c:\teamc 12 DB2 UDB V5 with VA TC V3 o VisualAge TeamConnection family (such as tcfamily) AIX /home/tcfamily HP-UX /home/tcfamily SOLARIS /export/home/tcfamily WINDOWS NT c:\tcfamily OS/2 WARP c:\tcfamily By default, the actual database is stored under the DB2 Instance home. 1.7.2 What are the UNIX DB2 environment variables needed in a ______________________________________________________________ family? _______ The following environment variables need to be present in the .profile of a family (showing real examples): ## TeamConnection variable that specifies the location of ## family directory export TC_DBPATH=$HOME ## DB2 variables export DB2_HOME=/usr/lpp/db2_05_00 # directory of DB2 code export DB2INSTANCE=db2inst1 # DB2 instance name export DB2INSTANCE_HOME=/home/db2inst1 # DB2 Instance home directory export DB2DBDFT=tcfamily # Default DB2 family ## By default, the actual database will be created under the ## DB2 instance directory; however, you could specify another location ## such as under the TeamConnection family directory: # export DB2_DBPATH=/home/tcfamily/ ## Start the db2profile . ${DB2INSTANCE_HOME}/sqllib/db2profile export PATH=$PATH:$DB2INSTANCE_HOME/sqllib/bin export PATH=$PATH:$DB2INSTANCE_HOME/sqllib/adm ## For HP_UX: ## Location of TeamConnection libraries # export SHLIB_PATH=${SHLIB_PATH}:${TC_HOME}/lib # export SHLIB_PATH=${SHLIB_PATH}:${DB2_HOME}/lib ## For Solaris: ## Location of TeamConnection libraries # export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${TC_HOME}/lib # export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${DB2_HOME}/lib Introduction 13 1.8 COMMENTS ABOUT THE PERFORMANCE TUNING FOR DB2 Each VisualAge TeamConnection family is different (has different usage pattern, different operating environment, etc.), and thus, the performance tuning is unique to each family. DB2 is a major component on this performance tuning. We are working on creating a set of initial values that the VisualAge TeamConnection administration tools will use when cre- ating a database. We hope that these initial values will show a good overall performance for most customers for the initial usage period, during which the customers can establish a baseline for future performance tuning. Furthermore, one of the main philosophies in performance tuning is to change only one variable at a time and compare the behavior of the system with the appropriate baseline to determine if this change favorably affected the performance. However, the DB2 Per- formance SmartGuide or Wizard, available from the DB2 Control Center will change many variables at once, and you will not be able to do an educated comparison with your baseline. Thus, it is not advisable that you run this DB2 Performance SmartGuide. DB2 has many parameters that affect performance (for better or for worse) and it is highly recommended that a person who is seriously considering the tasks of performance tuning should take a DB2 UDB V5 Performance class. See the DB2 home page for more details on this type of education: http://www.software.ibm.com/data/db2/ Finally, this topic is very extensive and is beyond the scope for this technical report. We are working on preparing a technical report to address performance issues with VisualAge TeamConnection version 3. Please visit the IBM VisualAge TeamConnection Enterprise Server Library home page by selecting the item Library at URL: http://www.software.ibm.com/ad/teamcon 1.9 WHERE TO BEGIN THE INSTALLATION OF DB2 UDB To begin the installation of DB2 UDB in your system, go to the appropriate chapter: o For UNIX, go to 2.0, "Installation of DB2 for UNIX" on page 15. o For Windows, go to 3.0, "Installation of DB2 for Windows" on page 63. o For OS/2, go to 4.0, "Installation of DB2 for OS/2" on page 71. 14 DB2 UDB V5 with VA TC V3 2.0 INSTALLATION OF DB2 FOR UNIX 2.1 OVERVIEW OF THIS CHAPTER After completing the installation of DB2 according to these instructions and by using the DB2 Installer, you will have done the following: o Installed DB2 UDB Workgroup Edition, including the appro- priate NLS related files and online documentation. o Created a normal DB2 Instance; this is where the database for TeamConnection will be created later on by the TeamConnection Administration tool. This DB2 instance has its separate user ID and primary group ID. A separate user ID should be used for each DB2 Instance. It is recommended that a new group ID be created which should be used as a primary group ID for the DB2 instance user ID. o Created a DB2 fenced user ID with its separate user name and group name. Although this is not used by VisualAge TeamConnection, it is needed by the DB2 tools. It does not hurt to create it and it does not consume significant resources. Just accept the defaults for this user ID; do not try to delete or change this user ID. Because DB2 allows the creation of user-defined functions (UDFs), DB2 requires that these functions should be placed in a "fenced" area, and not in the DB2 instance. Thus, a dedi- cated user name and group name is needed to keep the fenced user-defined functions (UDFs) and Stored Procedures. For security reasons, it is recommended that you do not use the DB2 instance user name and group name for the fenced UDFs and Stored Procedures. o Created a DB2 Administrator Server (DAS) instance which is used to allow the remote administration by means of the DB2 Control Center running on an Intel workstation. This DB2 Administrator Server instance must have its separate user name and group name. Installation of DB2 for UNIX 15 For security reasons, it is recommended that you do not use the DB2 Instance user name and group name for the Adminis- tration Server. o Created a DB2 Sample database. You can use this database as your sand box to practice some of the administration tasks, without affecting the database used by TeamConnection. 2.2 IMPORTANT INFORMATION ABOUT INSTALLING THE CODE AND CREATING USER IDS After you install the VisualAge TeamConnection Enterprise Server code please adhere to the following guidelines: o Do use different directories for the DB2 code, for the VisualAge TeamConnection code, for the DB2 instance and the VisualAge TeamConnection family. o Do not alter the contents of $TC_HOME unless you are going to uninstall the product. o Do not use as the home directory for any families or users the following directories: - $TC_HOME, such as /usr/teamc - $DB2_HOME, such as /usr/lpp/db2v5 - The home of the DB2 instances. It is very important that the directories and the user ids must be kept separate. This will avoid potential loss during maintenance activities. o Do not use the same userid for your DB2 database instance and your TeamConnection family. It is recommended to keep the separation between them, in that way you can stop the family without stopping the DB2 instance, for example 2.3 THE TEAMCONNECTION INSTALLATION TOOL TCINST.KSH WILL INVOKE DB2 INSTALLER The VisualAge TeamConnection installation utility, tcinst.ksh, upon the installation of the TeamConnection server, will ask you if you want to invoke the DB2 Installer utility to install DB2 in your system. It is highly recommended that you use the DB2 Installer to install DB2 in your system. 16 DB2 UDB V5 with VA TC V3 2.3.1 Other methods to install in UNIX _______________________________________ In case you encounter problems with DB2 Installer, you may need to look at the details on other methods to install DB2 in UNIX; see the following chapters in the Quick Beginnings for UNIX manual: o Chapter 21, "Other Methods to Install DB2 for AIX". o Chapter 22, "Other Methods to Install DB2 for HP-UX". o Chapter 23, "Other Methods to Install DB2 for Solaris". These methods are manually intensive and require a lot of work and have many steps, such as unpacking the installation images, creating the user IDs and group IDs, setting up the configuration files, etc. The HTML version of this DB2 manual is provided in the VisualAge TeamConnection CD-ROMs in the location: /cdrom/db2pubs/en_US/db2ix.htm Where "en_US" is an example of a supported language. To proceed with the rest of the installation and configuration tasks, go to 2.7, "What to do next" on page 61. 2.4 PLANNING AND PREREQUISITES For more details on the planning for installation of DB2 UDB V5 in UNIX platforms (AIX, HP-UX and Solaris), such as hardware and software requirements, consult Chapter 4 "Planning for Installa- tion" of the Quick Beginnings manual. The hardware and software requirements for VisualAge TeamConnection already take into account the corresponding requirements for DB2 UDB, and they are described in the VisualAge TeamConnection Administrator's Guide. 2.4.1 What is the full path where DB2 is installed (DB2_HOME)? _______________________________________________________________ The full path (DB2_HOME) where DB2 will be installed is shown below. Thus, you need to ensure that you have enough available space in the appropriate file systems. AIX /usr/lpp/db2_05_00 HP-UX /opt/IBMdb2/V5.0 SOLARIS /opt/IBMdb2/V5.0 Installation of DB2 for UNIX 17 2.4.2 How much space will be used during the installation of _____________________________________________________________ DB2? ____ After performing the installation described in this document, the following disk space was actually used ONLY for the DB2 code and the DB2 instance (this does not take into account the DB2 data- bases). o 91 MB in /usr (AIX) or in /opt (HP-UX and Solaris), where around 30 MB is for documentation. o 39 MB in /home (AIX and HP-UX) or /export/home (Solaris) for the actual code and all the 3 user IDs (the DB2 instance, the DB2 Administrator Server instance and the DB2 Fenced user ID). This includes the SAMPLE database. NOTE: In order to create the DB2 database of a VisualAge TeamConnection family, it is necessary to have at least 100 MB of free disk space in the file system where the DB2 instance resides. 2.5 UNINSTALLING OBJECTSTORE In case you have installed ObjectStore, the database used by VisualAge TeamConnection Version 2, you could uninstall this database management system in order to recover disk space. You can uninstall ObjectStore after you have migrated your TeamConnection family from Version 2 to Version 3. To uninstall ObjectStore in UNIX, do the following: 1. Login as root. 2. Ensure that the TeamConnection servers are not running. If they are running, then shut them down. 3. Ensure that the ObjectStore servers are not running. If they are running, then shut them down. 4. Remove the following directory: AIX /usr/lpp/ODI HP-UX /usr/local/ODI 18 DB2 UDB V5 with VA TC V3 2.6 INSTALLATION STEPS To install the DB2 products on UNIX systems, perform the fol- lowing steps: 1. Identify and record the parameter values. See 2.6.1, "Iden- tify and record the parameter values" on page 19. 2. If desired, you can create a file system dedicated to the DB2 instance and the VisualAge TeamConnection family. See 2.6.2, "(Optional) Create a file system for the DB2 instance and TC family" on page 21. 3. Update kernel configuration parameters. (This step is not required on AIX). See 2.6.3, "Update kernel configuration parameters (not required for AIX)" on page 23. 4. Mount the CD-ROM. See 2.6.4, "Mount the CD-ROM" on page 28. 5. Install VisualAge TeamConnection. See 2.6.5, "Install VisualAge TeamConnection" on page 31. 6. Install DB2 UDB Workgroup Edition. See 2.6.6, "Install DB2 UDB Workgroup Edition using DB2 Installer" on page 31. 7. Perform the post-installation tasks. See 2.6.7, "Post- installation tasks" on page 58. 8. Verify that the DB2 configuration is correct by creating the DB2 Sample database. See 2.6.7.5, "Verify the DB2 configura- tion by creating the DB2 Sample database" on page 60. 2.6.1 Identify and record the parameter values _______________________________________________ After completing these installation instructions, the values shown below will be the values of all the appropriate parameters used during this installation procedure for DB2: NOTE: It is recommended that you change the passwords of the following DB2 user IDs. The parameters for the normal DB2 instance are: +---------------------------------------------------------------+ | Figure 2 (Page 1 of 2). Parameters for the DB2 Instance | +-------------------------------+-------------------------------+ | PARAMETER | DESCRIPTION | +-------------------------------+-------------------------------+ | Full path name | /home/db2inst1 | +-------------------------------+-------------------------------+ | User Name | db2inst1 | +-------------------------------+-------------------------------+ | UID | System-generated UID | +-------------------------------+-------------------------------+ | Group Name | db2iadm1 | +-------------------------------+-------------------------------+ | GID | System-generated GID | +-------------------------------+-------------------------------+ Installation of DB2 for UNIX 19 +---------------------------------------------------------------+ | Figure 2 (Page 2 of 2). Parameters for the DB2 Instance | +-------------------------------+-------------------------------+ | PARAMETER | DESCRIPTION | +-------------------------------+-------------------------------+ | Password | ibmdb2 | +-------------------------------+-------------------------------+ | TCP/IP Connection Service | db2cdb2inst1 | | Name | | +-------------------------------+-------------------------------+ | TCP/IP Connection Port Number | 50000 | | | | +-------------------------------+-------------------------------+ | TCP/IP Interrupt Service Name | db2idb2inst1 | | | | +-------------------------------+-------------------------------+ | TCP/IP Interrupt Port Number | 50001 | | | | +-------------------------------+-------------------------------+ The parameters for the normal DB2 Fenced User ID are: +---------------------------------------------------------------+ | Figure 3. Parameters for the DB2 Fenced User ID | +-------------------------------+-------------------------------+ | PARAMETER | DESCRIPTION | +-------------------------------+-------------------------------+ | Full path name | /home/db2fenc1 | +-------------------------------+-------------------------------+ | User Name (UDF) | db2fenc1 | +-------------------------------+-------------------------------+ | UID (UDF) | System-generated UID | +-------------------------------+-------------------------------+ | Group Name (UDF) | db2fadm1 | +-------------------------------+-------------------------------+ | GID (UDF) | System-generated GID | +-------------------------------+-------------------------------+ | Password (UDF) | ibmdb2 | +-------------------------------+-------------------------------+ The parameters for the DB2 Administration Server (DAS) are: +---------------------------------------------------------------+ | Figure 4 (Page 1 of 2). Parameters for the DB2 Administration | | Server (DAS) | +-------------------------------+-------------------------------+ | PARAMETER | DESCRIPTION | +-------------------------------+-------------------------------+ | Full path name | /home/db2as | +-------------------------------+-------------------------------+ | User Name | db2as | +-------------------------------+-------------------------------+ | UID | System-generated UID | +-------------------------------+-------------------------------+ 20 DB2 UDB V5 with VA TC V3 +---------------------------------------------------------------+ | Figure 4 (Page 2 of 2). Parameters for the DB2 Administration | | Server (DAS) | +-------------------------------+-------------------------------+ | PARAMETER | DESCRIPTION | +-------------------------------+-------------------------------+ | Group Name | db2asgrp | +-------------------------------+-------------------------------+ | GID | System-generated GID | +-------------------------------+-------------------------------+ | Password | ibmdb2 | +-------------------------------+-------------------------------+ | TCP/IP Port Number | 523 | +-------------------------------+-------------------------------+ 2.6.2 (Optional) Create a file system for the DB2 instance and _______________________________________________________________ TC family _________ If desired, you can create a file system dedicated to the DB2 instance and the VisualAge TeamConnection family. In this way, you can increase the performance and maintainability of the family by isolating it from other applications that might compete for file system resources. Also, it will allow you to easily backup the entire file system and restore it. Just for completeness, place the DB2 fenced user ID that corre- sponds to the DB2 instance in the same file system. Because the DB2 Administration Server is not really associated to a particular DB2 instance, there is no need to place it in the dedicated file system for the DB2 instance. The following instructions describe how to create the physical directories for the DB2 instance, the DB2 fenced user ID and the VisualAge TeamConnection family in the same dedicated file system (such as /home2). Because the DB2 Installer does not allow you to specify the physical directories when creating a DB2 instance (it assumes that they will be in /home), we need to create the symbolic links from the /home2 directory to /home; in this way, the DB2 Installer will be "tricked" into thinking that /home/db2inst1 is real, when actually, it is physically located in /home2/db2inst1. 1. Login as root. 2. Let's assume that the file system "/home2" is created and mounted by following the instructions on how to create and prepare a file system. This information is found in the technical report "VisualAge TeamConnection Version 3: how to do routine operating system tasks". Installation of DB2 for UNIX 21 3. Under the new file system, create the home directory for the DB2 instance (db2inst1) and the VisualAge TeamConnection family user ID (tcfamily): cd /home2 umask 000 mkdir db2inst1 mkdir db2fenc1 mkdir tcfamily For the moment, notice that because the user IDs db2inst1, db2fenc1, and tcfamily have NOT been created yet, the owner of these home directories is still root. Also, notice that because the umask was set temporarily to 000 (assuming that the previous umask was 022), the file per- missions for these directories are 777 (read-write-execute to all). After these user IDs are actually created, we can change the ownership and the file permissions for these home directo- ries. 4. Create the following symbolic links from /home2 to /home: ln -s /home2/db2inst1 /home/db2inst1 ln -s /home2/db2fenc1 /home/db2fenc1 ln -s /home2/tcfamily /home/tcfamily umask 022 See the notes in the previous step about ownership and file permissions of the linked directories. 5. Use the DB2 Installer to create the DB2 instance. See 2.6.6, "Install DB2 UDB Workgroup Edition using DB2 Installer" on page 31. 6. Create the VisualAge TeamConnection family. See 5.0, "Cre- ation of a family using the new DB2 Instance" on page 79. 7. Modify the ownership and file permissions for the home direc- tories. See 2.6.7.3, "Changing the ownership and file per- missions of the home directories" on page 58. 22 DB2 UDB V5 with VA TC V3 2.6.3 Update kernel configuration parameters (not required for _______________________________________________________________ AIX) ____ Depending on your workstation's operating system and its kernel configuration, you may have to update the kernel configuration parameters. This step is not required on AIX. Because changing the kernel in UNIX is a delicate operation, it is recommended that you make a backup of your UNIX system before attempting the kernel changes needed by DB2. 2.6.3.1 Recommended Values for HP-UX The values in the following table are recommended for the HP-UX kernel configuration parameters, based on the available Physical Memory. To maintain the interdependency among kernel parameters, change parameters in the same sequence in which they appear in the fol- lowing table. +---------------------------------------------------------------+ | Figure 5 (Page 1 of 2). HP-UX Kernel Configuration Parameters | | (Recommended Values) | +---------------+---------------+---------------+---------------+ | KERNEL PARAM- | 64MB - 128MB | 128MB - 256MB | 256MB+ | | ETER | | | | +---------------+---------------+---------------+---------------+ | nproc | 512 | 768 | 1024 | +---------------+---------------+---------------+---------------+ +---------------+---------------+---------------+---------------+ +---------------+---------------+---------------+---------------+ +---------------+---------------+---------------+---------------+ | maxfiles | 256 | 256 | 256 | +---------------+---------------+---------------+---------------+ | maxuprc | 256 | 384 | 512 | +---------------+---------------+---------------+---------------+ +---------------+---------------+---------------+---------------+ +---------------+---------------+---------------+---------------+ +---------------+---------------+---------------+---------------+ | nflocks | 2048 | 4096 | 8192 | +---------------+---------------+---------------+---------------+ | vninode | 512 | 1024 | 2048 | +---------------+---------------+---------------+---------------+ | nfile | (4 * NINODE) | (4 * NINODE) | (4 * NINODE) | +---------------+---------------+---------------+---------------+ +---------------+---------------+---------------+---------------+ +---------------+---------------+---------------+---------------+ +---------------+---------------+---------------+---------------+ Installation of DB2 for UNIX 23 +---------------------------------------------------------------+ | Figure 5 (Page 2 of 2). HP-UX Kernel Configuration Parameters | | (Recommended Values) | +---------------+---------------+---------------+---------------+ | KERNEL PARAM- | 64MB - 128MB | 128MB - 256MB | 256MB+ | | ETER | | | | +---------------+---------------+---------------+---------------+ | msgseg | 8192 | 16384 | 32768 | +---------------+---------------+---------------+---------------+ | msgmnb | 65535 (1) | 65535 (1) | 65535 (1) | +---------------+---------------+---------------+---------------+ | msgmax | 65535 (1) | 65535 (1) | 65535 (1) | +---------------+---------------+---------------+---------------+ | msgtql | 128 | 256 | 256 | +---------------+---------------+---------------+---------------+ | msgmap | (2 + MSGTQL) | (2 + MSGTQL) | (2 + MSGTQL) | +---------------+---------------+---------------+---------------+ | msgmni | 128 | 256 | 256 | +---------------+---------------+---------------+---------------+ | msgssz | 16 | 16 | 16 | +---------------+---------------+---------------+---------------+ +---------------+---------------+---------------+---------------+ +---------------+---------------+---------------+---------------+ +---------------+---------------+---------------+---------------+ | semmns | 256 | 512 | 1024 | +---------------+---------------+---------------+---------------+ | semmni | 128 | 256 | 512 | +---------------+---------------+---------------+---------------+ | semmap | (2 + SEMMNI) | (2 + SEMMNI) | (2 + SEMMNI) | +---------------+---------------+---------------+---------------+ | semmnu | 256 | 512 | 1024 | +---------------+---------------+---------------+---------------+ +---------------+---------------+---------------+---------------+ +---------------+---------------+---------------+---------------+ +---------------+---------------+---------------+---------------+ | shmmax | 67108864 (2) | 134217728 (2) | 268435456 | | | | | (2) | +---------------+---------------+---------------+---------------+ | shmseg | 16 | 16 | 16 | +---------------+---------------+---------------+---------------+ | shmmni | 300 | 300 | 300 | +---------------+---------------+---------------+---------------+ NOTES: 1. Parameters msgmnb and msgmax must be set to 65535. 2. Parameter shmmax should be set to 134217728 or 90% of the physical memory (in bytes), whichever is higher. For example, if you have 196 MB of physical memory in your system, set shmmax to 184968806 (176*1024*1024). When using the sam tool, these values are actually represented in hexadecimal: 24 DB2 UDB V5 with VA TC V3 o 67108864 = 0X40000000 (0X4 followed by 7 zeros) o 134217728 = 0X80000000 (0X8 followed by 7 zeros) o 268435456 = 0X100000000 (0X1 followed by 8 zeros) WARNING: Ensure that your system has the HP-UX 10 Transitional Links for HP-UX 9, otherwise the rebuilding of the kernel will fail. The following commands in HP-UX 10 handle the transitional links, which are installed by default: /opt/upgrade/bin/tllist -> lists the transitional links, if available /opt/upgrade/bin/tlremove -> removes the transitional links /opt/upgrade/bin/tlinstall -> establishes the transitional links To change the values, do the following: 1. Login as root. 2. Invoke the SAM tool: /usr/sbin/sam & 3. Select Kernel Configuration. 4. Select Configurable Parameters. 5. Highlight the parameter to be changed. 6. Select Modify Configurable Parameter from the Actions menu and make the appropriate changes. In some cases, the recommended value to be used with DB2 for a parameter will replace an existing formula. I personally decided to delete the formula and use the actual value from the above table, rather than fudge with the formula by modi- fying the parameters used in the formula, in order to avoid side-effects (that is, I wanted to avoid making changes to other parameters not listed in the table). 7. Repeat the previous two steps for every kernel parameter which needs to be updated. 8. Create a new kernel by selecting Create a New Kernel from the Actions menu. 9. Reboot the system so that the changes can take effect. I accepted the defaults from the window "Reboot the system". To continue with the installation on HP-UX systems, proceed to 2.6.4, "Mount the CD-ROM" on page 28. 2.6.3.2 Recommended Values for Solaris The values in the following table are recommended for Solaris kernel configuration parameters, based on the available Physical Memory. Installation of DB2 for UNIX 25 +---------------------------------------------------------------+ | Figure 6 (Page 1 of 2). Solaris Kernel Configuration Parame- | | ters (Recommended Values) | +----------------------+-------------+-------------+------------+ | KERNEL PARAMETER | 64MB - | 128MB - | 256MB+ | | | 128MB | 256MB | | +----------------------+-------------+-------------+------------+ | msgsys:msginfo_msgmax| 65535 (1) | 65535 (1) | 65535 (1) | | | | | | +----------------------+-------------+-------------+------------+ | msgsys:msginfo_msgmnb| 65535 (1) | 65535 (1) | 65535 (1) | | | | | | +----------------------+-------------+-------------+------------+ | msgsys:msginfo_msgmap| 130 | 258 | 258 | | | | | | +----------------------+-------------+-------------+------------+ | msgsys:msginfo_msgmni| 128 | 256 | 256 | | | | | | +----------------------+-------------+-------------+------------+ | msgsys:msginfo_msgssz| 16 | 16 | 16 | | | | | | +----------------------+-------------+-------------+------------+ | msgsys:msginfo_msgtql| 128 | 256 | 256 | | | | | | +----------------------+-------------+-------------+------------+ | msgsys:msginfo_msgseg| 8192 | 16384 | 32768 | | | | | | +----------------------+-------------+-------------+------------+ +----------------------+-------------+-------------+------------+ +----------------------+-------------+-------------+------------+ +----------------------+-------------+-------------+------------+ | shmsys:shminfo_shmmax| 67108864 | 134217728 | 268435456 | | | | (2) | (2) | +----------------------+-------------+-------------+------------+ | shmsys:shminfo_shmseg| 16 | 16 | 16 | | | | | | +----------------------+-------------+-------------+------------+ | shmsys:shminfo_shmmni| 300 | 300 | 300 | | | | | | +----------------------+-------------+-------------+------------+ +----------------------+-------------+-------------+------------+ +----------------------+-------------+-------------+------------+ +----------------------+-------------+-------------+------------+ | semsys:seminfo_semmni| 128 | 256 | 512 | | | | | | +----------------------+-------------+-------------+------------+ | semsys:seminfo_semmap| 130 | 258 | 514 | | | | | | +----------------------+-------------+-------------+------------+ | semsys:seminfo_semmns| 256 | 512 | 1024 | | | | | | +----------------------+-------------+-------------+------------+ 26 DB2 UDB V5 with VA TC V3 +---------------------------------------------------------------+ | Figure 6 (Page 2 of 2). Solaris Kernel Configuration Parame- | | ters (Recommended Values) | +----------------------+-------------+-------------+------------+ | KERNEL PARAMETER | 64MB - | 128MB - | 256MB+ | | | 128MB | 256MB | | +----------------------+-------------+-------------+------------+ | semsys:seminfo_semmnu| 256 | 512 | 1024 | | | | | | +----------------------+-------------+-------------+------------+ NOTES: 1. Parameters msgsys:msginfo_msgmnb and msgsys:msginfo_msgmax must be set to 65535. 2. Parameters shmsys:shminfo_shmmax should be set to 134217728 or 90% of the physical memory (in bytes), whichever is higher. For example, if you have 196 MB of physical memory in your system, set the shmsys:shminfo_shmmax 184968806 (176*1024*1024). To change the values, do the following: 1. Login as root. 2. Just in case you have an existing /etc/system file, make a backup of it. 3. Edit the file /etc/system as follows: To set a kernel parameter, add a line at the end of the file: set parameter-name = value For example, to set the value of the parameter msgsys:msginfo_msgmax, add the following line: set msgsys:msginfo_msgmax = 65535 4. Depending upon the amount of physical memory in your system, append the appropriate kernel configuration parameter file to the /etc/system file. If necessary, change the value of shmsys:shminfo_shmmax as described in note 2 above. 5. After updating the /etc/system file, reboot the system: shutdown -i6 -y -g0 To continue with the installation on Solaris systems, proceed to 2.6.4, "Mount the CD-ROM" on page 28. Installation of DB2 for UNIX 27 2.6.4 Mount the CD-ROM _______________________ To install DB2 products using the DB2 Installer, you must first mount the platform-specific CD-ROM for either the VisualAge TeamConnection Version 3 or DB2 UDB Version 5. After you have mounted the CD-ROM, you can start installing DB2: Refer to the following procedures to mount the CD-ROM on dif- ferent UNIX operating systems: o 2.6.4.1, "Mounting on AIX Systems." o 2.6.4.2, "Mounting on HP-UX Systems" on page 29. o 2.6.4.3, "Mounting on Solaris Systems" on page 30. 2.6.4.1 Mounting on AIX Systems Perform the following steps to mount the CD-ROM on AIX operating systems: 1. Log in as root. 2. Insert the CD-ROM in the drive. 3. Create a root directory, such as /cdrom, by typing the fol- lowing command: mkdir -p /cdrom 4. Allocate a CD-ROM file system by typing the following command: smit storage 5. Select "FileSystems". 6. Select "Add/Change/Show/Delete FileSystems". 7. Select "CD-ROM FileSystems". 8. Select "Add CDROM FileSystems". 9. Select the "DEVICE Name". 10. Respond to the prompt, mount point, by typing the following: /cdrom 11. Mount the CD-ROM file system by typing the following command: smit mountfs 28 DB2 UDB V5 with VA TC V3 12. Select the "FileSystem" name. For example, the name can be /dev/cd0. 13. Select the "Directory" name: /cdrom. 14. Select the "Type of filesystem": cdrfs. 15. Set the Mount as READ-ONLY system to Yes. 16. Log out. 17. After mounting the CD-ROM, proceed to 2.6.6, "Install DB2 UDB Workgroup Edition using DB2 Installer" on page 31. 2.6.4.2 Mounting on HP-UX Systems Perform the following steps to mount the CD-ROM on HP-UX oper- ating systems: 1. Log in as root. 2. Issue the mount command to determine if the CD-ROM file system is mounted and operational. Verify that /cdrom is listed; if, not, then do the following: a. To create a directory for the CD-ROM, type mkdir /cdrom. b. Type the following command: sam & Notice that the & (ampersand) at the end of the line will start the command in background mode. c. Select "Disks and File Systems". d. Select "Disk Devices". e. Select the entry CDFS (for CD-ROM File System), and select "Actions" and then "View more information" from the menu bar. f. Click on "Show Device File" and from the list, select the Device file value for the "Block device file", such as: /dev/dsk/c0t2d0 g. Close the "View More Information" window. h. Close the "Disks and File Systems" window. i. Exit sam. Installation of DB2 for UNIX 29 3. Insert the CD-ROM in the drive and mount it as in the fol- lowing example: /usr/sbin/mount /dev/dsk/c0t2d0 /cdrom where /cdrom is the CD-ROM mount directory. Issue the mount command again and verify that /cdrom is listed. 4. Log out. 5. After mounting the CD-ROM, proceed to 2.6.6, "Install DB2 UDB Workgroup Edition using DB2 Installer" on page 31. 2.6.4.3 Mounting on Solaris Systems Perform the following steps to mount the CD-ROM on Solaris oper- ating systems: 1. Log in as root. 2. Insert the CD-ROM in the drive. 3. If the Volume Manager (vold) is installed on your system, the CD-ROM is automatically mounted as: /cdrom/volume_name Where /cdrom/volume_name is the CD-ROM mount directory. If the Volume Manager is not installed on your system, mount the CD-ROM by entering commands as shown in the following example: mkdir -p /cdrom/volume_name mount -F hsfs -o ro /dev/dsk/c0t6d0s2 /cdrom/teamcv3 4. Log out. 5. After mounting the CD-ROM, proceed to 2.6.6, "Install DB2 UDB Workgroup Edition using DB2 Installer" on page 31. 30 DB2 UDB V5 with VA TC V3 2.6.5 Install VisualAge TeamConnection _______________________________________ When installing the server component of the VisualAge TeamConnection Enterprise Server Version 3, the installation utility will ask you if you want to install DB2 UDB at this time. 1. Login as root. 2. Execute the command: tcinst.ksh 3. Provide the appropriate information. 4. If you install the Server component of VisualAge TeamConnection, then the installation utility will scan your system looking for an existing installation of DB2 UDB V5. If it is found, then there is no need to reinstall DB2. If it is not found, then there is a prompt asking you if you want to install DB2 UDB now, if affirmative, continue with the section 2.6.6, "Install DB2 UDB Workgroup Edition using DB2 Installer." 2.6.6 Install DB2 UDB Workgroup Edition using DB2 Installer ____________________________________________________________ The DB2 Installer is a tool that is consistent across all UNIX platforms, to performs the following independent tasks: 1. Install the code for DB2 UDB Workgroup Edition. See 2.6.6.1, "Installing the code for DB2 UDB Workgroup Edition" on page 32 for details. 2. Create a DB2 Instance, create the DB2 Administration Server, create all the related ids and make the necessary file changes. See 2.6.6.2, "Creating the DB2 Instances" on page 44 for details. In this TR, the above 2 tasks are performed separately, although it is possible to perform the above tasks in the same session with DB2 Installer; however, we do not recommend this approach because we have seen some problems, especially in the second part (when creating DB2 instances). NOTE: If you are using DB2 Installer from a remote server, it is better to open a telnet session instead of using the rlogin command to connect to your remote server. Installation of DB2 for UNIX 31 2.6.6.1 Installing the code for DB2 UDB Workgroup Edition If you are installing DB2 UDB as part of your installation of VisualAge TeamConnection, please start with step 4 on page 33. If you are installing DB2 UDB by itself from the CD-ROM (either the one from VisualAge TeamConnection or the one that you obtained by directly purchasing DB2), please start with step 1 on page 32. 1. Log in as root. 2. Change to the directory where the CD-ROM is mounted by typing the following command: o On AIX or HP-UX: cd /cdrom Where /cdrom is the mount point of the CD-ROM drive on AIX and HP-UX. o On Solaris, if using the CD-ROM from VisualAge TeamConnection, issue the following command: cd /cdrom/volume_name Where /cdrom/volume_name is the mount point of the CD-ROM on Solaris. o On Solaris, if using the CD-ROM from DB2 UDB, issue the following command: cd /cdrom/vatcv300 Where /cdrom is the mount point of the CD-ROM on Solaris. 3. If this is the CD-ROM with VisualAge TeamConnection, then do the following step; otherwise, skip this step and continue with step 4 on page 33. cd /db2 Where is the desired operating system: aix4, hpux10, and solaris. Continue with step 4 on page 33. 32 DB2 UDB V5 with VA TC V3 4. Type the following command to start the DB2 Installer: ./db2setup It will take some time for the DB2 Installer to start up, as it is scanning your system for information. +------------------------------- DB2 Installer --------------------------------+ | | | Select Install to select products and their components to install, or | | select Create to create the DB2 services. | | | | To select products and their components, select [ Install... ] | | Install. | | | | To create a +--- Please Wait -----------------------------+[ Create... ] | | Server, sele| | | | | Scanning your system for information... | | | | | | | | | | | +---------------------------------------------+ | | | | [ Close ] [ Help ] | +------------------------------------------------------------------------------+ Figure 7. DB2 Installer screen Installation of DB2 for UNIX 33 5. From the product list on the "Install DB2 V5" screen, select to install: DB2 Universal Database Workgroup Edition. NAVIGATION HINTS: Use the left tab key to move around; the Shift-tab key does not move backwards. If you keep pressing the tab key, then when you reach the last entry at the bottom right corner, it will start again from the upper left corner. You may also use the arrow keys to move up and down, and left to right. Use the tab key to move to the entry "DB2 UDB Workgroup Edition" then press the space bar to select it. Select Customize and press enter. +------------------------------- Install DB2 V5 -------------------------------+ | | | Select the products you are licensed to install. Your Proof of | | Entitlement and License Information booklet identify the products for | | which you are licensed. | | | | To see the preselected components or customize the selection, select | | Customize for the product. | | [ ] DB2 Client Application Enabler : Customize... : | | [*] DB2 UDB Workgroup Edition [ Customize... ] | | : : DB2 UDB Enterprise Edition : Customize... : | | : : DB2 Connect Enterprise Edition : Customize... : | | : : DB2 UDB Extended Enterprise Edition : Customize... : | | : : DB2 Software Developer's Kit : Customize... : | | | | To choose a language for the following components, select Customize for | | the product. | | DB2 Product Messages [ Customize... ] | | DB2 Product Library [ Customize... ] | | | | | | [ OK ] [ Cancel ] [ Help ] | +------------------------------------------------------------------------------+ Figure 8. Install DB2 V5 screen 34 DB2 UDB V5 with VA TC V3 6. From the "DB2 Universal Database Workgroup Edition" screen you may unselect components, such as the Code Page Conversion Support if you are using English only. It is recommended to install the code to create the sample DB2 database; you can use it later on to verify the DB2 setup and to practice your DB2 administration commands. See 2.6.7.5, "Verify the DB2 configuration by creating the DB2 Sample database" on page 60 for more details. When you have finished choosing product components, select OK. To undo any selections you made, select Cancel. +--- DB2 Universal Database Workgroup Edition ---------------------------------+ | | | Required: DB2 Client | | DB2 Run-time Environment | | DB2 Engine | | DB2 Communication Support - TCP/IP | | DB2 Communication Support - IPX/SPX | | DB2 Communication Support - SNA | | DB2 Communication Support - DRDA Application Server | | Administration Server | | License Support | | Optional: [ ] Open Database Connectivity (ODBC) | | [ ] Java Database Connectivity (JDBC) | | [ ] Replication | | [*] DB2 Sample Database Source | | Code Page Conversion Support: | | [*] Japanese [*] Simplified Chinese | | [*] Korean [*] Traditional Chinese | | | | [ Select All ] [ Deselect All ] [ Default ] | | [ OK ] [ Cancel ] [ Help ] | +------------------------------------------------------------------------------+ Figure 9. DB2 Universal Database Workgroup Edition screen Installation of DB2 for UNIX 35 7. You will be back to the "Install DB2 V5" screen, where you could specify, if you want, other locales to be installed. Please note that the messages for the default en_US locale will be installed always (and that is the reason there is no explicit choice for it). Move the tab key to the [ Customize... ] for DB2 Product Mes- sages. Press enter. 8. From the "DB2 Product Messages" screen select the desired locales by moving the cursor (tab key) and then pressing the space bar to select. For example, ja_JP. Select the OK button that is below Select All (in the inside window). Press enter. |+--- DB2 Product Messages ---------------------------------------------------+| || || || Required: || || Optional: DB2 Product Messages: || || : : Fr_FR : : fr_FR : : De_DE || || : : de_DE : : Es_ES : : es_ES || || : : pt_BR [ ] Ja_JP [*] ja_JP || || [ ] ko_KR [ ] zh_CN [ ] Zh_TW || || [ ] zh_TW : : Da_DK : : da_DK || || : : Fi_FI : : fi_FI : : No_NO || || : : no_NO : : Sv_SE : : sv_SE || || : : cs_CZ : : hu_HU : : pl_PL || || : : ru_RU : : bg_BG : : sl_SI || || || || [ Select All ] [ Deselect All ] [ Default ] || || [ OK ] [ Cancel ] [ Help ] || |+----------------------------------------------------------------------------+| Figure 10. DB2 Product Messages screen 36 DB2 UDB V5 with VA TC V3 9. You will be back to the "Install DB2 V5" screen, where you could specify, if you want, to install the Product Library (HTML). Contrary to the Product Messages in which the en_US is installed by default, the Product Library in the en_US locale is not installed by default, and thus, this time there is an explicit entry for it. Move the tab key to the [ Customize... ] for DB2 Product Library. Press enter. 10. From the "DB2 Product Library" screen select the desired locales by moving the cursor (tab key) and then pressing the space bar to select. For example, en_US. Select the OK button that is below Select All (in the inside window). Press enter. |+--- DB2 Product Library ----------------------------------------------------+| || || || Required: || || Optional: DB2 Product Library (HTML): || || [*] en_US : : fr_FR : : de_DE || || : : es_ES : : pt_BR [ ] ja_JP || || [ ] ko_KR [ ] zh_CN [ ] Zh_TW || || : : da_DK : : fi_FI : : no_NO || || : : sv_SE : : cs_CZ : : hu_HU || || : : pl_PL : : ru_RU : : bg_BG || || : : sl_SI || || || || [ Select All ] [ Deselect All ] [ Default ] || || [ OK ] [ Cancel ] [ Help ] || |+----------------------------------------------------------------------------+| Figure 11. DB2 Product Library screen 11. You will be back to the "Install DB2 V5" screen, where you can select OK and press enter to go to the "Create DB2 Ser- vices" screen. 12. From the "Create DB2 Services" screen, do NOT select to create a DB2 Instance nor to create the Administration server at this time. They will be created in the next session with DB2 Installer, 2.6.6.2, "Creating the DB2 Instances" on page 44. Select OK and press enter. 13. Ignore the following 2 next warning messages: Installation of DB2 for UNIX 37 DBI1756W DB2 Instance is not created. DBI1755W The Administration Server is not created. Select OK and press enter. 38 DB2 UDB V5 with VA TC V3 14. A Summary Report will be shown: +------------------------------- DB2 Installer --------------------------------+ | | | +-- Summary Report ----------------------------------------------------+ | | | | | | | | | | | Installation | | | | ------------ | | | | | | | | Product components to be installed: | | | | | | | | DB2 Client | | | | DB2 Run-time Environment | | | | DB2 Engine | | | | DB2 Communication Support - TCP/IP | | | | Administration Server | | | | DB2 Communication Support - SNA | | | | [ More... ] | | | +----------------------------------------------------------------------+ | | [ Continue ] | +------------------------------------------------------------------------------+ Figure 12. Summary Report screen for the installation of the code The navigation here is a bit tricky: o Select Summary Report. Now notice the + sign in the lower right corner is high- lighted (near the "More..." string. o Now you can use the PageDown and PageUp to scroll the list. o Notice that the last entry in the summary report indi- cates the log file for the db2setup utility: | | * The log file is in /tmp/db2setup.log. | | o If the selections are not correct, press the F3 key to return to the previous screen. o If the selections are correct, select Continue and press enter. Installation of DB2 for UNIX 39 15. Now you will see the following warning: | | +--- Warning -------------------------------------+ | | | | Adminis| | | | | | | (X) This is your last chance to stop. | | | | | Note: | | | | | | | Select OK to start, or Cancel to abort. | | | | | * The l| | | | | | | [ OK ] [ Cancel ] | | | | | +-------------------------------------------------+ | | Figure 13. Warning screen before unpacking the installation images Press enter to start the installation. WARNING!: Because you have been pressing the enter key a lot, avoid pressing the enter key in the next subwindows, because then you will stop the installation process! The temptation is really big to press that enter key! Resist the temptation! 16. You will see the "Installing..." screen that will indicate the progress of the installation. WARNING!: Because you have been pressing the enter key a lot, avoid pressing the enter key in the next subwindows, because then you will stop the installation process! The temptation is really big to press that enter key! Resist the temptation! Wait for the installation to finish. | | +--- Installing... -------------------------------+ | | | | Adminis| | | | | | | DB2 Run-time Environment | | | | | Note: | | | | | | | [ Cancel ] | | | | | +-------------------------------------------------+ | | Figure 14. Installation progress screen 40 DB2 UDB V5 with VA TC V3 17. When the installation process is completed, then you will see the next window: | | Administration S+--- Notice --------------------+ | | | | | | | | | | Note: | Completed successfully. | | | | | | | | | | | * The log file i| [ OK ] | | | | | +-------------------------------+ | | Figure 15. Notice screen of completion of the installation Press OK to see the next window with the Status Report. 18. When the installation is complete, use the Up or Down arrow keys to review the Status Report. Ensure that all the items have a status of "SUCCESS". +------------------------------- DB2 Installer --------------------------------+ | | | +-- Status Report -----------------------------------------------------+ | | | | | | | | | | | Installation | | | | ------------ | | | | | | | | DB2 Client SUCCESS | | | | DB2 Run-time Environment SUCCESS | | | | DB2 Engine SUCCESS | | | | DB2 Communication Support - TCP/IP SUCCESS | | | | Administration Server SUCCESS | | | | DB2 Communication Support - SNA SUCCESS | | | | DB2 Communication Support - DRDA Application Server SUCCESS | | | | DB2 Communication Support - IPX/SPX SUCCESS | | | | [ More... ] | | | +----------------------------------------------------------------------+ | | [ View Log ] [ OK ] | +------------------------------------------------------------------------------+ Figure 16. Status Report screen Installation of DB2 for UNIX 41 19. Select View Log to view the installation log file. +------------------------------- DB2 Installer --------------------------------+ | | | +-- View Log File -----------------------------------------------------+ | | | | | | | | | | | DB2 Installer Log File | | | | ---------------------- | | | | | | | | Log started at Fri Mar 27 16:38:59 1998 | | | | | | | | Command to be executed: | | | | | | | | /usr/sbin/installp -acgqX -d /cdrom/db2/ db2_05_00.client | | | | | | | | Output log of the above command: | | | | +----------------------------------------------------------------- | | | | Pre-installation Verification... | | | | [ More... ] | | | +----------------------------------------------------------------------+ | | [ OK ] | +------------------------------------------------------------------------------+ Figure 17. View Log File screen Select OK to close the "View Log File" screen. Select OK to close the "Status Report" screen. 20. The DB2 Installer will perform some cleanup and then you will see the "DB2 Installer" screen 21. Select Close from the "DB2 Installer" screen to terminate the DB2 Installer. Ignore the following 2 next warning messages: DBI1756W DB2 Instance is not created. DBI1755W The Administration Server is not created. Select OK and press enter to all the remaining screens, to exit from the DB2 Installer. 22. Change the directory away from /cdrom, and now you can unmount the CD-ROM: cd umount /cdrom 42 DB2 UDB V5 with VA TC V3 23. Proceed to create the DB2 instances: see 2.6.6.2, "Creating the DB2 Instances" on page 44. Installation of DB2 for UNIX 43 2.6.6.2 Creating the DB2 Instances After the installation of the code for DB2 UDB V5 has been suc- cessfully performed, now you can create the DB2 instance and the DB2 Administration Server. If you encounter problems when creating DB2 instances by using DB2 Installer, then go to 2.6.6.3, "Manual methods to create DB2 instances in UNIX" on page 55. Notice that the DB2 Administration Server is a special DB2 instance and it should be the only one of its type in the host. Thus, if you come to this section to create another normal DB2 instance, and if you already have created a DB2 Administration Server make sure that you do not create another DB2 Adminis- tration Server. NOTES: 1. If NIS is being used in the target host, then you can only use the DB2 installer utility to install the code, but you cannot use this utility to create the instances; if you use it, then this utility will fail when trying to update the services file and to create the user IDs. Thus, you will have to perform the manual creation of the DB2 instance and other user IDs, and the manual update to the services file. For more details see 2.3.1, "Other methods to install in UNIX" on page 17. 2. If you have created already a user ID for the DB2 instance, such as db2inst1, then if you specify it when using DB2 installer, the creation of the DB2 instance will fail. In case you cannot let the DB2 installer create the user IDs, then you will need to bypass DB2 installer and manually create the instance. For more details see 2.3.1, "Other methods to install in UNIX" on page 17. The sequence to create the DB2 instances is shown below: 1. Login as root 2. The DB2 Installer is now available in $DB2_HOME/install, and so, there is no reason to mount the CD-ROM again. Thus, execute the following command: AIX /usr/lpp/db2_05_00/install/db2setup HP-UX /opt/IBMdb2/V5.0/install/db2setup SOLARIS /opt/IBMdb2/V5.0/install/db2setup 44 DB2 UDB V5 with VA TC V3 3. You will see the "DB2 Installer" screen. This time, select "Create ..." in order to create a DB2 Instance or the Admin- istration Server. +------------------------------- DB2 Installer --------------------------------+ | | | Select Install to select products and their components to install, or | | select Create to create the DB2 services. | | | | To select products and their components, select [ Install... ] | | Install. | | | | To create a DB2 Instance, or the Administration [ Create... ] | | Server, select Create. | | | | [ Close ] [ Help ] | +------------------------------------------------------------------------------+ Figure 18. DB2 Installer screen - Create instances Installation of DB2 for UNIX 45 4. From the "Create DB2 Services" screen, select "Create a DB2 Instance". +---------------------------- Create DB2 Services -----------------------------+ | | | Select the items you want to create, and select OK when finished. | | | | A DB2 Instance is an environment where you store data and run | | applications. An instance can contain multiple databases. | | | | [*] Create a DB2 Instance. : Customize... : | | | | An Administration Server provides services to support client tools that | | automate the configuration of connections to DB2 databases. | | | | [ ] Create the Administration Server. : Customize... : | | | | [ OK ] [ Cancel ] [ Help ] | +------------------------------------------------------------------------------+ Figure 19. Create DB2 Services screen, snapshot 1 If this is the first time, when pressing the space bar to select the item, you will automatically be taken to Figure 20 on page 47. 46 DB2 UDB V5 with VA TC V3 5. The recommendation is to take the defaults in the "DB2 Instance" screen, although you may want to modify the pass- word. Select only Auto start DB2 Instance. Do not select the option to create a sample database, because we have seen some problems when trying to create it at this stage. It is better to create it after the DB2 Instance has been successfully create. For details, see 2.6.7.5, "Verify the DB2 configuration by creating the DB2 Sample database" on page 60. If you are using TCP/IP, then there is no really need to cus- tomize it but the corresponding screen is shown in step 6 on page 48. Press enter to continue. |+--- DB2 Instance -----------------------------------------------------------+| || || || Authentication: || || Enter User ID, Group ID and Password that will be used for || || the DB2 Instance. || || User Name [db2inst1] || || User ID : : [*] Use default UID || || Group Name [db2iadm1] || || Group ID : : [*] Use default GID || || Password [******** ] || || Verify Password [******** ] [ Default ] || || || || Protocol: || || Select Customize to change the default [ Customize... ] || || communication protocol. || || || || [*] Auto start DB2 Instance at system boot. || || [ ] Create a sample database for DB2 Instance. || || || || [ OK ] [ Cancel ] [ Help ] || |+----------------------------------------------------------------------------+| Figure 20. DB2 Instance screen Installation of DB2 for UNIX 47 6. In case you want to Customize the default communication pro- tocol, or if you are just curious, then select Customize and you will see the "DB2 Instance Protocol" screen. Because TCP/IP is used, then the following sub-window is shown. NOTE: When showing sub-windows (windows inside another window), the outer window will not be shown completely. || +--- DB2 Instance Protocol ------------------------------------------+ || || | | || || | Select protocols and then select Properties to modify the | || || | protocol values. | || || | | || || | [*] TCP/IP Detected [ Properties... ] | || || | : : IPX/SPX : Properties... : | || || | | || || | [ OK ] [ Cancel ] [ Help ] | || || +--------------------------------------------------------------------+ || Figure 21. DB2 Instance Protocol screen Then by selecting the Properties and pressing Enter, the fol- lowing sub-sub-window will be shown: || +--- +--- TCP/IP -----------------------------------------------+----+ || || | | | | || || | S| Enter the Service Name and Port Number that will | | || || | p| be used for TCP/IP connection. | | || || | | | | || || | [| Service Name [db2cdb2inst1 ] |] | || || | :| Port Number [50000] [ Default ] |: | || || | | | | || || | [| [ OK ] [ Cancel ] [ Help ] |] | || || +----+----------------------------------------------------------+----+ || Figure 22. Customization of TCP/IP Protocol screen Press enter until you return to the screen "Create DB2 Ser- vices", "DB2 Instance", in step 5 on page 47. Then press OK to continue. 48 DB2 UDB V5 with VA TC V3 7. From the "User-Defined Functions" screen, just accept the defaults, although you may want to change the password. The Fenced User Name and Group Name are used for user-defined functions (which need to be "fenced" in a separate account, away from the actual account of the DB2 instance). So far, they are not supported by TeamConnection and there are no plans to support them, but it is a good idea to go ahead and create this user ID because they are needed for the creation of the DB2 instance. It will not hurt to have this user ID (and then to ignore it). Press enter. |+--- User-Defined Functions -------------------------------------------------+| || || || Fenced User-Defined Functions enable application developers to || || create their own suite of functions specific to their application || || or domain. || || || || Authentication: || || Enter User ID, Group ID and Password that will be used for || || the fenced User-Defined Functions. || || User Name [db2fenc1] || || User ID : : [*] Use default UID || || Group Name [db2fadm1] || || Group ID : : [*] Use default GID || || Password [ ] || || Verify Password [ ] [ Default ] || || || || Note: It is not recommended to use the DB2 Instance user ID for || || security reasons. || || || || [ OK ] [ Cancel ] [ Help ] || |+----------------------------------------------------------------------------+| Figure 23. User-Defined Functions screen Installation of DB2 for UNIX 49 8. You will be back to the "Create DB2 Services" screen. It is highly recommended that you also create the DB2 Admin- istration Server (DAS), because it will allow your UNIX data- base to be administered remotely by the DB2 Control Center from an Intel platform. Even if you do not plan to use the DB2 Control Center now, your plans may change in the future and by installing it now you will be prepared. Also, if a version for UNIX for the DB2 Control Center is ever made available, you will be ready. The administration of a DB2 instance and its databases is greatly simplified by using the DB2 Control Center. Select the item "Create the Administration Server". As soon as you press the space bar, you will be taken to the next screen. +---------------------------- Create DB2 Services -----------------------------+ | | | Select the items you want to create, and select OK when finished. | | | | A DB2 Instance is an environment where you store data and run | | applications. An instance can contain multiple databases. | | | | [*] Create a DB2 Instance. [ Customize... ] | | | | An Administration Server provides services to support client tools that | | automate the configuration of connections to DB2 databases. | | | | [*] Create the Administration Server. [ Customize... ] | | | | | | [ OK ] [ Cancel ] [ Help ] | +------------------------------------------------------------------------------+ Figure 24. Create DB2 Services screen, snapshot 2. 50 DB2 UDB V5 with VA TC V3 9. From the "Administration Server" screen, accept the defaults, although you may want to change the password. Select OK and press enter. |+--- Administration Server --------------------------------------------------+| || || || Authentication: || || Enter User ID, Group ID and Password that will be used for || || the Administration Server. || || User Name [db2as ] || || User ID : : [*] Use default UID || || Group Name [db2asgrp] || || Group ID : : [*] Use default GID || || Password [ ] || || Verify Password [ ] [ Default ] || || || || Protocol: || || Select Customize to change the default [ Customize... ] || || communication protocol. || || || || Note: It is not recommended to use the DB2 Instance user ID for || || security reasons. || || || || [ OK ] [ Cancel ] [ Help ] || |+----------------------------------------------------------------------------+| Figure 25. Administration Server screen 10. A small subwindow will appear indicating that your host name will be assigned to the variable DB2SYSTEM. Press enter. || Group I+--- Notice -----------------------------------+default GID || || Passwor| | || || Verify | (!) DB2SYSTEM will be set to "oem-ppc3". |[ Default ] || || | | || || Protocol: | [ OK ] | || || Select +----------------------------------------------+tomize... || Figure 26. Notice screen about DB2SYSTEM Installation of DB2 for UNIX 51 11. You will be back to the "Create DB2 Services" screen. Select OK and press enter. 12. A Summary Report will be shown: +------------------------------- DB2 Installer --------------------------------+ | | | +-- Summary Report ----------------------------------------------------+ | | | | | | | DB2 Services Creation | | | | --------------------- | | | | | | | | DB2 Instance | | | | | | | | Group Name db2iadm1 | | | | User Name db2inst1 | | | | Password ibmdb2 | | | | Service Name db2cdb2inst1 | | | | Port Number 50000 | | | | Update DBM Configuration file for TCP/IP | | | | | | | | User-Defined Functions | | | | [ More... ] | | | +----------------------------------------------------------------------+ | | [ Continue ] | +------------------------------------------------------------------------------+ Figure 27. Summary Report screen for the configuration tasks 13. If the selections are not correct, press the F3 key to return to the previous screen. 14. If the selections are correct, select Continue and press enter. 52 DB2 UDB V5 with VA TC V3 15. Now you will see the following warning: | | +--- Warning -------------------------------------+ | | | | Adminis| | | | | | | (X) This is your last chance to stop. | | | | | Note: | | | | | | | Select OK to start, or Cancel to abort. | | | | | * The l| | | | | | | [ OK ] [ Cancel ] | | | | | +-------------------------------------------------+ | | Figure 28. Warning screen before configuring the DB2 instance Press enter to start the configuration. WARNING!: Because you have been pressing the enter key a lot, avoid pressing the enter key in the next subwindows, because then you will stop the configuration process! The temptation is really big to press that enter key! Resist the temptation! 16. You will see the "Configuring..." screen that will indicate the progress of the configuration. WARNING!: Because you have been pressing the enter key a lot, avoid pressing the enter key in the next subwindows, because then you will stop the configuration process! The temptation is really big to press that enter key! Resist the temptation! Wait for the installation to finish. | | +--- Configuring... ------------------------------+ | | | | Adminis| | | | | | | DB2 Instance | | | | | Note: | | | | | | | [ Cancel ] | | | | | +-------------------------------------------------+ | | Figure 29. Configuration progress screen Installation of DB2 for UNIX 53 17. When the installation process is completed, you will see the next window: | | Administration S+--- Notice --------------------+ | | | | | | | | | | Note: | Completed successfully. | | | | | | | | | | | * The log file i| [ OK ] | | | | | +-------------------------------+ | | Figure 30. Notice screen of completion of the configuration of instances. Press OK to see the next window with the Status Report. 18. When the installation is complete, use the Up or Down arrow keys to review the Status Report. Ensure that all the items have a status of "SUCCESS". Select OK to continue. 19. The DB2 Installer will perform some cleanup and then you will see the "DB2 Installer" screen. 20. Select Close from the "DB2 Installer" screen to terminate the DB2 Installer. Select OK to exit. If you encounter problems when creating DB2 instances by using DB2 Installer, then go to 2.6.6.3, "Manual methods to create DB2 instances in UNIX" on page 55. If this is the first time a DB2 Instance is created, then con- tinue with the post-installation tasks mentioned in 2.6.7, "Post- installation tasks" on page 58. If this is the subsequent creation of another DB2 Instance, then there is no need to perform the post-installation tasks. 54 DB2 UDB V5 with VA TC V3 2.6.6.3 Manual methods to create DB2 instances in UNIX In case you encounter problems with DB2 Installer, you can create DB2 instances by using the methods described below. The information shown in this section was extracted from the fol- lowing chapters from the DB2 Quick Beginnings for Unix: o Chapter 21. Other Methods to Install DB2 for AIX o Chapter 22. Other Methods to Install DB2 for HP-UX o Chapter 23. Other Methods to Install DB2 for Solaris The steps to create a DB2 instance in AIX are: 1. Create or assign groups and user IDs. See "Creating or Assigning Groups and User IDs." 2. Create a DB2 instance. See 8.2.2, "Using db2icrt to manually create DB2 instances" on page 107. 3. Create the Administration Server. See 9.3, "Creating the Administration Server" on page 113. Creating or Assigning Groups and User IDs: If you want to use an _________________________________________ existing user or group ID, you do not need to create new ones at this time. Instead, you can proceed to the next step. NOTE: You must perform this step as user root. 1. Create a system administration (SYSADM) group that will be the primary group of the user ID for the instance owner. Any user of the instance owner that belongs to the SYSADM group will have system administrator authority for a given instance. Then create a user ID that will be the instance owner. This user ID will be the name of the instance. Make this user's primary group the SYSADM group created above. In our exam- ples, the instance user ID is db2inst1 and the SYSADM group is db2iadm1. Dedicate the instance owner user ID to that instance's use only. That is, do not use this user ID also as the VisualAge TeamConnection family user ID. This allows for easier error recovery if a system error occurs. Use mkgroup to create groups, and mkuser to create users. For example, to create a user ID called db2inst1 which will use db2iadm1 as its primary group and use /home/db2inst1 as its home directory: o AIX Installation of DB2 for UNIX 55 Use SMIT to create the groups and user IDs, or you can issue the following commands: mkgroup db2iadm1 mkuser pgrp=db2iadm1 groups=db2iadm1 home=/home/db2inst1 db2inst1 passwd db2inst1 o HP-UX Use SAM to create the groups and user IDs, or you can issue the following commands: groupadd db2iadm1 useradd -g db2iadm1 -d /home/db2inst1 -m db2inst1 passwd db2inst1 o Solaris Use the AdminTool to create the groups and user IDs, or you can issue the following commands: groupadd db2iadm1 useradd -g db2iadm1 -d /export/home/db2inst1 -m db2inst1 passwd db2inst1 2. Create a group and user ID for Fenced User Defined Functions and Stored Procedures. Although this is not used by VisualAge TeamConnection, you must create it for the DB2 instance. For example: o AIX Use SMIT to create the groups and user IDs, or you can issue the following commands: mkgroup db2fadm1 mkuser pgrp=db2fadm1 groups=db2fadm1 home=/home/db2fenc1 db2fenc1 passwd db2fenc1 o HP-UX Use SAM to create the groups and user IDs, or you can issue the following commands: groupadd db2fadm1 useradd -g db2fadm1 -d /home/db2fenc1 -m db2fenc1 passwd db2fenc1 o Solaris Use the AdminTool to create the groups and user IDs, or you can issue the following commands: 56 DB2 UDB V5 with VA TC V3 groupadd db2fadm1 useradd -g db2fadm1 -d /export/home/db2fenc1 -m db2fenc1 passwd db2fenc1 For security reasons, we recommend that you do not use the instance name as the FencedID. 3. The creation of the Administration Server user ID is similar to the creation of a DB2 instance. For example, to create a user ID called db2as which will use db2asgrp as its primary group and use /home/db2as as its home directory: o AIX Use SMIT to create the groups and user IDs, or you can issue the following commands: mkgroup db2asgrp mkuser pgrp=db2asgrp groups=db2asgrp home=/home/db2as db2as passwd db2as o HP-UX Use SAM to create the groups and user IDs, or you can issue the following commands: groupadd db2asgrp useradd -g db2asgrp -d /home/db2as -m db2as passwd db2as o Solaris Use the AdminTool to create the groups and user IDs, or you can issue the following commands: groupadd db2asgrp useradd -g db2asgrp -d /export/home/db2as -m db2as passwd db2as Installation of DB2 for UNIX 57 2.6.7 Post-installation tasks ______________________________ 2.6.7.1 Apply the fixpak and interim fixes for DB2 UDB. It is necessary to apply the latest fixpak and interim fixes for DB2 UDB for your platform. For more details, see 1.5.3, "Applying fixes for DB2 Universal Database" on page 8. You will need to stop all the DB2 services. 2.6.7.2 Create a VisualAge TeamConnection family Now that you have created a DB2 Instance, you can create a VisualAge TeamConnection family. For details, see 5.0, "Creation of a family using the new DB2 Instance" on page 79. Then, after the family is created return to this section to continue with the post-installation tasks. If you are following the instructions to use a dedicated file system for the DB2 Instance and the VisualAge TeamConnection family, then proceed with the section 2.6.7.3, "Changing the own- ership and file permissions of the home directories" after you have created the VisualAge TeamConnection family user ID. 2.6.7.3 Changing the ownership and file permissions of the home directories If you are following the instructions to use a dedicated file system for both the DB2 Instance and the VisualAge TeamConnection family, then continue with this section after you have created the VisualAge TeamConnection family. Perform the following steps to change the ownership and the file permissions of the home directories in /home2, where the physical directories are located. 1. Login as root. 2. Verify the current settings in /home2, where the physical directories are located. cd /home2 ls -dl /home2/db2* ls -dl /home2/tcfamily 58 DB2 UDB V5 with VA TC V3 At this point, the owner should be root. If negative, that is, if the owners are the appropriate user IDs, then termi- nate this section now. 3. Modify the ownership: chown db2fenc1:db2fadm1 db2fenc1 chown db2inst1:db2iadm1 db2inst1 chown tcfamily:db2iadm1 tcfamily 4. If you want, you can modify the file permissions: chmod 755 db2fenc1 chmod 755 db2inst1 chmod 755 tcfamily 5. Verify the new settings; ensure that the owners are the appropriate user IDs. Notice that there is no need to modify the ownership of the sym- bolic links in /home. 2.6.7.4 Update the profile for the DB2 instances The default profiles that are used by the DB2 Instance and the DB2 Administration Server do not set the complete operating envi- ronment because the DB2 support group did not want to assume which UNIX shell was being used (such as Bourne/Korn or C, which have different syntax). Instead, you have to manually invoke an additional profile. However, in order to simplify the handling of the commands for the DB2 instances, we are suggesting the following change in the .profile to set up the complete environment automatically upon login (using the profile for the Korn shell): 1. Edit the .profile. 2. Add the following line after the line "export PATH": . ./sqllib/db2profile 3. Save and exit the .profile. NOTE: By the way, the DB2 Administration Server is a special DB2 instance; therefore, you may want to also make the change men- tioned above into its profile. Installation of DB2 for UNIX 59 2.6.7.5 Verify the DB2 configuration by creating the DB2 Sample database NOTE: text="Warning for Solaris". It is necessary to apply fixpak 4 (or later) for DB2 UDB for Solaris in order to overcome a problem (core dump) when issuing the command "db2sampl". For more details, see 1.5.3, "Applying fixes for DB2 Universal Data- base" on page 8. It is a good idea to create the DB2 Sample Database for the fol- lowing reasons: o To verify that you have installed and configured DB2 cor- rectly. o To practice your DB2 administration commands, such as backup and restore. In this way, you can experiment without the fear of damaging the real VisualAge TeamConnection database. o To have a practice database for the DB2 Control Center. To create the DB2 Sample database, do the following: 1. Login as the DB2 instance owner (such as db2inst1). 2. Enter the following from a command prompt to create the data- base with alias SAMPLE that will take around 10 MB of hard disk. Note that this command is standalone, and it does not work if you run it within the DB2 command line processor. $ db2sampl 3. This command may take a few minutes to process. There is no completion message, when the command prompt returns, the sample database has been created. To remove the DB2 Sample database, do the following as the instance owner: $ db2 drop database sample 2.6.7.6 Verify the license information in the nodelock file When DB2 is installed via the TeamConnection Installer utility (tcinst.ksh), the utility automatically updates the nodelock file in your system with the proper licensing information for DB2 UDB. Before doing the updating, the original nodelock file is copied to "nodelock.bk". In contrast, if you install DB2 UDB by itself, the proper licensing information is not automatically added to the nodelock file. In this case, the result is that when you manually stop 60 DB2 UDB V5 with VA TC V3 (db2stop) and restart (db2start) a DB2 instance you will see this warning message. Furthermore, after this "evaluation period", your DB2 instance will not start at all. SQL8007W There are "xx" day(s) left in the evaluation period ... In case you have this situation, in order to fix it, it is neces- sary to add the licensing information into the nodelock file (the following instructions When this information is added to the nodelock file, then there are no warning errors and the license will expire in the year 2047. o If you installed DB2 UDB as part of the installation of VisualAge TeamConnection, then the following action is per- formed to append the licensing information into the appro- priate nodelock file: AIX: mkdir -p /var/ifor touch /var/ifor/nodelock cat $CDROM/aix4/db2/db2/license/db2work.nod >> /var/ifor/nodelock HP-UX: mkdir -p /usr/netls touch /usr/netls/nodelock cat $CDROM/hpux10/db2/db2/license/db2work.nod >> /usr/netls/nodelock Solaris: mkdir -p /var/netls touch /var/netls/nodelock cat $CDROM/solaris/db2/db2/license/db2work.nod >> /var/netls/nodelock Where CDROM is the directory where you mounted the CD-ROM for TeamConnection. o If you purchase DB2 UDB and you install from its CD-ROMs, then you will need to follow the instructions mentioned on page 139 of the DB2 Quick Beginnings for UNIX manual. NOTE: In AIX, the file /usr/lib/netls/conf/nodelock is usually a symbolic link to /var/ifor/nodelock file. 2.7 WHAT TO DO NEXT Now that you have installed DB2 UDB and created the DB2 instances, these are some hints on what to do next: o Create a VisualAge TeamConnection family. See 5.0, "Creation of a family using the new DB2 Instance" on page 79. Installation of DB2 for UNIX 61 NOTE: At this point you will be ready to start using the newly created VisualAge TeamConnection family. o Configure the Control Center. See 5.0, "Creation of a family using the new DB2 Instance" on page 79. o Find out the DB2 tools to administer databases. See 7.0, "Administration of databases with DB2 tools" on page 99. o Learn how to work with the DB2 instances (see 8.0, "Working with DB2 Instances" on page 105) and the DB2 administration server (see 9.0, "Working with the DB2 Administration Server in UNIX" on page 113). 62 DB2 UDB V5 with VA TC V3 3.0 INSTALLATION OF DB2 FOR WINDOWS 3.1 OVERVIEW OF THIS CHAPTER When installing the family server of VisualAge TeamConnection, the TeamConnection installation utility will install too the nec- essary DB2 UDB code, by invoking in silent mode the DB2 installa- tion utility with a pre-defined response file. You will see several DB2 screens but you will not be able to interact with them. Thus, you will not have to manually install DB2 in your machine. However, just in case you had problems when installing DB2 from the VisualAge TeamConnection CD-ROMs or if you bought DB2 UDB and you decide to install it in your machine, the fol- lowing instructions are provided. After completing the installation of DB2 according to these instructions, you will have done the following: o Installed DB2 UDB Personal Edition, including the appropriate NLS related files and online documentation. o Created the appropriate groups and shortcuts. o Registered the DB2 Security Server, which you can start or stop by selecting it from the Services dialog: Start -> Set- tings -> Control Panel -> Services. o Updated the appropriate configuration files and the Windows registry. o Created a normal DB2 Instance; this is where the database for TeamConnection will be created later on by the TeamConnection Administration tool. o Created a DB2 Administrator Server (DAS) instance which is used to allow the remote administration by means of the DB2 Control Center running on an Intel workstation. o Installed the License Use Runtime code in the directory C:\ifor. This is needed to control the nodelock DB2 licenses. o Activated the DB2 First Steps following the first reboot after installation. o Created a DB2 Sample database. You can use this database as your sand box to practice some of the administration tasks, without affecting the database used by TeamConnection. Installation of DB2 for Windows 63 NOTE: The main DB2 installation actions are logged in the file C:\db2log\db2.log. Thus, in case of installation problems, take a look at this file for possible additional information. 3.2 PLANNING AND PREREQUISITES For more details on the planning for installation of DB2 UDB V5 in Windows NT, such as hardware and software requirements, consult Chapter 4 "Planning for Installation" of the DB2 Personal Edition Quick Beginnings manual. The hardware and software requirements for VisualAge TeamConnection already take into account the corresponding requirements for DB2 UDB, and they are described in the VisualAge TeamConnection Administrator's Guide. 3.2.1 What is the full path where DB2 is installed? ____________________________________________________ The full path (DB2_HOME) where DB2 will be installed is shown below. Thus, you need to ensure that you have enough available space in the appropriate disk units. WINDOWS 95 AND NT C:\SQLLIB 3.2.2 How much space will be used during the installation of _____________________________________________________________ DB2? ____ After performing the installation described in this document, the following disk space was actually used: o 10 MB in C:\DB2, for the Sample database. o 10 MB in C:\IFOR, for the handling of runtime nodelock licenses. o 130 MB in C:\SQLLIB, for the actual code and the 2 user IDs (the DB2 instance, and the DB2 Administrator Server instance). 64 DB2 UDB V5 with VA TC V3 3.3 UNINSTALLING OBJECTSTORE In case you have installed ObjectStore, the database used by VisualAge TeamConnection Version 2, then you could uninstall this database management system in order to recover disk space. You can uninstall ObjectStore after you have migrated your TeamConnection family from Version 2 to Version 3. To uninstall ObjectStore in Windows NT, do the following: 1. Ensure that the TeamConnection servers are not running. If they are running, then shut them down. 2. Ensure that the ObjectStore servers are not running. If so, then shut them down. 3. Select Start -> Settings -> Control Panel -> Add/Remove Pro- grams. 4. From the list of installed programs, select ObjectStore and click on Add/Remove button. 5. Reboot the workstation for the changes to the configuration files (registry) to take effect. 3.4 INSTALLATION STEPS To install the DB2 products on Windows NT, perform the following steps: 1. Identify and record parameter values. See 3.4.1, "Identify and record parameter values." 2. Create a DB2 administration ID: See 3.4.2, "Create a DB2 administration ID in Windows NT" on page 66. 3. Install DB2 UDB Personal Edition: See 3.4.3, "Install DB2 UDB Personal Edition in Windows NT" on page 67. 3.4.1 Identify and record parameter values ___________________________________________ After completing these installation instructions, these will be the values of all the appropriate parameters used during this procedure: NOTE: It is recommended that you change the passwords of the following DB2 user IDs. NOTE: The db2admin user id and password used in this document are ONLY for illustration purposes. You must create your own. The parameters for the normal DB2 instance are: Installation of DB2 for Windows 65 +---------------------------------------------------------------+ | Figure 31. Parameters for the DB2 Instance | +-------------------------------+-------------------------------+ | PARAMETER | DESCRIPTION | +-------------------------------+-------------------------------+ | Full path name | c:\sqllib | | | | +-------------------------------+-------------------------------+ | User Name | db2admin | | | | +-------------------------------+-------------------------------+ | Password | db2admin | | | | +-------------------------------+-------------------------------+ | TCP/IP Connection Service | db2cDB2 | | Name | | +-------------------------------+-------------------------------+ | TCP/IP Connection Port Number | 50000 | | | | +-------------------------------+-------------------------------+ | TCP/IP Interrupt Service Name | db2iDB2 | | | | +-------------------------------+-------------------------------+ | TCP/IP Interrupt Port Number | 50001 | | | | +-------------------------------+-------------------------------+ The parameters for the DB2 Administration Server (DAS) are: +---------------------------------------------------------------+ | Figure 32. Parameters for the DB2 Administration Server (DAS) | +-------------------------------+-------------------------------+ | PARAMETER | DESCRIPTION | +-------------------------------+-------------------------------+ | Full path name | c:\sqllib | +-------------------------------+-------------------------------+ | User Name | db2das00 | +-------------------------------+-------------------------------+ | TCP/IP service name | db2cDB2admi | +-------------------------------+-------------------------------+ | TCP/IP Port Number | 523 | +-------------------------------+-------------------------------+ 3.4.2 Create a DB2 administration ID in Windows NT ___________________________________________________ NOTE: The db2admin user id and password used in this document are ONLY for illustration purposes. You must create your own. You need to have a user name that will be used to install DB2. The user name must belong to the Administrators group, and also be a valid DB2 user name or have the "Act as part of the oper- ating system" advanced user right. 66 DB2 UDB V5 with VA TC V3 A valid DB2 user name is eight characters or less, and complies with DB2's naming rules. Thus, the usual Windows NT login of "Administrator" is NOT valid. For more information on DB2's naming rules, see Appendix A, "Naming restrictions for DB2 user IDs, group IDs, instances and databases" on page 117. To create a new user ID "db2admin" to install and administer DB2, do the following: 1. Login as Administrator. 2. Start -> Programs -> Administrative tools (common) -> User Manager 3. Create a user ID "db2admin" that belongs to the Administrator group. New User: use db2admin. By default it is ONLY a member of the "Users" group. In order to make it belong to the "Admin- istrators" group, do the following: a. Select the button "Groups" in the lower left corner. b. Specify that the new user should be part of the Adminis- trators group. 3.4.3 Install DB2 UDB Personal Edition in Windows NT _____________________________________________________ 1. Logoff as Administrator and login as db2admin. NOTE: The db2admin user id and password used in this docu- ment are ONLY for illustration purposes. You must create your own. 2. Shut down any other programs so that the setup program can update files as required. 3. Insert the CD-ROM (choose the one that is appropriate for you): o Insert the CD-ROM for VisualAge TeamConnection for Windows NT into the drive. From My Computer, click on the icon for the CD-ROM (name VATCV30), open the folder "dbfilesw" and click on "setup". o Insert the CD-ROM for DB2 UDB Personal Edition for Windows NT into the drive. The auto-run feature automat- ically starts the setup program. Installation of DB2 for Windows 67 If auto-run is disabled, then you can manually invoke the setup program as follows: a. Click on the Start button and select Run. b. Type the following in the Open field: x:\setup /i=LANGUAGE Where x: represents your CD-ROM drive LANGUAGE represents the two-character country code for your language (for example, EN for English). c. Select OK 4. The Welcome window opens. 5. Click on the Next button to open the Select Products window. 6. Select the following item and click on the Next button: DB2 Universal Database Personal Edition 7. Select Custom Install (I personally like to see what is going to be installed in my system and in which drive). It is suggested to accept: Graphical tools Documentation You can select a new disk drive where to install the code. Ensure that the directory name should be "SQLLIB". This is highly recommended because the DB2 documentation refers to it. Press Next. 8. In the "Select Start Options" window, it is recommended to accept to automatically start the DB2 instance and the Control Center at boot time: Automatically start the DB2 instance at boot time Automatically start the Control Center at boot time Press Next. 9. In the "Enter Username and Password" window, enter the username such as "db2admin" and its password. Notice that the username of "Administrator" will not work! 68 DB2 UDB V5 with VA TC V3 NOTE: The db2admin user id and password used in this docu- ment are ONLY for illustration purposes. You must create your own. 10. You may get the following warning message: Setup is unable to validate the password. Setup will continue using the user name and password provided. If you get it, just ignore it. I did not have any problems when I ignored it. 11. Respond to the setup program's prompts. Online help is available to walk you through the remaining steps. Invoke online help by clicking on the Help button at any time. You can click on the Cancel button at any time to end the installation. 12. After you install the product, you must reboot your work- station before you can begin to use it. Select a reboot option and click on the Finish button. This completes the installation phase. Continue with the configuration phase. 13. When your system restarts, log on with the "db2admin" user name. 14. The DB2 First Steps tool executes automatically (only after the first reboot when the installation is completed). Use First Steps to create the sample database. 15. (Optional) It is important to ensure that you can work with the SAMPLE database. From the DB2 First Steps, do the fol- lowing sequence: a. Log on to an administrative user ID. b. Create a SAMPLE database. c. View the SAMPLE database (which brings up the Command Center). d. Work with the SAMPLE database (from the Control Center). To invoke DB2 First Steps at a later time, do: Select Start -> DB2 for Windows NT -> First Steps 16. After installing DB2 you should run the following DB2 command to correctly set the cpuspeed that DB2 uses when calculating the optimal access plan for queries: Installation of DB2 for Windows 69 a. Start -> DB2 for Windows NT -> Command Line Processor b. Enter the following command: update dbm cfg using cpuspeed -1 3.4.3.1 Apply the fixpak and interim fixes for DB2 UDB. It is necessary to apply the latest fixpak and interim fixes for DB2 UDB for your platform. For more details, see 1.5.3, "Applying fixes for DB2 Universal Database" on page 8. You will need to stop all the DB2 services. Stop also the TME service, to avoid the following problem: DB2 is currently running and therefore cannot be updated. Stop the DB2 processes and try again. 3.5 WHAT TO DO NEXT Now that you have installed DB2 UDB and created the DB2 instances, these are some hints on what to do next: o Create a VisualAge TeamConnection family. See 5.0, "Creation of a family using the new DB2 Instance" on page 79. NOTE: At this point you will be ready to start using the newly created VisualAge TeamConnection family. o Configure the Control Center. See 5.0, "Creation of a family using the new DB2 Instance" on page 79. o Find out the DB2 tools to administer databases. See 7.0, "Administration of databases with DB2 tools" on page 99. o Learn how to work with the DB2 instances. See 8.0, "Working with DB2 Instances" on page 105. 70 DB2 UDB V5 with VA TC V3 4.0 INSTALLATION OF DB2 FOR OS/2 4.1 OVERVIEW OF THIS CHAPTER NOTE: When installing the family server of VisualAge TeamConnection, the TeamConnection installation utility will install too the necessary DB2 UDB code, by invoking in silent mode the DB2 installation utility with a pre-defined response file. You will see several DB2 screens but you will not be able to interact with them. Thus, you will not have to manually install DB2 in your machine. However, just in case you had prob- lems when installing DB2 from the VisualAge TeamConnection CD-ROMs or if you bought DB2 UDB and you decide to install it in your machine, the following instructions are provided. After completing the installation of DB2 according to these instructions, you will have done the following: o Installed DB2 UDB Personal Edition, including the appropriate NLS related files and online documentation. o Created the appropriate folders. o Updated the appropriate configuration files. o Created a normal DB2 Instance; this is where the database for TeamConnection will be created later on by the TeamConnection Administration tool. o Created a DB2 Administrator Server (DAS) instance which is used to allow the remote administration by means of the DB2 Control Center running on an Intel workstation. o Installed the License Use Runtime code in the directory C:\ifor. This is needed to control the nodelock DB2 licenses. o Activated the DB2 First Steps following the first reboot after installation. o Created a DB2 Sample database. You can use this database as your sand box to practice some of the administration tasks, without affecting the database used by TeamConnection. NOTE: The main DB2 installation actions are logged in the file C:\db2log\db2.log. Thus, in case of installation problems, take a look at this file for possible additional information. Installation of DB2 for OS/2 71 4.2 PLANNING AND PREREQUISITES For more details on the planning for installation of DB2 UDB V5 in OS/2, such as hardware and software requirements, consult Chapter 4 "Planning for Installation" of the DB2 Personal Edition Quick Beginnings manual. The hardware and software requirements for VisualAge TeamConnection already take into account the corresponding requirements for DB2 UDB, and they are described in the VisualAge TeamConnection Administrator's Guide. 4.2.1 What is the full path where DB2 is installed? ____________________________________________________ The full path (DB2_HOME) where DB2 will be installed is shown below. Thus, you need to ensure that you have enough available space in the appropriate disk units. OS/2 C:\SQLLIB 4.2.2 How much space will be used during the installation of _____________________________________________________________ DB2? ____ After performing the installation described in this document, the following disk space was actually used: o 10 MB in C:\DB2, for the Sample database. o 10 MB in C:\IFOR, for the handling of runtime nodelock licenses. o 130 MB in C:\SQLLIB, for the actual code and all the 2 user IDs (the DB2 instance, and the DB2 Administrator Server instance). 4.3 UNINSTALLING OBJECTSTORE In case you have installed ObjectStore, the database used by VisualAge TeamConnection Version 2, then you could uninstall this database management system in order to recover disk space. You can uninstall ObjectStore after you have migrated your TeamConnection family from Version 2 to Version 3. To uninstall ObjectStore in OS/2, do the following: 1. Ensure that the TeamConnection servers are not running. If they are running, then shut them down. 72 DB2 UDB V5 with VA TC V3 2. Ensure that the ObjectStore servers are not running. If so, then shut them down. a. Open "ObjectStore for OS/2" folder, select "ObjectStore setup". b. Select "Shutdown Services". c. Select "Uninstall". 3. After the code is uninstalled, do the following: cd c:\ostore\bin del ossetup.exe del oscp437.dll cd \ rmdir c:\ostore\bin rmdir c:\ostore 4. Reboot for the changes in CONFIG.SYS to be refreshed. 4.4 INSTALLATION STEPS To install the DB2 products on OS/2, perform the following steps: 1. Identify and record parameter values. See 4.4.1, "Identify and record parameter values." 2. Create a DB2 administration ID: See 4.4.2, "Create a DB2 administration ID in OS/2" on page 74. 3. Install DB2 UDB Personal Edition: See 4.4.3, "Install DB2 UDB Personal Edition in OS/2" on page 76. 4.4.1 Identify and record parameter values ___________________________________________ After completing these installation instructions, these will be the values of all the appropriate parameters used during this procedure: NOTE: It is recommended that you change the passwords of the following DB2 user IDs. NOTE: The db2admin user id and password used in this document are ONLY for illustration purposes. You must create your own. The parameters for the normal DB2 instance are: Installation of DB2 for OS/2 73 +---------------------------------------------------------------+ | Figure 33. Parameters for the DB2 Instance | +-------------------------------+-------------------------------+ | PARAMETER | DESCRIPTION | +-------------------------------+-------------------------------+ | Full path name | c:\sqllib | +-------------------------------+-------------------------------+ | User Name | db2admin | +-------------------------------+-------------------------------+ | Password | db2admin | +-------------------------------+-------------------------------+ | TCP/IP Connection Service | db2cDB2 | | Name | | +-------------------------------+-------------------------------+ | TCP/IP Connection Port Number | 50000 | | | | +-------------------------------+-------------------------------+ | TCP/IP Interrupt Service Name | db2iDB2 | | | | +-------------------------------+-------------------------------+ | TCP/IP Interrupt Port Number | 50001 | | | | +-------------------------------+-------------------------------+ The parameters for the DB2 Administration Server (DAS) are: +---------------------------------------------------------------+ | Figure 34. Parameters for the DB2 Administration Server (DAS) | +-------------------------------+-------------------------------+ | PARAMETER | DESCRIPTION | +-------------------------------+-------------------------------+ | Full path name | c:\sqllib | +-------------------------------+-------------------------------+ | User Name | db2das00 | +-------------------------------+-------------------------------+ | TCP/IP service name | db2cDB2admi | +-------------------------------+-------------------------------+ | TCP/IP Port Number | 523 | +-------------------------------+-------------------------------+ 4.4.2 Create a DB2 administration ID in OS/2 _____________________________________________ NOTE: The db2admin user id and password used in this document are ONLY for illustration purposes. You must create your own. Before you begin the installation, be sure that you have the proper user ID and password. This user ID should have a local administrator or administrator authority in the User Profile Man- agement (UPM). The DB2 Administration Server uses this user ID to log on when it is started. 74 DB2 UDB V5 with VA TC V3 o If UPM is installed, then this user ID should have the authorities mentioned above. If necessary, create a user ID with these characteristics. See 4.4.2.1, "Setup of UPM" for the setup of UPM. o If UPM is not installed, DB2 will install it, and the user ID and password entered will be used to create a user ID with the correct authorities. o If you have LAN NetBIOS already installed, do the following to ensure that you will be able to logon after the installa- tion: 1. From an OS/2 command prompt, logoff from any possible LAN connection: c:> logoff 2. Do a logon to the LOCAL LAN domain and specify your user ID and password: c:> logon userid /p:password Where the userid and password values are the appropriate ones for your situation. WARNING: If you cannot login to your LOCAL LAN domain, then STOP! You really need to fix this problem before you install DB2. If it is not fixed, then you CANNOT use DB2 at all. 4.4.2.1 Setup of UPM NOTE: The db2admin user id and password used in this document are ONLY for illustration purposes. You must create your own. The UPM Services are located in: "OS/2 System" -> "System Setup" -> "UPM Services". Follow DB2 Personal Edition Quick Beginnings, Chapter 13, to use UPM for the first time. NOTE: If c:\muglib\accounts does not exist, then c:\ibmlan\accounts\net.acc will be used. Installation of DB2 for OS/2 75 4.4.3 Install DB2 UDB Personal Edition in OS/2 _______________________________________________ 1. Logon to the LAN as the user that will have the DB2 adminis- tration duties, such as db2admin. 2. Shut down any other programs so that the setup program can update files as required. 3. Insert the CD-ROM (choose the one that is appropriate for you): o Insert the CD-ROM for VisualAge TeamConnection for OS/2 Warp into the drive. Open an OS/2 window and set the drive to x:, where x is the letter that represents your CD-ROM drive. o Enter the command: x:\dbfileso\db2\os2\LANGUAGE\install\install.exe Where x: represents your CD-ROM drive LANGUAGE represents the two-character country code for your language (for example, EN for English). o Insert the CD-ROM for DB2 UDB Personal Edition for Windows NT into the drive. Open an OS/2 window and set the drive to x:, where x is the letter that represents your CD-ROM drive. o Enter the command: x:\db2\LANGUAGE\install\install.exe Where x: represents your CD-ROM drive LANGUAGE represents the two-character country code for your language (for example, EN for English). 4. The "IBM DB2 for OS/2 Version 5 Installation" dialog opens. 5. Select the following item: DB2 Universal Database Personal Edition Once you select the option, then the "Operation Type" label "Install" will be enabled. Click on the button "Continue". 6. Answer the question if you want the installation program to Update your config.sys file. 76 DB2 UDB V5 with VA TC V3 7. The Install - Directories window provides a list of the com- ponents to install. It is suggested to accept: Universal Database Personal Edition Graphical tools Control Center Documentation You can select a new disk drive where to install the code. Ensure that the directory should be "SQLLIB". This is highly recommended because the DB2 documentation refers to it. Then press Next. 8. It is recommended to answer "Yes" to the question on auto- start Control Center. 9. The Specify System Name window opens. Specify the System Name for your host, which should be unique. 10. The Enter User ID and Password window opens. Use this to enter the user ID and password that will be used to log on and start the Administration Server each time your system is initialized. NOTE: The db2admin user id and password used in this docu- ment are ONLY for illustration purposes. You must create your own. 11. The DB2 components are now installed on your system. 12. After you install the product, you must reboot your work- station before you can begin to use it. Select a reboot option and click on the Finish button. This completes the installation phase. Continue with the configuration phase. 13. When your system restarts, log on with the "db2admin" user name. 14. The DB2 First Steps tool executes automatically (only after the first reboot when the installation is completed). Use First Steps to create the sample database. 15. (Optional) It is important to ensure that you can work with the SAMPLE database. From the DB2 First Steps, do the fol- lowing sequence: a. Log on to an administrative user ID. Installation of DB2 for OS/2 77 b. Create a SAMPLE database. c. View the SAMPLE database (which brings up the Command Center). d. Work with the SAMPLE database (from the Control Center). To invoke DB2 First Steps at a later time, do: Search for the folder "DB2 for OS/2", then open it and click on the icon "First Steps". 16. After installing DB2 you should run the following DB2 command to correctly set the cpuspeed that DB2 uses when calculating the optimal access plan for queries: db2 "update dbm cfg using cpuspeed -1" 4.4.3.1 Apply the fixpak and interim fixes for DB2 UDB. It is necessary to apply the latest fixpak and interim fixes for DB2 UDB for your platform. For more details, see 1.5.3, "Applying fixes for DB2 Universal Database" on page 8. You will need to stop all the DB2 services. 4.5 WHAT TO DO NEXT Now that you have installed DB2 UDB and created the DB2 instances, these are some hints on what to do next: o Create a VisualAge TeamConnection family. See 5.0, "Creation of a family using the new DB2 Instance" on page 79. NOTE: At this point you will be ready to start using the newly created VisualAge TeamConnection family. o Configure the Control Center. See 5.0, "Creation of a family using the new DB2 Instance" on page 79. o Find out the DB2 tools to administer databases. See 7.0, "Administration of databases with DB2 tools" on page 99. o Learn how to work with the DB2 instances. See 8.0, "Working with DB2 Instances" on page 105. 78 DB2 UDB V5 with VA TC V3 5.0 CREATION OF A FAMILY USING THE NEW DB2 INSTANCE 5.1 OVERVIEW OF THIS CHAPTER NOTE: In order to create the DB2 database of a VisualAge TeamConnection family, it is necessary to have at least 100 MB of free disk space in the file system where the DB2 instance resides. After a DB2 instance has been created (see 2.6.6.2, "Creating the DB2 Instances" on page 44), you can create a VisualAge TeamConnection family which in turn will create a DB2 database using that DB2 instance. +--- NOTE ABOUT THE PRIMARY GROUP ID FOR THE FAMILY ------------+ | | | In the UNIX environment, in order for the DB2 instance to | | allow the creation of the DB2 database by the VisualAge | | TeamConnection family, the primary group ID of the instance | | (such as the default db2iadm1) MUST be either the primary | | group ID or part of the group set for the family user ID. | | | | If the family user ID does not have the proper group ID then | | when trying to create the family by using tcadmin (or the | | sample utility "dbcreate"), you will get a DB2 error message | | saying that you do not have enough authority to create a | | database. | | | +---------------------------------------------------------------+ If you want to use a dedicated file system for both the DB2 instance and the VisualAge TeamConnection family, see 2.6.2, "(Optional) Create a file system for the DB2 instance and TC family" on page 21. You can perform the following sequence to create the VisualAge TeamConnection family: 1. Ensure that you have installed the auxiliary software for VisualAge TeamConnection: o Acrobat Reader for PDF files. o Java for tcadmin and tcmerge. o Netscape Navigator for displaying the online help. For details, see 5.2, "Using tcadmin to create the family database" on page 81. Creation of a family using the new DB2 Instance 79 2. Create the user ID for the family. See 5.3, "Creation of the user ID for the family" on page 81. If you are following the instructions for a dedicated file system, then you will need to change the ownership and the file permissions for the home directories, as shown in 2.6.7.3, "Changing the ownership and file permissions of the home directories" on page 58. 3. Copy and customize the sample profile, teamcv3x.ini and local Teamcgui file. See 5.4, "Customization of local files (profile, teamcv3x.ini and Teamcgui)" on page 82 4. Use the tcadmin tool to create the database for the family. See 5.5, "Using tcadmin to create the family database" on page 83. The parameters used in this TR for the sample VisualAge TeamConnection family are: +---------------------------------------------------------------+ | Figure 35. Parameters for the sample VisualAge TeamConnection | | family | +-------------------------------+-------------------------------+ | PARAMETER | DESCRIPTION | +-------------------------------+-------------------------------+ | Full path name | /home/tcfamily | +-------------------------------+-------------------------------+ | User Name | tcfamily | +-------------------------------+-------------------------------+ | UID | System-generated UID | +-------------------------------+-------------------------------+ | Group Name | db2iadm1 | +-------------------------------+-------------------------------+ | GID | System-generated GID | +-------------------------------+-------------------------------+ | Group Set | db2asgrp,staff | +-------------------------------+-------------------------------+ | Password | | +-------------------------------+-------------------------------+ | TCP/IP Port Number | 4567 | +-------------------------------+-------------------------------+ For more details on how to create group IDs and user IDs, and how to update the hosts and services files, see the technical report "VisualAge TeamConnection Version 3: how to do routine operating system tasks". 80 DB2 UDB V5 with VA TC V3 5.2 USING TCADMIN TO CREATE THE FAMILY DATABASE Ensure that you have installed the auxiliary software for VisualAge TeamConnection: o Acrobat Reader for PDF files. o Java for tcadmin and tcmerge. o Netscape Navigator for displaying the online help. For details, see 1.5, "Important information about installation for TeamConnection and DB2" on page 6. If you do not install Java, then you cannot use the VisualAge TeamConnection Family Administration GUI (tcadmin). 5.3 CREATION OF THE USER ID FOR THE FAMILY It is necessary to manually create a user ID for the VisualAge TeamConnection family: 1. Login as root. 2. Use the appropriate administration tool from your platform to create a user. +--- NOTE ABOUT THE PRIMARY GROUP ID FOR THE FAMILY --------+ | | | In the UNIX environment, in order for the DB2 instance to | | allow the creation of the DB2 database by the VisualAge | | TeamConnection family, the primary group ID of the | | instance (such as the default db2iadm1) MUST be either | | the primary group ID or part of the group set for the | | family user ID. | | | | If the family user ID does not have the proper group ID | | then when trying to create the family by using tcadmin | | (or the sample utility "dbcreate"), you will get a DB2 | | error message saying that you do not have enough | | authority to create a database. | | | +-----------------------------------------------------------+ 3. In this TR, it is assumed that the user ID that is created is tcfamily and its primary group ID is db2iadm1. You can login into the new user ID and issue the following command to verify its settings: $ id The output should look like this: Creation of a family using the new DB2 Instance 81 uid=237(tcfamily) gid=250(db2iadm1) In case the primary id of the DB2 instance is not the primary id of the user for the family but it is part of its group set, then the output of the "id" command, should look like this: uid=237(tcfamily) gid=1(staff) groups=250(db2iadm1) 4. Modify the /etc/hosts file and add the family name in the entry for the desired host, such as: 9.12.345.678 oem-ppc3 tcfamily 5. Modify the /etc/services file and add the port number for the family, such as: tcfamily 4567/tcp # VisualAge TeamConnection family If you are following the instructions for a dedicated file system, then you will need to change the ownership and the file permissions for the home directories, as shown in 2.6.7.3, "Changing the ownership and file permissions of the home directo- ries" on page 58. 5.4 CUSTOMIZATION OF LOCAL FILES (PROFILE, TEAMCV3X.INI AND TEAMCGUI) For the steps in this section, please notice the values for the following variables: o $TC_HOME is by default located in: AIX /usr/teamc HP-UX /opt/teamc SOLARIS /opt/teamc o $LANG is the national language, such as en_US for English in the USA. After the user ID has been created, copy and customize the fol- lowing set of files. 1. Login as the user ID for the family. 2. Copy the file that has the initial data for the Tasks window: cp $TC_HOME/nls/cfg/$LANG/teamcv3x.ini $HOME/. chmod u+w $HOME/teamcv3x.ini 82 DB2 UDB V5 with VA TC V3 3. (Optional) If you would like to customize your fonts, copy the sample local Motif resource file: cp $TC_HOME/nls/cfg/$LANG/Teamcgui.user $HOME/Teamcgui chmod u+w $HOME/Teamcgui 4. Copy the sample profile for a family: mv $HOME/.profile $HOME/.profile.original cp $TC_HOME/install/$LANG/profile.family $HOME/.profile chmod u+w $HOME/.profile You need to customize your new profile. Please see the instructions in the header of the file. 5. After you customize your profile, log out of your user ID and log in again in order to ensure that you will be working from a fresh environment. It is NOT a good idea to cut corners and just simply execute the profile again. There are some variables, such as PATH, that append the new value to the previous value, and thus, you will not have a fresh environment to work with. 5.5 USING TCADMIN TO CREATE THE FAMILY DATABASE In this section, a new VisualAge TeamConnection family will be created using the default settings. Only the required values that do not have defaults will be entered in this example. 1. Login as root. 2. Modify the hosts and services files to add the new family. In /etc/hosts, find the entry for your host, and add an alias for the family name, such as: 9.37.199.98 oem-ppc3 tcfamily In /etc/services, add a new entry with a port number that is not currently assigned to another service, such as: tcfamily 3420/tcp 3. Login into the family user ID. 4. In UNIX, ensure that your DISPLAY variable is setup to the proper X server. o From a local host, you can use shared memory, which will be faster: Creation of a family using the new DB2 Instance 83 Using Korn shell: export DISPLAY=:0.0 Using Bourne shell: DISPLAY=:0.0 export DISPLAY In Bourne shell you cannot combine the definition and the export in the same statement. The rest of this document will show only the syntax in Korn shell. o From remote hosts, if you are logged into a host A, then telnet to another host B, you need to use sockets (which are slower than shared memory): export DISPLAY=hostName:0.0 It is important to note that the terminal where the window will be actually displayed (host A) needs to allow the use of the X server, by doing the following in host A: xhost + NOTE: If this DISPLAY variable is not properly set, the actual tcadmin window will not be displayed in your terminal (it will be displayed in someone else's terminal). 5. In Unix, ensure that you can display correctly a X Windows application. You can try the following harmless application that will display a clock in a window (as a background process): xclock & +--- IF YOU DO NOT SEE THE XCLOCK WINDOW, THEN STOP! -------+ | | | If you do not see the xclock window, then STOP! This | | means that your DISPLAY variable is not setup correctly, | | and that you will NOT see the window from the tcadmin | | tool. | | | | You will need to fix the DISPLAY variable or issue the | | xhosts command to properly display an X Windows applica- | | tion. If you are still having problems, consult your | | Unix manuals or local help desk. | | | +-----------------------------------------------------------+ 6. To invoke the VisualAge TeamConnection Administration tool issue the command: tcadmin 84 DB2 UDB V5 with VA TC V3 NOTES: a. In case of problems during the creation of the family, you can specify to create the file tcadmin.log that will contain the commands that tcadmin is using: tcadmin -log b. To monitor the commands that are being written in tcadmin.log, issue the following command: tail -f tcadmin.log You need to press Ctrl+C to terminate this monitoring task. 7. If this is the first time this tool is invoked, then it will display a message saying that the settings file ($HOME/tcadmin.ini) could not be found. Just press OK to acknowledge this warning. 8. If you get the following error message: Unable to identify the directory containing the files required by tcadmin. Please verify your NLSPATH or use the -f parameter. Then press OK to exit. This error message is intermittent and so far, we have not found the cause. The workaround is to exit and start tcadmin again. 9. You will see the "TeamConnection Family Administrator" window. Select File -> Create Family. 10. In the "Untitled - Properties" dialog, enter the new fol- lowing information Name: tcfamily Path: /home Port: 3420 Password: The tcadmin tool will use a physical directory that is the concatenation of the values of the "Path" field + the appro- priate directory separator + the "Name" field, such as the UNIX sample "/home" + "/" + "tcfamily" = "/home/tcfamily". Based on this behavior, do not use the $HOME directory as the value for the Path field (such as /home/tcfamily), because Creation of a family using the new DB2 Instance 85 tcadmin will append the Name field (such as tcfamily) and use /home/tcfamily/tcfamily (which is rather cumbersome). 11. Click on the OK button to start the process to create your family. This should take less than one hour. You will see an information message that will indicate that the VisualAge TeamConnection family and its database were successfully created. NOTE: If after one hour tcadmin has not finished with the creation of family, then it is likely that there is not enough available space in the file system where the DB2 instance is located (the default is /home). If this is the case, kill the tcadmin process, drop the DB2 family database (issue "db2 drop database tcfamily"), expand the file system and try tcadmin again. 12. To start the family servers (teamcd and notifyd) and the activity monitor tool, select the family from the main tcadmin window, then click on Family in the menu bar and the "Family Servers" window will appear. 13. Click on the button "Start Both Servers" located in the lower right corner, to start all the servers. 14. Minimize the "Family Services" window, if you want. If you intend to work with your family, do not close this window, because if you close it, tcadmin will stop the servers. 5.6 DB2 CONFIGURATION PARAMETERS WHEN CREATING A FAMILY When using tcadmin to create a VisualAge TeamConnection family, the corresponding DB2 database is created by the TeamConnection utility "fhcirt" which sets the following Database Configuration parameters to non-default values to improve database performance and functionality. This is the list of values at the time this technical report was written: o All platforms: logfilsiz = 4000 applheapsz = 1280 logprimary = 5 logsecond = 30 buffpage = 12000 dlchktime = 1000 o Solaris: dbheap = 2400 86 DB2 UDB V5 with VA TC V3 o Intel: dbheap = 600 catalogcache_sz = 32 maxappls = 40 locklist = 50 app_ctl_heap_sz = 128 NOTE: This is an attempt to document these non-default values, however, due to our testing and experience, we may change the actual values that are used during the creation of a database. In short, the above list might be obsolete. 5.7 WHAT TO DO NEXT Now that you have created a VisualAge TeamConnection family, these are some hints on what to do next: o At this point you will be ready to start using the newly created VisualAge TeamConnection family. o Configure the Control Center. See 6.0, "Configuring the Control Center to control remote UNIX databases" on page 89. o Find out the DB2 tools to administer databases. See 7.0, "Administration of databases with DB2 tools" on page 99. o Learn how to work with the DB2 instances. See 8.0, "Working with DB2 Instances" on page 105. o For Unix, you can learn how to work with the DB2 adminis- tration server. See 9.0, "Working with the DB2 Adminis- tration Server in UNIX" on page 113. Creation of a family using the new DB2 Instance 87 88 DB2 UDB V5 with VA TC V3 6.0 CONFIGURING THE CONTROL CENTER TO CONTROL REMOTE UNIX DATABASES 6.1 OVERVIEW OF THIS CHAPTER In order to be ready to proceed to the next chapter, 7.0, "Admin- istration of databases with DB2 tools" on page 99, it is neces- sary to configure the Control Center in an Intel workstation to be able to control remote databases in a UNIX server. The struc- ture of the chapter is as follows: o The relationship between the Control Center and the Adminis- tration Server is shown in 6.2, "Relationship between Control Center and Administration Server." o If you do not have already the DB2 GUI Tools installed in an Intel workstation, then proceed to 6.3, "Installing the DB2 GUI Tools" on page 91. o If you already installed the DB2 GUI Tools in an Intel work- station, then proceed to 6.4, "Configuring the DB2 Control Center" on page 94. 6.2 RELATIONSHIP BETWEEN CONTROL CENTER AND ADMINISTRATION SERVER The relationship between the DB2 Control Center and the DB2 Administration Server is shown in Figure 36 on page 90. Configuring the Control Center to controdatabasesUN89 +------------------+ +----------------------------------+ | DB2 | | +-----------------------------+ | | Control |<--------->| DB2 Administration Server | | | Center | (1) | | It is always port 523 | | +------------------+ | +------+----------------------+ | | | (2) | | +------|----------+ | | | DB2 Instance | | | | | (3) | | | | +-----------+ | | | | | DB2 | | | | | | Database | | | | | +-----------+ | | | +-----------------+ | +----------------------------------+ Figure 36. Relationship between Control Center and Administration Server The DB2 Control Center so far is available only on Intel plat- forms. On the other hand, the DB2 Administration Server is available on all platforms. You can use the DB2 Control Center to control local or remote DB2 instances and DB2 databases. In fact, the DB2 Control Center needs to interact with DB2 Administration Server in order to sub- sequently interact with the DB2 instances known to the Adminis- tration Server, and the DB2 databases controlled by those DB2 instances. In other words, the DB2 Control Center cannot commu- nicate directly with remote DB2 instances or DB2 databases: all communications need to be done through the DB2 Administration Server. You need to perform the following sequence from the DB2 Control Center in order to communicate with a DB2 instance (and its DB2 databases). The numbers in Figure 36 correspond to each step in the sequence. 1. From the DB2 Control Center, select a system, and then you have to "attach" to the DB2 Administration Server by pro- viding the user ID (the default is "db2as") and the password (the default is "ibmdb2"). 2. After you are attached to the DB2 Administration Server, expand the icon for the system, select the desired instance, and then you have to "attach" to the DB2 instance by pro- viding the user ID (the default is "db2inst1") and the pass- word (the default is "ibmdb2"). 3. After you are attached to the DB2 instance, expand the icon for the instance, select the desired database, and then you have to "connect" to the desired DB2 database. At this time, 90 DB2 UDB V5 with VA TC V3 by default, there is no need to provide another user ID or password. 6.3 INSTALLING THE DB2 GUI TOOLS This section describes how to install the DB2 GUI Tools in an Intel workstation. This section is targeted for those users who have VisualAge TeamConnection servers installed in UNIX workstations but do not have VisualAge TeamConnection servers installed in an Intel work- station. In case you have installed VisualAge TeamConnection Version 3 in UNIX, you can still install the DB2 GUI Tools in an Intel work- station if you have access to one. These DB2 GUI Tools are part of the DB2 Client Application Enabler (CAE) component of DB2 Uni- versal Database for the Intel platforms. In case it is not feasible to install only the DB2 CAE component from the CD-ROMs provided with VisualAge TeamConnection, you can download the DB2 CAE code, by selecting the item Client Applica- tion Enablers from the IBM DB2 Service and Support web page at: http://www.software.ibm.com/data/db2/db2tech Follow the installation instructions for DB2 on Windows NT (see 3.0, "Installation of DB2 for Windows" on page 63) or for DB2 on OS/2 (see 4.0, "Installation of DB2 for OS/2" on page 71) for details on how to install DB2 from CD-ROM in your platform. However, a simplified version is shown in the next subsections. If you do not want to install the complete "DB2 UDB Personal Edition", you can specify to install only the "DB2 Client Appli- cation Enabler". Be sure to select to install the DB2 GUI Tools and the online Documentation. After the installation of the DB2 Client Application Enabler (CAE), you will have the following: o DB2 CAE installed in the C:\SQLLIB directory. o The GUI Control Center and the Documentation will also be installed. Configuring the Control Center to controdatabasesUN91 6.3.1 Installing the Client Application Enabler in Windows NT ______________________________________________________________ Install the Client Application Enabler as follows: 1. Start -> Settings -> Control Panel -> Add/Remove Programs 2. Click on Install. 3. Specify: x:\SETUP.EXE (where x: is your CD-ROM drive) Click on Finish. 4. At the "Welcome" window, click on Next. 5. At the "Enable Remote Administration" window, select the checkbox "Install components required to administer remote servers". 6. At the "Select Installation Type" window, select Custom. 7. At the "Select DB2 Components" window, ensure that you select ALL of the following components (they are all selected by default): o Graphical Tools, which in turn has 2 subcomponents: - Control Center - Client Configuration Assistant o Documentation (you may select the desired subcomponents). 8. At the "Select DB2 Components" window, verify that the default disk drive is the one that you want to select. It is strongly recommended to keep the directory name SQLLIB, because the documentation refers to it frequently. 9. At the "Select Start Options" window, you can decide if the Control Center is started automatically at boot time. A shortcut icon is added into the Startup folder; later on you could remove this icon from the folder in order to not start the Control Center at boot time. 10. At the "Customize NetBIOS" windows, you may decide to select on the check box for NetBios and look at the predefined Prop- erties. This could be useful if you install DB2 UDB V5 on an Intel workstation later on. 11. At the "Start Copying Files" you will have the last opportu- nity to review/update/cancel the installation. Once you are totally sure, then click on Install. 92 DB2 UDB V5 with VA TC V3 12. Continue with 6.4, "Configuring the DB2 Control Center" on page 94. 6.3.2 Installing the Client Application Enabler in OS/2 ________________________________________________________ Install the Client Application Enabler as follows: 1. Logon as db2admin. 2. Shut down any other programs so that the setup program can update files as required. 3. Insert the CD-ROM into the drive. 4. Open an OS/2 windows and set the drive to x:, where x is the letter that represents your CD-ROM drive. 5. Enter the command: x:\db2\language\install Where x: represents your CD-ROM drive LANGUAGE represents the two-character country code for your language (for example, EN for English). 6. The "IBM DB2 for OS/2 Version 5 Installation" dialog opens. 7. Select the following item: DB2 Client Application Enabler Once you select the option, then the "Operation Type" label "Install" will be enabled. Click on the button "Continue". 8. Answer the question if you want the installation program to Update your config.sys file. 9. The Install - Directories window provides a list of the com- ponents to install. It is suggested to accept: Graphical tools Client Configuration Assistant Documentation You can select a new disk drive where to install the code. Please keep the directory "SQLLIB". Configuring the Control Center to controdatabasesUN93 Then press Next. 10. It is recommended to answer "Yes" to the question on auto- start Control Center. 11. The Specify System Name window opens. Specify the System Name for your host, which should be unique. 12. The DB2 components are now installed on your system. 13. After you install the product, you must reboot your work- station before you can begin to use it. Select a reboot option and click on the Finish button. This completes the installation. 14. When your system restarts, log on with the "db2admin" user name. 15. Continue with 6.4, "Configuring the DB2 Control Center." 6.4 CONFIGURING THE DB2 CONTROL CENTER This section describes how to configure the UNIX server to allow the remote control of DB2 databases from a DB2 Control Center in an Intel workstation. You need to perform the following tasks: 1. Setup of the UNIX Server. See 6.4.1, "Setup of the UNIX Server." 2. Setup of the Intel workstation. See 6.4.2, "Setup of the Intel workstation (adding a remote system)" on page 96. 6.4.1 Setup of the UNIX Server _______________________________ If you used "db2setup" to setup the DB2 Instance and the DB2 Administration Server, then everything is already setup for you. If you did not create the DB2 Administration Server, then you should create it by using the DB2 Installer. See 9.3, "Creating the Administration Server" on page 113 for similar information, but instead of requesting to create a normal DB2 Instance, select to create a DB2 Administration Server instance. You can perform the following tasks to verify that the setup in UNIX is correct: 1. Login as the DB2 instance owner. 94 DB2 UDB V5 with VA TC V3 2. Verify the TCP/IP Connection Service name (SVCENAME) for the DB2 instance by doing the following: $ db2 get dbm cfg | grep SVCENAME TCP/IP Service name (SVCENAME) = db2cdb2inst1 3. Verify the TCP/IP connection service name and port number for the DB2 instance are defined in the /etc/services file by doing the following. Use the value for SVCENAME obtained in previous step: $ grep db2cdb2inst1 /etc/services db2cdb2inst1 50000/tcp # Connection port for DB2 instance db2inst1 4. Verify that the TCP/IP interrupt service name and port number for the DB2 instance are defined in the /etc/services file by doing the following. The port number is based on the con- nection service port of the DB2 instance (such as the default 50000) plus 1. In this case the default is 50001: $ grep 50001 /etc/services db2idb2inst1 50001/tcp # Interrupt port for DB2 instance db2inst1 5. Verify that the Node type is "Database Server with local and remote clients". Obtain the "Node type" for the instance: $ db2 get dbm cfg | more The value will be shown in the first 3 lines of the output and it has to be the following: Database Manager Configuration Node type = Database Server with local and remote clients 6. Verify that the communications support, DB2COMM, is defined as 'tcpip': $ db2set -all [i] DB2AUTOSTART=TRUE [i] DB2COMM=tcpip [g] DB2SYSTEM=oem-ppc3 [g] DB2ADMINSERVER=db2as If DB2COMM is not "tcpip" (for TCP/IP) then specify it as follows and restart the DB2 instance: a. db2set DB2COMM=tcpip Configuring the Control Center to controdatabasesUN95 b. db2stop c. db2start For more details, see chapter 25 "Setting up Communications on the Server Using the Command Line Processor", from the Quick Beginnings for UNIX book. 6.4.2 Setup of the Intel workstation (adding a remote system) ______________________________________________________________ You can setup the Intel workstation to administer a remote data- base in UNIX. Basically the remote system and the desired instances and databases need to be added to the DB2 Control Center. In this example the DB2 Control Center from Windows NT will be shown. 1. Logoff as Administrator (or other user ID that does not have administration authority). If you use Administrator, then some DB2 actions will fail with the error message (notice that the user name is trun- cated to the first 8 characters). SQL1092 "Administ" does not have the authority to perform the requested command. 2. Login as db2admin (or another user ID with administration authority and which name complies with the DB2 rules of 8 characters or less. 3. Start the Control Center: Start -> DB2 for Windows NT -> Administration Tools -> Control Center 4. Select the item Systems; then click the right button and select "Add...". In the "Add System" dialog enter the following info: Protocol parameters: Host name: oem-ppc3 5. Click on Retrieve. Then the other values will be filled in; you should verify them. Notice that the "System Name" is the local (to the client) name by which the remote server will be known. It could be different than the actual remote server name (you can provide a name that is more meaningful for you). 96 DB2 UDB V5 with VA TC V3 6. You will see that the oem-ppc3 entry was added to the Systems tree in the Control Center. 7. Click on the system entry (such as oem-ppc3) and expand it by clicking on the + sign. So far, there are no instances defined to it. 8. Select "instances" from the tree, click on the right mouse button and select "Add...". In the "Add Instance" dialog, click on "Refresh" to populate the fields. It is suggested to have the same instance name for both local and remote. Thus, copy the value from the "Remote instance" field into "Instance name". Then the instance will be added to the tree. 9. To add a database to the instance, see 6.5, "Adding a data- base in the Control Center." 6.5 ADDING A DATABASE IN THE CONTROL CENTER To add a database to a DB2 instance in the Control Center, do the following: 1. Logoff as Administrator (or other user ID that does not have administration authority). If you use Administrator, then some DB2 actions will fail with the error message (notice that the user name is trun- cated to the first 8 characters). SQL1092 "Administ" does not have the authority to perform the requested command. 2. Login as db2admin (or another user ID with administration authority and whose name complies with the DB2 rules of 8 characters or less. 3. Start the Control Center: Start -> DB2 for Windows NT -> Administration Tools -> Control Center 4. Click on the + sign on the item Systems; then click on the + sign on the desired system. Before you can actually work with a given system, you need to "attach" to the DB2 Administration Server of that system: Configuring the Control Center to controdatabasesUN97 Click on the right mouse button and select "Attach...". Enter the user name and password of the DB2 Administration Server (such as db2as). 5. Click on the + sign on the item Instances. 6. Before you can actually work with a given DB2 instance, you need to "attach" to it. Select the desired DB2 instance (such as db2inst1) from the tree, click on the right mouse button and select "Attach...". Enter the user name and password of the DB2 instance owner. 7. Select the item Databases, click on the right mouse button and select "Add...". In the "Add Database" dialog, click on the Refresh button to see the available databases. Select the desired one. Add a comment to identify the use or purpose of this database. You may need to use a different local alias, in case you get a warning message) and click on Apply. 8. Now you should be able to see the desired remote databases in your DB2 Control Center. Select the desired database and click on the + sign to expand it and show the tables, views, etc. 6.6 WHAT TO DO NEXT Now that you have configured the Control Center, these are some hints on what to do next: o Find out the DB2 tools to administer databases. See 7.0, "Administration of databases with DB2 tools" on page 99. o Learn how to work with the DB2 instances. See 8.0, "Working with DB2 Instances" on page 105. o For Unix, you can learn how to work with the DB2 adminis- tration server. See 9.0, "Working with the DB2 Adminis- tration Server in UNIX" on page 113. 98 DB2 UDB V5 with VA TC V3 7.0 ADMINISTRATION OF DATABASES WITH DB2 TOOLS 7.1 OVERVIEW OF THIS CHAPTER There are 2 ways to administer DB2 databases: o DB2 GUI Tools (Recommended). You can perform database administration tasks from an OS/2, Windows NT, or Windows 95 client by using DB2 GUI tools: - Use the Control Center to graphically perform server administrative tasks such as configuring, backing up and recovering data, managing directories, scheduling jobs, and managing media. - Use the Command Center to access and manipulate databases from a graphical interface. o Command Line Processor. You can administer local databases using the command line processor, The DB2 GUI tools greatly facilitates the maintenance activities of local and remote databases. These tools are only available in Intel platforms and are not available yet in UNIX platforms. In fact, these tools are so useful that even in the official DB2 Administration for UNIX education classes from IBM, these tools (running in an Intel workstation) are used to administer remote databases in UNIX. Thus, it is strongly recommended that if you have DB2 databases in UNIX you should try to administer them remotely from the DB2 GUI tools running on an Intel workstation. This is the mechanism described in this TR. 7.2 CONTROL CENTER The Control Center displays database objects (such as databases, tables, and packages) and their relationships to each other. You can manage a local database server or multiple remote database servers and the database objects within them, all from a single point of control. Administration of databases with DB2 tools 99 From the Control Center you can perform the following tasks on database objects: o Create and drop a database. o Create, alter, and drop a table space or table. o Create, alter, and drop an index. o Backup and restore a database or table space. The administration of a VisualAge TeamConnection family is not covered in this TR. We plan to have a document that will be dedicated to this topic in our home page mentioned in 1.3, "How to get the most up to date version of this technical report" on page 3. 7.3 ADDITIONAL FACILITIES FROM THE CONTROL CENTER The Control Center provides additional facilities to assist you in managing your DB2 servers: o Use the Command Center to enter DB2 commands and SQL state- ments in an interactive window and see the execution result in a result window. You can scroll through the results and save the output into a file. o Use the Script Center to create mini applications called scripts, which can be stored and invoked at a later time. These scripts can contain DB2 commands, SQL statements, as well as operating system commands. Scripts can be scheduled to run unattended. These jobs can be run once or set up to run on a repeating schedule; a repeating schedule is partic- ularly useful for tasks like backups. o Use the Journal to view all available information about jobs that are pending execution, executing, or that have completed execution; the recovery history log; the alerts log; and the messages log. The Journal also allows you to review the results of jobs that are run unattended. o Use the Alert Center to monitor your system for early warnings of potential problems or to automate actions to correct problems discovered. o Use the Tools Setting to change the settings for the Control Center, Alert Center, and Replication. You can run these facilities from the Control Center toolbar or from icons in the Administration Tools folder. You can find additional information in the Administration Getting Started Guide or in the Control Center's online help. 100 DB2 UDB V5 with VA TC V3 7.4 UNDERSTANDING SYSTEM ADMINISTRATIVE (SYSADM) AUTHORITY System Administrative authority is required to perform adminis- tration tasks such as cataloging, starting the database manager, or creating a database. Throughout this document, the IDs that have this authority are referred to as having SYSADM authority. By default, System Administrative (SYSADM) privileges are granted to the following: o UNIX Any user belonging to the primary group of the instance owner's user ID. o OS/2 A valid DB2 user ID which belongs to the UPM Administrator or Local Administrator group. o Windows NT A valid DB2 user name which belongs to Administrators group. The length of the user name should be less or equal than 8 characters. o Windows 95 Any Windows 95 user that explicitly logs in into the system. 7.5 WHERE ARE THE FILES USED WITH THE PROFILE REGISTRY? The profile registry in DB2 contains the registry values, the environment variables and the configuration parameters that control the DB2 UDB environment. The profile registry is made up of the following distinct parts, which are located according to the DB2 platform: o System Profile Registry Contains the listing of the local instance names: AIX /var/db2/v5/profiles.reg HP-UX /var/opt/db2/v5/profiles.reg OS/2 %DB2INSTPROF%\profiles.req WINDOWS NT \HKEY_LOCAL_MACHINE\SOFTWARE\IBM\DB2\PROFILES o Global Profile Registry Contains global (machine-wide) default variables and DB2 system variable settings: Administration of databases with DB2 tools 101 AIX /var/db2/v5/default.env HP-UX /var/opt/db2/v5/default.env OS/2 %DB2INSTPROF%\default.env WINDOWS NT \HKEY_LOCAL_MACHINE\SOFTWARE\IBM\DB2\GLOBAL_PROFILE o Instance Profile Registry Contains instance variable settings per instance: UNIX $DB2INSTANCE_HOME/sqllib/profile.env OS/2 %DB2INSTPROF%\\profile.env WINDOWS NT \HKEY_LOCAL_MACHINE\SOFTWARE\IBM\DB2\PROFILES\ 7.6 WHAT OTHER SYSTEM-WIDE FILES ARE NEEDED BY DB2? There are several directories and files that are related to DB2. These are the main ones: o For details on the directories where the DB2 code and the DB2 instances are installed, see 1.7, "Relationship between a DB2 instance and a VisualAge TeamConnection family" on page 10. o For details on the directories and files where the DB2 Reg- istry is located, see 7.5, "Where are the files used with the profile registry?" on page 101. o For details on the UNIX directories and files where the runtime licenses for DB2 are located, see 2.6.7.6, "Verify the license information in the nodelock file" on page 60. In Intel, the iFor License Use Runtime group is created under the IFOR subdirectory in the same disk unit (the default is C:). The actual file that has the runtime license is IFOR\LS\CONF\NODELOCK. There are some other files that are also related to DB2: o Services file, which has the TCP/IP services and port numbers for DB2 and for the VisualAge TeamConnection family. o Hosts file, which may have the database alias for the VisualAge TeamConnection family. 7.6.1 System-wide files in UNIX needed by DB2 ______________________________________________ The following system files are also needed by DB2: /ETC/PASSWD Defines the DB2 user IDs. /ETC/GROUP Defines the DB2 group IDs. 102 DB2 UDB V5 with VA TC V3 /ETC/INITAB Is used in UNIX to invoke /etc/rc.db2 for the auto start of DB2 instances upon reboot. /ETC/RC.DB2 Is used in UNIX for the auto start of the DB2 instances upon reboot. 7.7 WHAT TO DO NEXT Now that you know the DB2 tools to administer databases, these are some hints on what to do next: o Learn how to work with the DB2 instances. See 8.0, "Working with DB2 Instances" on page 105. o For Unix, you can learn how to work with the DB2 adminis- tration server. See 9.0, "Working with the DB2 Adminis- tration Server in UNIX" on page 113. Administration of databases with DB2 tools 103 104 DB2 UDB V5 with VA TC V3 8.0 WORKING WITH DB2 INSTANCES 8.1 OVERVIEW OF THIS CHAPTER The information in this chapter describes DB2 server instances and how to work with them. For more information see the chapter "Working with DB2 Instances" which is Chapter 16 in the DB2 Quick Beginnings for UNIX manual and Chapter 8 in the DB2 Personal Edition Quick Beginnings. A DB2 instance is a logical database manager environment where you catalog databases and set configuration parameters. On UNIX systems, a separate user ID is needed for every DB2 instance and you can use multiple DB2 instances to accomplish the following: o To use one instance for each VisualAge TeamConnection family. o To tune a database instance for a particular environment. o To optimize the database manager configuration for each data- base instance. o To limit the impact of an instance crash. In the unlikely event of an instance crash, only one instance is impacted. The other instances may continue to function normally. However, multiple instances have some minor disadvantages: o Additional system resources (virtual memory and disk space) are required for each instance. o More administration is required because you have additional instances to manage. During the installation procedure, a default DB2 instance is also created: UNIX db2inst1 in /home/db2inst1 INTEL DB2 in C:\DB2 To support the immediate use of this instance, the following are set during installation: o The environment variable DB2INSTANCE is set to DB2. o The DB2 registry value DB2INSTDEF is set to DB2. Working with DB2 Instances 105 8.2 CREATING INSTANCES The user ID of the instance owner, and the primary group ID that is the system administration group are associated with every instance. These are assigned during the process of creating the instance. One user ID can be used for only one DB2 Instance. Also, each instance owner must have a unique home directory. All of the files necessary to run the database instance are created in the home directory. The primary group of the instance owner user ID is also impor- tant, because it automatically becomes the system administration group for the database instance and gains administration authority, which allows users that are members of that group to start, stop, or change the database instance. You can use the following methods to create an instance: o The DB2 Installer utility, which is the recommended method in UNIX. o The DB2 line command: db2icrt. When an instance is created, its name is also added to the list of instances on the system. In UNIX, these methods create the DB2INSTANCE_HOME/sqllib, where DB2INSTANCE_HOME is the home of the instance owner. In Intel, the directory C:\InstanceName is created, where InstanceName is the actual name of the instance. You should not create files or directories under DB2INSTANCE_HOME/sqllib directory other than those created by DB2 products. This avoids a potential loss of data if an instance is deleted. 8.2.1 Using the DB2 Installer in UNIX ______________________________________ The DB2 Installer is available for AIX, HP-UX and Solaris oper- ating systems. This is the recommended method. You can use the DB2 Installer to create additional DB2 instances after you have installed the DB2 product on your system. To start the DB2 Installer from the DB2 product directory, type the following command: AIX /usr/lpp/db2_05_00/install/db2setup HP-UX /usr/IBMdb2/V5.0/install/db2setup SOLARIS /usr/IBMdb2/V5.0/install/db2setup 106 DB2 UDB V5 with VA TC V3 The next time you start the DB2 Installer, after having installed DB2 Version 5, you will see the "DB2 Installer" screen. To create another DB2 Instance on your system, select "Create". See step 4 on page 46 for additional details. To terminate the DB2 Installer, select Close. 8.2.2 Using db2icrt to manually create DB2 instances _____________________________________________________ You can also create additional DB2 instances using the db2icrt command as follows: DB2_HOME/instance/db2icrt -u FencedID InstName such as: db2icrt -u db2fenc1 db2inst1 Where InstName is a string up to eight alphanumeric characters long (refer to Appendix A, "Naming restrictions for DB2 user IDs, group IDs, instances and databases" on page 117 for more informa- tion about naming rules). Where DB2_HOME is: AIX /usr/lpp/db2_05_00 HP-UX /opt/IBMdb2/V5.0 SOLARIS /opt/IBMdb2/V5.0 NOTES: 1. For instances to be used by VisualAge TeamConnection, the authentication type defaults to SERVER because DB2 UDB Workgroup Edition is used and because the instance must be created locally with respect to the server. 2. FencedID It is the user under which the fenced UDFs and Stored Proce- dures will execute. FencedID may not be root or bin. Also for security reasons it is highly recommended to not use the same name as the instance name. 3. InstName It is the login name of the instance owner. Working with DB2 Instances 107 8.3 LISTING INSTANCES To get a list of all the database instances that are available on a system, you can do one of the following actions (in order of ease of use). o From the DB2 Control Center in Intel, select Systems, then the desired system, then click on the item Instances. o Run the db2ilist command, which is located in: $DB2_HOME/bin/db2ilist Where DB2_HOME is: AIX /usr/lpp/db2_05_00 HP-UX /opt/IBMdb2/V5.0 SOLARIS /opt/IBMdb2/V5.0 o To determine which database instance applies in the current session, enter: echo $DB2INSTANCE 8.4 HOW TO ENABLE THE PROPER PROFILE WHEN LOGIN INTO THE DB2 INSTANCE Unfortunately, the default initial profile for the DB2 instance does not have the proper statement to execute the DB2 profile. It is recommended that you add the following statement into your initial profile in order to execute this DB2 profile: Set up the instance owner environment by executing: o Korn or Bourne shell. . $DB2INSTANCE_HOME/sqllib/db2profile o C shell. source DB2INSTANCE_HOME/sqllib/db2cshrc Where DB2INSTANCE_HOME is the home directory of the DB2 instance. 108 DB2 UDB V5 with VA TC V3 8.5 STARTING AND STOPPING A DB2 SERVER INSTANCE You must start a DB2 server instance before you can perform the following tasks related to VisualAge TeamConnection: o Connect to a database on the instance. o Bind a package to a database. 8.5.1 Starting a DB2 Server Instance _____________________________________ To start a database instance: 1. Log in as the instance owner. 2. Start the DB2 database manager by entering the following command from a command line: db2start 8.5.2 Stopping a DB2 Server Instance _____________________________________ To stop a database instance: 1. Log in as the instance owner. 2. Stop the DB2 database manager by entering the following command from a command line: db2stop In case that there are pending transactions from a connected database, then db2stop will not work. In order to cancel those transactions and stop the DB2 instance, do the fol- lowing: db2 force application all db2 terminate db2stop 8.6 AUTO-STARTING INSTANCES (UNIX) Working with DB2 Instances 109 8.6.1 Enabling auto-starting _____________________________ To enable an instance to auto-start after each system reboot, perform the following steps: 1. Log in as the instance owner. 2. Turn on the auto-start flag in the instance's registry with the command: db2set -i InstName DB2AUTOSTART=YES Where InstName is the login name of the instance. 8.6.2 Disabling auto-starting ______________________________ To prevent an instance from auto-starting after each system reboot, perform the following steps: 1. Log in as the instance owner. 2. Turn off the auto-start flag in the instance's registry with the command: db2set -i InstName DB2AUTOSTART= Where InstName is the login name of the instance. 8.7 UPDATING INSTANCES Existing instances are designed to be as independent as possible from the effects of subsequent installation and removal of DB2 products. In most cases, existing instances will automatically inherit or lose access to the function of the product being installed or removed. However, if certain executables or components are installed or removed, existing instances do not automatically inherit the new system configuration parameters or gain access to all the additional function. The instance must be updated. If a DB2 product is updated by installing a PTF or a patch, all the existing DB2 instances should be updated using the command: db2iupdt -u db2fenc1 db2inst1 Running the db2iupdt script will update the specified instance by replacing the files in DB2INSTANCE_HOME/sqllib directory, where DB2INSTANCE_HOME is the home directory of the instance. 110 DB2 UDB V5 with VA TC V3 The db2iupdt command is available in the DB2_HOME/instance direc- tory, where DB2_HOME is: /usr/lpp/db2_05_00 on AIX /opt/IBMdb2/V5.0 on HP-UX or Solaris 8.8 REMOVING INSTANCES To remove a DB2 instance, perform the following steps: 1. Log in as the instance owner. 2. Make sure the database manager instance is stopped. See 8.5.2, "Stopping a DB2 Server Instance" on page 109. 3. Back up files in the DB2INSTANCE_HOME/sqllib directory, if needed. For example, you might want to save the database manager configuration file, db2systm, or user-defined func- tion or fenced stored procedures applications in DB2INSTANCE_HOME/sqllib/function, where DB2INSTANCE_HOME is the home directory of the instance owner. 4. Log out as the instance owner. 5. Log in as root. 6. Remove the DB2 instance by executing the db2idrop command: $DB2_HOME/instance/db2idrop InstName Where InstName is the login name of the instance. The db2idrop command removes the instance entry from the list of instances and removes the DB2INSTANCE_HOME/sqllib direc- tory. 7. As root, remove the instance owner's user ID and group (if used only for that instance). Do not remove these if you are planning to re-create the instance. Also, you can remove the home directory for the DB2 Instance. This step is optional since the instance owner and the instance owner group may be used for other purposes. Working with DB2 Instances 111 8.9 WHAT TO DO NEXT Now that you know how to work with normal DB2 instances, these are some hints on what to do next: o For Unix, you can learn how to work with the DB2 adminis- tration server. See 9.0, "Working with the DB2 Adminis- tration Server in UNIX" on page 113. 112 DB2 UDB V5 with VA TC V3 9.0 WORKING WITH THE DB2 ADMINISTRATION SERVER IN UNIX 9.1 OVERVIEW OF THIS CHAPTER This section shows you how to manually create the Administration Server. It also describes how to start, stop, list and remove the Administration Server. NOTE: You can only have one Administration Server for each host. For more information, see Chapter 17 "Using the Administration Server" in the Quick Beginnings for UNIX manual. 9.2 UNDERSTANDING THE ADMINISTRATION SERVER The Administration Server is used as a service by the DB2 Admin- istration Tools to satisfy requests. It is implemented as a DB2 instance, and has interfaces to start, stop, catalog, and con- figure it. The Administration Server resides on every DB2 server that you want to administer and detect. The Administration Server is required in order to use any of the administration tools described above. The relationship between the Control Center and the Adminis- tration Server is shown in 6.2, "Relationship between Control Center and Administration Server" on page 89. 9.3 CREATING THE ADMINISTRATION SERVER You can use the following methods to create the DB2 Adminis- tration Server: o The DB2 Installer utility, which is the recommended method in UNIX. o The DB2 line command: dasicrt. Working with the DB2 Administration Server in UNIX 113 9.3.1 Using the DB2 Installer in UNIX ______________________________________ The DB2 Installer is available for AIX, HP-UX and Solaris oper- ating systems. This is the recommended method. You can use the DB2 Installer to create the DB2 Administration Server after you have installed the DB2 product on your system. To start the DB2 Installer from the DB2 product directory, type the following command: AIX /usr/lpp/db2_05_00/install/db2setup HP-UX /usr/IBMdb2/V5.0/install/db2setup SOLARIS /usr/IBMdb2/V5.0/install/db2setup The next time you start the DB2 Installer, after having installed DB2 Version 5, you will see the "DB2 Installer" screen. To create the DB2 Administration Server on your system, select "Create". See step 4 on page 46 for additional details. To terminate the DB2 Installer, select Close. 9.3.2 Using the DB2 line command dasicrt in UNIX _________________________________________________ To create the Administration Server, you must have root authority to run the dasicrt command at a command prompt. The syntax of the dasicrt command is as follows: $DB2_HOME/instance/dasicrt ASName Where ASName is the name of the Administration Server, which is composed of a string of up to eight alphanumeric characters long. Refer to Appendix D. "Naming Rules" for further information. You use the name of the Administration Server to set up the directory structure and access permissions. To start the newly-created Administration Server: o Use the db2admin command for a manual start (refer to "Starting the Administration Server"). o Reboot the system and it will be automatically started during the boot up. 114 DB2 UDB V5 with VA TC V3 9.4 LISTING THE ADMINISTRATION SERVER To obtain the name of the Administration Server on your system, you must login as the owner of one DB2 instance, and then execute the command: db2set -g DB2ADMINSERVER 9.5 HOW TO ENABLE THE PROPER PROFILE WHEN LOGIN INTO THE ADMINISTRATION SERVER Unfortunately, the default initial profile for the DB2 Adminis- tration Server does not have the proper statement to execute the DB2 profile. It is recommended that you add the following state- ment into your initial profile in order to execute this DB2 profile: o Korn or Bourne shell. . $DB2INSTANCE_HOME/sqllib/db2profile o C shell. source DB2INSTANCE_HOME/sqllib/db2cshrc Where DB2INSTANCE_HOME is the home directory of the DB2 Adminis- tration Server. 9.6 STARTING THE ADMINISTRATION SERVER To start the Administration Server, you must perform the fol- lowing steps: 1. Log in as the Administration Server owner. 2. Start the Administration Server using the db2admin command as follows: db2admin start The Administration Server is automatically started after each system reboot. Working with the DB2 Administration Server in UNIX 115 9.7 STOPPING THE ADMINISTRATION SERVER To stop the Administration Server, you must perform the following steps: 1. Log in as the Administration Server owner. 2. Stop the Administration Server using the db2admin command as follows: db2admin stop 9.8 REMOVING THE DB2 ADMINISTRATION SERVER You need to stop the DB2 Administration Server before you can remove it. See 9.7, "Stopping the Administration Server." To remove the Administration Server, you must perform the fol- lowing steps: 1. Backup the files in the ASHOME/sqllib directory, if needed, where ASHOME is the home directory of the Administration Server. 2. Log in as root and remove the Administration Server using the dasidrop command as follows: $DB2_HOME/instance/dasidrop ASName Where ASName is the name of the instance being removed. The dasidrop command removes the sqllib directory under the home directory of the Administration Server. 3. As root, remove the Administration Server's user ID and group. Also, you can remove the home directory for the Adminis- tration Server. This step is optional since the instance owner and the instance owner group may be used for other purposes. 116 DB2 UDB V5 with VA TC V3 APPENDIX A. NAMING RESTRICTIONS FOR DB2 USER IDS, GROUP IDS, INSTANCES AND DATABASES DB2 has certain restrictions for the names of the DB2 databases. Because the TeamConnection family name is also used for the name of the DB2 database, these DB2 restrictions also become TeamConnection restrictions. Furthermore, the DB2 names for user IDs, group IDs and instances have these restrictions: The name you specify: o Can contain 1 to 8 characters. o Cannot be any of the following: - USERS - ADMINS - GUESTS - PUBLIC - LOCAL o Cannot begin with: - IBM - SQL - SYS o Cannot include accented characters. o To avoid potential problems, do not use the special charac- ters @, #, and $ in a database name if you intend to have a client remotely connect to a host database. Also, because these characters are not common to all keyboards, do not use them if you plan to use the database in another country. o In general: - On OS/2, use uppercase names. - On Windows 95 and Windows NT, use any case. - On UNIX, use lowercase names. Appendix A. Naming restrictions instancessandIdatabases I117 118 DB2 UDB V5 with VA TC V3 APPENDIX B. INSTALLING THE DB2 SOFTWARE DEVELOPMENT KIT The DB2 Software Development Kit (SDK) is needed to develop DB2 programs. The DB2 SDK is not packaged with VisualAge TeamConnection. This chapter is intended only for development team for VisualAge TeamConnection. B.1 INSTALLING THE DB2 SDK IN UNIX For example, in AIX: 1. Login as root. 2. Mount the CD-ROM to /cdrom 3. cd /cdrom/db2/aix 4. Execute: ./db2setup 5. In the "DB2 Installer" screen, choose the first item to select products and components [ Install... ] Then press enter. 6. In the "Install DB2 V5" screen, select: [*] DB2 Software Developer's Kit [ Customize ] 7. In the next screen add the components: [*] DB2 Sample Applications [*] Create Links for DB2 Libraries 8. Continue with the installation. B.2 INSTALLING THE DB2 SDK IN WINDOWS NT 1. Stop the DB2 services. 2. Stop also the TME service, to avoid a problem during the SDK installation: DB2 is currently running and therefore cannot be updated. Stop the DB2 processes and try again. Appendix B. Installing the DB2 Software Development Kit 119 3. Insert CD-ROM and use setup to install. 4. Select Custom, verify settings, continue. 5. Reboot. B.3 INSTALLING THE DB2 SDK IN OS/2 1. Stop the DB2 services. 2. Insert CD-ROM and use install. 3. Select Custom, verify settings, continue. 4. Reboot. 120 DB2 UDB V5 with VA TC V3 APPENDIX C. UNINSTALLATION OF DB2 This chapter shows you how to uninstall (remove) DB2 products. C.1 UNINSTALLING DB2 FROM UNIX You need to perform the following steps: 1. Stop and backup the VisualAge TeamConnection families. 2. Stop the Administration Server. 3. Stop all DB2 Instances. 4. Remove the Administration Server. 5. Remove DB2 Instances - this step is optional. 6. Remove the DB2 products. C.1.1 Stop and backup the VisualAge TeamConnection families ____________________________________________________________ Use tcadmin or tcstop to stop all the VisualAge TeamConnection families. If you want to keep the database for the families, then back them up. C.1.2 Stop the Administration Server _____________________________________ You must stop the Administration Server before you remove DB2 products. To stop the Administration Server, you need to perform the following steps: 1. Log in as one of the DB2 instances. 2. Obtain the name of the Administration Server using the fol- lowing command: $DB2_HOME/bin/db2set -g DB2ADMINSERVER 3. Stop the Administration Server. See 9.7, "Stopping the Administration Server" on page 116 for details. Appendix C. Uninstallation of DB2 121 4. Exit the session. C.1.3 Stop all DB2 Instances _____________________________ You must stop all DB2 Instances before you remove DB2 products. To stop DB2 Instances, you need to perform the following steps: 1. Login as the owner of a DB2 instance. 2. Obtain a list of the names of all DB2 instances on your system using the following command: db2ilist 3. Stop the instance. See 8.5.2, "Stopping a DB2 Server Instance" on page 109 for details. 4. Exit the session. 5. Repeat these steps for each instance. C.1.4 Remove the Administration Server _______________________________________ You must remove the Administration Server before you remove DB2 products. To remove the Administration Server, you need to perform the fol- lowing steps: 1. Log in as root. 2. Remove the Administration Server. See 9.8, "Removing the DB2 Administration Server" on page 116 for details. C.1.5 Remove the DB2 Instances _______________________________ You can optionally remove some or all of the DB2 Version 5 Instances on your system. Once an instance is removed, all the DB2 databases owned by the instance, if any, will not be usable. Remove DB2 Instances only if you are not planning to use DB2 Version 5 products , or if you do not want to migrate existing instances to a later version of DB2. To remove DB2 Instances, you need to perform the following steps: 1. Log in as root. 122 DB2 UDB V5 with VA TC V3 2. Obtain a list of the names of all DB2 instances on your system using the following command: $DB2_HOME/bin/db2ilist 3. Remove the instance. See 8.8, "Removing Instances" on page 111 for details. C.1.6 Clean up the DB2 registry ________________________________ In order to have a clean system before reinstalling DB2, it is recommended to cleanup the DB2 registry: 1. Login as root. 2. Execute the following command: rm -fr /var/db2/v5 For more information about the DB2 registry, see 7.5, "Where are the files used with the profile registry?" on page 101. C.1.7 Remove the DB2 Products ______________________________ The following steps describe how you can remove DB2 products on UNIX operating systems. C.1.7.1 Remove the DB2 Products on AIX Systems You can remove the DB2 products on Version 4.1 or later of the AIX operating system using SMIT interface as follows: 1. Log in as root. 2. Type smit install_remove to proceed directly to the Remove Software Products screen. 3. Press F4 to display a list of the software to remove. Press F7 at the entries that have a prefix of db2_05_00. 4. Press Enter to start removing the DB2 products. 5. After the product is removed, exit smit. 6. Change the directory to /usr/lpp/db2_05_00 and see if still there are directories and files Appendix C. Uninstallation of DB2 123 There might be some directories or files that were not removed in /usr/lpp/db2_05_00. If you want to remove them, do the following: cd /usr/lpp rm -fr ./db2_05_00 You can also remove all DB2 Version 5 products on Version 4.1 or later of the AIX operating system, using the installp command with the de-install option: installp -u db2_05_00 C.1.7.2 Remove the DB2 Products on HP-UX Systems You can remove the DB2 products on the HP-UX operating system using the swremove program as follows: 1. Log in as root. 2. Use swremove to remove some or all of the DB2 Version 5 pro- ducts. Select all the file sets that begin with DB2V5. In case that you have applied patches, you can select the ones that begin with PDB2 or that their description identify them as such. C.1.7.3 Remove the DB2 Products on Solaris Systems You can remove the DB2 products on the Solaris operating system using the pkgrm program as follows: 1. Log in as root. 2. Determine the packages for all DB2 for Solaris related pro- ducts you have installed on your system by typing: pkginfo | grep -i db2 | grep 50 3. Remove all packages listed in step 2 with the pkgrm command. 4. Select Yes at the prompt for each package to be removed. 5. Before removing a package, all its dependent packages must be removed first. You must remove packages in a particular order, which is mentioned in the Chapter 28 "Removing DB2 Products" from the Quick Beginnings for UNIX manual. 124 DB2 UDB V5 with VA TC V3 C.2 UNINSTALLING DB2 FROM WINDOWS NT 1. Login as Administrator or as another member of the Adminis- trators group. 2. Stop and backup the VisualAge TeamConnection families. 3. Stop all the DB2 processes: a. Start -> Settings -> Control Panel -> Services b. Select one by one, all those DB2 services that are active and click on the Stop button: DB2 - DB2 # This is the DB2 instance DB2 - DB2DAS00 # This is the DB2 Administrator Service DB2 Security Server TME 10 NetFinity Support Program Stop also the above TME service to avoid the following problem when trying to remove the code: DB2 is currently running and therefore cannot be updated. Stop the DB2 processes and try again. 4. Start -> Settings -> Control Panel -> Add/Remove Programs. 5. Select "DB2" or "IBM DATABASE 2 Products" and click on Add/Remove button. Handle appropriately all the dialogs during the uninstalla- tion process. 6. After the uninstallation, notice that the Start -> Programs does not show the entry for DB2 anymore. Also notice that the Services (in the Control Panel) does not show the services related to DB2 anymore. 7. Reboot your workstation. 8. (Optional) You may want to delete the directory for the DB2 instances, such as C:\DB2 and C:\SQLLIB. C.3 UNINSTALLING DB2 FROM OS/2 1. Stop and backup the VisualAge TeamConnection families. 2. Stop all the DB2 processes: a. Select the DB2 Control Center. Appendix C. Uninstallation of DB2 125 b. Select Control Center -> Shutdown DB2 Tools. 3. Double click on the folder "DB2 V5" and then double click on the folder "DB2 for OS/2". 4. Double click on the "Installation Utility". 5. Select "IBM DB2 Universal Database" and from the Actions menu select Delete. Handle appropriately all the dialogs during the uninstalla- tion process. 6. After the uninstallation, notice that the DB2 for OS/2 folder should not exist. 7. Reboot your workstation. 8. (Optional) You may want to delete the directory for the DB2 instances, such as C:\DB2 and C:\SQLLIB. 126 DB2 UDB V5 with VA TC V3 APPENDIX D. BIBLIOGRAPHY AND SERVICE SUPPORT D.1 DB2 UNIVERSAL DATABASE D.1.1 DB2 UDB manuals ______________________ This TR summarizes selected material from the following DB2 UDB V5 manuals, and there are appropriate references to them through out this TR: S10J-8148 IBM DB2 Universal Database Version 5, Quick Begin- nings for UNIX. S10J-8150 IBM DB2 Universal Database Version 5, Personal Edition Quick Beginnings. S10J-8154 IBM DB2 Universal Database Version 5, Administration Getting Started. S10J-8157 IBM DB2 Universal Database Version 5, Administration Guide. The HTML version of the DB2 Quick Beginnings manuals can be found in the CD-ROM for VisualAge TeamConnection Version 3: UNIX db2pubs/$LANG/db2ix.htm WINDOWS db2pubs\\db2i6.htm OS/2 db2pubs\\db2i2.htm The HTML versions of the other DB2 manuals can be installed in your system during the installation of DB2. These manuals can be obtained from the DB2 Product and Service Technical Library, see below. For a complete and up-to-date source of DB2 documentation, use the DB2 Product and Service Technical Library, in English only, on the World Wide Web at: http://www.software.ibm.com/data/db2/library D.1.2 Service support for DB2 UDB __________________________________ To download the latest service maintenance for DB2, use the DB2 Service and Support on the World Wide Web at: http://www.software.ibm.com/data/db2/db2tech Appendix D. Bibliography and Service Support 127 NOTE: Even though DB2 is bundled with VisualAge TeamConnection you should contact VisualAge TeamConnection Support to report DB2 problems. The licensing for VisualAge TeamConnection does not entitle you to contact DB2 Support directly. D.2 VISUALAGE TEAMCONNECTION ENTERPRISE SERVER VERSION 3 D.2.1 VisualAge TeamConnection manuals _______________________________________ The main VisualAge TeamConnection manuals are: GC34-4742 VisualAge TeamConnection Enterprise Server, Version 3 Installation Guide GC34-4551 VisualAge TeamConnection Enterprise Server, Version 3 Administrator's Guide SC34-4501 VisualAge TeamConnection Enterprise Server, Version 3 Commands Reference D.2.2 Service support via Internet for VisualAge TeamConnection ________________________________________________________________ For more information on the service support for VisualAge TeamConnection, go to the IBM home page, http://www.ibm.com. Use the search function with keyword TeamConnection to go to the VisualAge TeamConnection area. Access the TeamConnection directory in our ftp site. Use ftp and login as anonymous to ftp.software.ibm.com. In the directory ps/products/teamconnection you can find fixes and information related to VisualAge TeamConnection. D.3 TECHNICAL REPORTS ABOUT VISUALAGE TEAMCONNECTION There are several technical reports that are available from the IBM VisualAge TeamConnection Enterprise Server Library home page by selecting the item Library at URL: http://www.software.ibm.com/ad/teamcon A partial list of these technical reports is shown below (for the complete and most up to date version, see the above URL). o VisualAge TeamConnection Version 3: how to do routine oper- ating system tasks. 128 DB2 UDB V5 with VA TC V3 Expand and mount file systems, add users, etc. o VisualAge TeamConnection Version 3: how to do routine DB2 tasks. Routine maintenance activities, such as backup and restore of a database, obtaining statistics and reorganizing the indexes. o VisualAge TeamConnection Version 3: NLS and DBCS. Topics about code pages, how to install locales, etc. Appendix D. Bibliography and Service Support 129 130 DB2 UDB V5 with VA TC V3 APPENDIX E. COPYRIGHTS, TRADEMARKS AND SERVICE MARKS The following terms used in this technical report, are trademarks or service marks of the indicated companies: +---------------------+-------------------------------------------+ | TRADEMARK, | COMPANY | | REGISTERED | | | TRADEMARK OR | | | SERVICE MARK | | +---------------------+-------------------------------------------+ | PDF, Acrobat Reader | Adobe Systems Incorporated | +---------------------+-------------------------------------------+ | HP, HP-UX | Hewlett-Packard Company | +---------------------+-------------------------------------------+ | IBM, AIX, | IBM Corporation | | OS/2, OS/2 Warp, | | | CMVC, TeamConnection| | | DB2 Universal | | | Database, DB2 UDB | | +---------------------+-------------------------------------------+ | Intel | Intel Corporation | +---------------------+-------------------------------------------+ | Microsoft, Windows, | Microsoft Corporation | | Windows 95, | | | Windows NT | | +---------------------+-------------------------------------------+ | Netscape | Netscape Communications Corp. | +---------------------+-------------------------------------------+ | Sun, Solaris | Sun Microsystems Inc. | | Java | | +---------------------+-------------------------------------------+ | UNIX | X/Open Co. Ltd. | +---------------------+-------------------------------------------+ END OF DOCUMENT Appendix E. Copyrights, Trademarks and Service marks 131