IBM Getting started with DB2 User Manual

DB2
®
DB2 Version 9
for Linux, UNIX, and Windows
򔻐򗗠򙳰
Getting started with DB2 installation and administration on Linux and Windows
GC10-4247-00
®
DB2 Version 9
for Linux, UNIX, and Windows
򔻐򗗠򙳰
Getting started with DB2 installation and administration on Linux and Windows
GC10-4247-00
Before using this information and the product it supports, be sure to read the general information under Notices.
Edition Notice
This document contains proprietary information of IBM. It is provided under a license agreement and is protected by copyright law. The information contained in this publication does not include any product warranties, and any statements provided in this manual should not be interpreted as such.
You can order IBM publications online or through your local IBM representative.
v To order publications online, go to the IBM Publications Center at www.ibm.com/shop/publications/order
v To find your local IBM representative, go to the IBM Directory of Worldwide Contacts at www.ibm.com/
planetwide
To order DB2 publications from DB2 Marketing and Sales in the United States or Canada, call 1-800-IBM-4YOU (426-4968).
When you send information to IBM, you grant IBM a nonexclusive right to use or distribute the information in any way it believes appropriate without incurring any obligation to you.
© Copyright International Business Machines Corporation 1993, 2006. All rights reserved.
US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.

Contents

About this book . . . . . . . . . . .v
Part 1. Getting started with DB2
installation . . . . . . . . . . . . .1
Chapter 1. Installation prerequisites . . .3
Disk and memory requirements . . . . . . . .3
Getting started with database authorities . . . . .3
Windows installation prerequisites . . . . . . .5
Installation requirements for DB2 clients and
servers (Windows) . . . . . . . . . . .5
Security issues when installing the DB2 database
manager . . . . . . . . . . . . . . .6
Granting user rights (Windows) . . . . . . .9
DB2 system administrator group considerations
(Windows) . . . . . . . . . . . . . .9
Extending the directory schema (Windows) . . .10
Linux installation prerequisites . . . . . . . .11
Installation requirements for DB2 clients and
servers (Linux) . . . . . . . . . . . .11
Centralized user-management considerations
(Linux) . . . . . . . . . . . . . . .14
Chapter 2. Installation . . . . . . . .17
Installing DB2 servers (Windows) . . . . . . .17
Installing DB2 servers (Linux) . . . . . . . .19
Chapter 3. Verifying your installation 23
Verifying the installation of DB2 servers using First
Steps (Linux and Windows) . . . . . . . . .23
Verifying the installation using the command line
processor (CLP) . . . . . . . . . . . . .24
Chapter 4. DB2 product licensing . . .25
DB2 product license files . . . . . . . . . .25
Registering a DB2 product or feature license key
using the License Center . . . . . . . . . .25
Checking DB2 license compliance . . . . . . .26
Upgrading a Try and Buy license . . . . . . .27
Part 2. Getting started with DB2
administration . . . . . . . . . . .29
Chapter 5. Basic administration . . . .31
Creating your own database . . . . . . . . .31
Database basics . . . . . . . . . . . .31
Creating your own database using the Create Database with the Automatic Maintenance
wizard . . . . . . . . . . . . . . .31
Verifying your new database . . . . . . .32
Chapter 6. Automatic maintenance . . .35
Automatic database backup . . . . . . . . .35
Automatic statistics collection . . . . . . . .36
Chapter 7. DB2 administration and
development tools . . . . . . . . . .39
Basic GUI navigation concepts . . . . . . . .39
Getting started with the Control Center . . . . .42
Setting up notification and contact lists . . . . .46
Getting started with the Command Editor . . . .46
Getting started with the Health Center . . . . .49
Getting started with the Task Center . . . . . .50
Getting started with the Journal . . . . . . .52
Getting started with the Configuration Assistant . .54
Getting started with the Replication Center . . . .55
Getting started with the Web Command Center . .56 Getting started with the Web Health Center . . .57
Part 3. Appendixes . . . . . . . . .59
Appendix A. Installing DB2 servers
using response files . . . . . . . . .61
Response file installation basics . . . . . . . .61
Response file considerations . . . . . . . . .61
Creating a response file using the DB2 Setup wizard 62
Appendix B. Language support . . . .65
Changing the DB2 interface language (Windows) . .65 Changing the DB2 interface language (Linux) . . .66
Supported DB2 interface languages . . . . . .67
Language identifiers for running the DB2 Setup
wizard in another language . . . . . . . . .67
Displaying the db2setup command in your national
language . . . . . . . . . . . . . . .68
Appendix C. Installing DB2 fix packs 71
Applying fix packs . . . . . . . . . . . .71
Appendix D. Uninstalling your DB2
product . . . . . . . . . . . . . .73
Uninstalling your DB2 product (Windows) . . . .73
Uninstalling your DB2 products (Linux) . . . . .74
Removing DB2 products using the db2_deinstall
or doce_deinstall command (Linux) . . . . .74
Stopping DB2 instances (Linux) . . . . . . .75
Stopping the DB2 administration server (Linux) 75 Removing the DB2 administration server (Linux) 76
Removing DB2 instances (Linux) . . . . . .76
Appendix E. DB2 Database technical
information . . . . . . . . . . . . .79
Overview of the DB2 technical information . . . .79
Documentation feedback . . . . . . . . .79
DB2 technical library in hardcopy or PDF format . .80
© Copyright IBM Corp. 1993, 2006 iii
Ordering printed DB2 books . . . . . . . . .82
Displaying SQL state help from the command line
processor . . . . . . . . . . . . . . .83
Accessing different versions of the DB2 Information
Center . . . . . . . . . . . . . . . .84
Displaying topics in your preferred language in the
DB2 Information Center . . . . . . . . . .84
Updating the DB2 Information Center installed on
your computer or intranet server . . . . . . .85
DB2 tutorials . . . . . . . . . . . . . .87
DB2 troubleshooting information . . . . . . .87
Terms and Conditions . . . . . . . . . . .88
Appendix F. Notices . . . . . . . . .89
Trademarks . . . . . . . . . . . . . .91
Index . . . . . . . . . . . . . . .93
Contacting IBM . . . . . . . . . . .97
iv Getting started with DB2 installation and administration

About this book

This book provides information on how to install your DB2® product. It also introduces DB2 maintenance, administration, and development.
For a complete look at the DB2 documentation library, see the DB2 Information Center at http://publib.boulder.ibm.com/infocenter/db2help/.
© Copyright IBM Corp. 1993, 2006 v
vi Getting started with DB2 installation and administration

Part 1. Getting started with DB2 installation

© Copyright IBM Corp. 1993, 2006 1
2 Getting started with DB2 installation and administration

Chapter 1. Installation prerequisites

Disk and memory requirements

Disk requirements:
The disk space required for your product depends on the type of installation you choose and the type of file system you have. The DB2 Setup wizard provides dynamic size estimates based on the components selected during a typical, compact, or custom installation.
On Windows®, you might require significantly more space on FAT (File Allocation Table) drives with large cluster sizes than with NTFS (New Technology File System) drives.
Remember to include disk space for required software and communication products.
Memory requirements:
At a minimum, a DB2 database system requires 256 MB of RAM. For a system running just DB2 and the DB2 GUI tools, a minimum of 512 MB of RAM is required. However, 1 GB of RAM is recommended for improved performance. These requirements do not include any additional memory requirements for other software that is running on your system.
When determining memory requirements, be aware of the following:
v For DB2 client support, these memory requirements are for a base of five
concurrent client connections. Yo u will need an additional 16 MB of RAM per five client connections.
v Memory requirements are affected by the size and complexity of your database
system, as well as by the extent of database activity and the number of clients accessing your system.
In DB2 Version 9, the new self-tuning memory feature simplifies the task of memory configuration by automatically setting values for several memory configuration parameters. When enabled, the memory tuner dynamically distributes available memory resources among several memory consumers including sort, the package cache, the lock list and buffer pools.
v On Linux™, SWAP space at least twice as large as RAM is recommended.
Related concepts:
v “Self tuning memory” in Performance Guide

Getting started with database authorities

Authorities provide a way both to group privileges and to control maintenance and utility operations for instances, databases, and database objects. Users can have administrative authorities that give full privileges on a set of database objects, or they can have system authorities that give full privileges on managing the system but do not allow access to the data.
© Copyright IBM Corp. 1993, 2006 3
SYSADM is the highest level of administrative authority. It includes all privileges on databases within the DB2 instance as well as the authority to grant and revoke all other authorities and privileges.
DBADM provides administrative authority for a specific database. It allows the user to access and modify all objects within that database. A user with DBADM authority can grant and revoke privileges on the database but cannot grant or revoke DBADM authority.
SYSCTRL is the authority for controlling the resources used by the database manager (for example, creating and deleting databases), but it does not allow access to the data within the databases.
SYSMAINT is the authority for performing maintenance operations, such as starting and stopping the DB2 server and backing up and restoring databases. It does not allow access to the data within the databases.
LOAD authority at the database level, combined with INSERT privilege on a table, allows the user to load data into that table.
SECADM (security administrator) level applies at the database level and is the authority required to create, alter and drop security label components, security policies, and security labels, which are used to protect tables. It is also the authority required to grant and revoke security labels and exemptions as well as to grant and revoke the SETSESSIONUSER privilege. A user with the SECADM authority can transfer the ownership of objects that they do not own. The SECADM authority has no inherent privilege to access data stored in tables and has no other additional inherent privilege. It can only be granted by a user with SYSADM authority. The SECADM authority can be granted to a user but cannot be granted to a group or to PUBLIC.
Database-specific authorities are stored in the database catalogs; system authorities are stored in the database manager configuration file for the instance.
You can use the Control Center to grant and revoke database authorities.
Related concepts:
v “Database administration authority (DBADM)” in Administration Guide:
Implementation
v “Extended Windows security using DB2ADMNS and DB2USERS groups” in
Administration Guide: Implementation
v “LOAD authority” in Administration Guide: Implementation
v “Security administration authority (SECADM)” in Administration Guide:
Implementation
v “System administration authority (SYSADM)” in Administration Guide:
Implementation
v “System control authority (SYSCTRL)” in Administration Guide: Implementation
v “System maintenance authority (SYSMAINT)” in Administration Guide:
Implementation
4 Getting started with DB2 installation and administration

Windows installation prerequisites

Installation requirements for DB2 clients and servers (Windows)

For the most up-to-date prerequisite information, see
v www.ibm.com/software/data/db2/udb/sysreqs.html.
install a DB2 client or server product, the following operating system, software,
To and hardware prerequisites must be met:
Table 1. Windows installation prerequisites
Operating System Service Pack Hardware
Windows XP Professional (32-bit)
Service Pack 2 or later
All Intel® and AMD processors capable of running the supported Windows operating
Windows XP Professional x64
Windows 2003 Standard Edition (32-bit and 64-bit)
Service Pack 1 or later
systems (32-bit and 64-bit)
Windows 2003 Advanced Edition (32-bit and 64-bit)
Windows 2003 Datacenter Edition (32-bit and 64-bit)
Additional client considerations
DB2 products continue to be supported on Windows 98, Windows ME, Windows NT®, and Windows 2000 until DB2 Universal Database Version
8.1 goes out of service. For existing installations and new installations of DB2 products, upgrading to a more current operating system version of Windows (such as Windows 2003) is recommended. Version 9 clients cannot be installed on Windows 98, Windows ME, or Windows NT Server 4 operating systems. If you wish to continue running DB2 products on back level releases of Windows, you require the following maintenance levels:
v Windows NT Version 4 with Service Pack 6a or later
v Windows 2000 with Service Pack 4 or later
v Internet Explorer 4.01 Service Pack 2
Windows XP Service Pack 1 is required for running DB2 applications in
either of the following environments:
v Applications that have COM+ objects using ODBC; or
v Applications that use OLE DB Provider for ODBC with OLE DB
resource pooling disabled
If you are unsure about whether your application environment qualifies, then it is recommended that you install the appropriate Windows service level.
For more information about this COM+ issue, see the following Microsoft Knowledge Base article:
v http://support.microsoft.com/default.aspx?scid=KB;EN-US;306414
Chapter 1. Installation prerequisites 5
®
Additional software considerations
v MDAC 2.8 is required. The DB2 Setup wizard will install MDAC 2.8 if it
is not already installed.
Note: If a previous version of MDAC (for example, 2.7) is already
installed, DB2 install will upgrade MDAC to 2.8. For a typical install, MDAC 2.8 is installed. For a compact install, MDAC 2.8 is not installed. For a custom install, MDAC 2.8 is installed but only if you have not deselected the default which is to install it. If you deselect MDAC as part of a custom install, it will not be installed.
v If you plan to use LDAP (Lightweight Directory Access Protocol), you
should use either a Microsoft LDAP client or the IBM® Tivoli® Directory Server v6 client (also known as the IBM LDAP client which is included with DB2). Prior to installation of the Microsoft Active Directory, you will need to extend your directory schema using the db2schex utility, which can be found on the installation media.
The Microsoft LDAP client is included with the operating system for Windows XP, and Windows Server 2003.
v If you plan to use the Tivoli Storage Manager facilities for the backup
and restoration of your databases, you need the Tivoli Storage Manager Client Version 4.2.0 or later.
– For Windows 64-bit operating systems, you require the TSM client
API Version 5.1.
If you have the IBM Antivirus program installed on your operating
v
system, it must be disabled or uninstalled to complete a DB2 installation.
v TCP/IP support must be enabled to view online help.
v One of the following browsers is required to view online help, run the
DB2 install launchpad (setup.exe), and to run First Steps (db2fs):
– Internet Explorer 5.5 and up
– Mozilla 1.4 and up
– Firefox 1.0 and up
– Netscape 7.0 and up
Related concepts:
v “Support changes for 32-bit and 64-bit DB2 servers” in Migration Guide
Related tasks:
v “An overview of installing your DB2 product (Windows)” in Quick Beginnings for
DB2 Servers
Related reference:
v “IBM Software Development Kit for Java levels for DB2 products” in Quick
Beginnings for DB2 Servers
v “Communication protocols supported” in Quick Beginnings for DB2 Clients

Security issues when installing the DB2 database manager

Security considerations are important to the DB2 administrator from the moment the product is installed.
To complete the installation of the DB2 database manager, a user ID, a group name, and a password are required. The GUI-based DB2 database manager install
6 Getting started with DB2 installation and administration
program creates default values for different user IDs and the group. Different defaults are created, depending on whether you are installing on UNIX® or Windows platforms:
v On UNIX and Linux platforms, if you choose to create a DB2 instance in the
instance setup window, the DB2 database install program creates, by default, different users for the DAS (dasusr), the instance owner (db2inst), and the fenced user (db2fenc). Optionally, you can specify different user names
The DB2 database install program appends a number from 1-99 to the default user name, until a user ID that does not already exist can be created. For example, if the users db2inst1 and db2inst2 already exist, the DB2 database install program creates the user db2inst3. If a number greater than 10 is used, the character portion of the name is truncated in the default user ID. For example, if the user ID db2fenc9 already exists, the DB2 database install program truncates the c in the user ID, then appends the 10 (db2fen10). Truncation does not occur when the numeric value is appended to the default DAS user (for example, dasusr24).
v On Windows platforms, the DB2 database install program creates, by default, the
user db2admin for the DAS user, the instance owner, and fenced users (you can specify a different user name during setup, if you want). Unlike UNIX platforms, no numeric value is appended to the user ID.
minimize the risk of a user other than the administrator from learning of the
To defaults and using them in an improper fashion within databases and instances, change the defaults during the install to a new or existing user ID of your choice.
Note: Response file installations do not use default values for user IDs or group
names. These values must be specified in the response file.
Passwords are very important when authenticating users. If no authentication requirements are set at the operating system level and the database is using the operating system to authenticate users, users will be allowed to connect. For example on UNIX operating systems, undefined passwords are treated as NULL. In this situation, any user without a defined password will be considered to have a NULL password. From the operating system’s perspective, this is a match and the user is validated and able to connect to the database. Use passwords at the operating system level if you want the operating system to do the authentication of users for your database.
When working with DB2 Data Partitioning Feature (DPF) on UNIX operating system environments, the DB2 database manager by default uses the rsh utility to run some commands on remote nodes. The rsh utility transmits passwords in clear text over the network, which can be a security exposure if the DB2 server is not on a secure network. Yo u can use the DB2RSHCMD registry variable to set the remote shell program to a more secure alternative that avoids this exposure. One example of a more secure alternative is ssh. See the DB2RSHCMD registry variable documentation for restrictions on remote shell configurations.
After installing the DB2 database manager, also review, and change (if required), the default privileges that have been granted to users. By default, the installation process grants system administration (SYSADM) privileges to the following users on each operating system:
Windows environments A valid DB2 database user name that belongs to
the Administrators group.
Chapter 1. Installation prerequisites 7
UNIX platforms A valid DB2 database user name that belongs to
the primary group of the instance owner.
SYSADM
privileges are the most powerful set of privileges available within the
DB2 database manager. As a result, you might not want all of these users to have SYSADM privileges by default. The DB2 database manager provides the administrator with the ability to grant and revoke privileges to groups and individual user IDs.
By updating the database manager configuration parameter sysadm_group, the administrator can control which group of users possesses SYSADM privileges. Yo u must follow the guidelines below to complete the security requirements for both the DB2 database installation and the subsequent instance and database creation.
Any group defined as the system administration group (by updating sysadm_group) must exist. The name of this group should allow for easy identification as the group created for instance owners. User IDs and groups that belong to this group have system administrator authority for their respective instances.
The administrator should consider creating an instance owner user ID that is easily recognized as being associated with a particular instance. This user ID should have as one of its groups the name of the SYSADM group created above. Another recommendation is to use this instance-owner user ID only as a member of the instance owner group and not to use it in any other group. This should control the proliferation of user IDs and groups that can modify the instance, or any object within the instance.
The created user ID must be associated with a password to provide authentication before being permitted entry into the data and databases within the instance. The recommendation when creating a password is to follow your organization’s password naming guidelines.
To avoid accidentally deleting or overwriting instance configuration or other
Note:
files, administrators should consider using another user account, which does not belong to the same primary group as the instance owner, for day-to-day administration tasks that are performed on the server directly.
Related concepts:
v “General naming rules” in Administration Guide: Implementation
v “User, user ID and group naming rules” in Administration Guide: Implementation
v “Authentication” in Administration Guide: Planning
v “Authorization” in Administration Guide: Planning
v “Naming rules in a Unicode environment” in Administration Guide:
Implementation
v “Naming rules in an NLS environment” in Administration Guide: Implementation
v “Location of the instance directory” in Administration Guide: Implementation
v “UNIX platform security considerations for users” in Administration Guide:
Implementation
v “Windows platform security considerations for users” in Administration Guide:
Implementation
Related reference:
v “Communications variables” in Performance Guide
8 Getting started with DB2 installation and administration

Granting user rights (Windows)

This topic describes the steps required to grant user rights on Windows operating systems. Specific user rights are recommended for user accounts required to install and set up DB2.
Prerequisites:
To grant advanced user rights on Windows you must be logged on as a local Administrator.
Procedure:
1. Click Start and select Run ....
2. Type secpol.msc and click OK.
3. Select Local Security Policy.
4. In the left window pane, expand the Local Policies object, then select User
Rights Assignment.
5. In the right window pane, select the user right that you want to assign.
6. From the menu, select Action —> Security...
7. Click Add, then select a user or group to assign the right to, and click Add.
8. Click OK.
If your computer belongs to a Windows 2000 or Windows Server 2003 domain, the domain user rights may override your local settings. In this case, your Network Administrator will have to make the changes to the user rights.
Related concepts:
v “User, user ID and group naming rules” in Administration Guide: Implementation
Related reference:
v “Required user accounts for installation of DB2 server products (Windows)” in
Quick Beginnings for DB2 Servers

DB2 system administrator group considerations (Windows)

By default, system administrative (SYSADM) authority is granted to any valid DB2 user account that belongs to the Administrators group on the computer where the account is defined. If the account is a local account, then it must belong to the local Administrators group. If the account is a domain account, then it must belong to the Administrators group at the domain controller or the local Administrators group.
For example, if a user logs on to a domain account and tries to access a DB2 database, the DB2 database server goes to a domain controller to enumerate groups (including the Administrators group). You can force the DB2 database server to always perform group lookup on the local computer by setting the registry variable DB2_GRP_LOOKUP=local and adding the domain accounts (or global groups) to the local group.
For a domain user to have SYSADM authority, they must belong to the local Administrators group or the Administrators group at the domain controller. Since the DB2 database server always performs authorization at the machine where the
Chapter 1. Installation prerequisites 9
account is defined, adding a domain user to the local Administrators group on the server does not grant the domain user SYSADM authority to this group.
To avoid adding a domain user to the Administrators group at the domain controller, create a global group and add the domain users to which you want to grant SYSADM authority to it. Then update the DB2 configuration parameter SYSADM_GROUP with the name of the global group.
To update the DB2 configuration parameter, enter the following commands:
db2 update dbm cfg using sysadm_group global_group
db2stop db2start
Related concepts:
v “System administration authority (SYSADM)” in Administration Guide:
Implementation
Related reference:
v “sysadm_group - System administration authority group name configuration
parameter” in Performance Guide

Extending the directory schema (Windows)

If you plan to use the Lightweight Directory Access Protocol (LDAP) directory server feature with Windows 2000 or Windows Server 2003, you should extend the Active Directory schema to contain DB2 object classes and attribute definitions. You should perform this task before you install any DB2 products.
Extending the directory schema ensures that:
v The default DB2 instance, created during the installation, is cataloged as a DB2
node in Active Directory provided the installation user ID had sufficient privileges to write to Active Directory.
v Any databases that the user creates after installation will automatically be
cataloged into Active Directory.
you decide to install your DB2 product and create databases before you extend
If the directory schema, you will have to manually register the node and catalog the databases.
Prerequisites:
Your Windows user account must have Schema Administration authority.
Procedure:
To extend the directory schema:
1. Log onto the domain controller.
2. Run the db2schex.exe program from the installation CD with a user account
that has Schema Administration authority. Yo u can run this program without logging off and logging on again, as follows:
runas /user:MyDomain\Administrator x:\db2\Windows\utilities\db2schex.exe
where x: represents the CD drive letter.
10 Getting started with DB2 installation and administration
When db2schex.exe completes, you can proceed with the installation of your DB2 product.
Related reference:
v “Installation requirements for DB2 clients and servers (Windows)” on page 5
v “CATALOG LDAP DATABASE command” in Command Reference
v “REGISTER command” in Command Reference

Linux installation prerequisites

Installation requirements for DB2 clients and servers (Linux)

For the most up-to-date prerequisite information, see http://www.ibm.com/ software/data/db2/udb/sysreqs.html.
For the latest information on supported Linux distributions, point your browser to http://www.ibm.com/db2/linux/validate.
The supported operating systems for Linux include:
v Red Hat Enterprise Linux 4 (RHEL4) Update 2
v SUSE Linux Enterprise Server 9 (SLES9) Service Pack 2
To install a DB2 client or server product, the following distribution requirements, hardware, and communications prerequisites must be met:
Table 2. Linux prerequisites
Distribution Requirements Hardware
You should update your kernel configuration parameters in preparation for your Linux distribution. The default values for particular kernel parameters are not sufficient when running a DB2 database system.
DB2 server products are supported on:
v x86 (Intel Pentium®, Intel Xeon®, and AMD Athlon)
v x86–64 (Intel EM64T and AMD64)
v IA64 (Intel Itanium® 2 or higher)
You may also have other products or applications that require Linux system resources. You should set the kernel configuration parameters based on the needs of your Linux system working environment.
v POWER™ (any iSeries™ or pSeries® that support Linux)
v (Server only)eServer zSeries®.
– The Database Partitioning Feature (DPF) is not
supported.
The kernel configuration parameters are set in /etc/sysctl.conf. See the Modifying kernel parameters
(Client only)64-bit zSeries or System z9
v
(Linux) section of the DB2 Information Center.
Refer to your operating system manual for information on setting and activating these parameters using the
sysctl command.
Package requirements (server only):
The following tables list the package requirements for SUSE Linux and Red Hat distributions for DB2 Version 9 partitioned servers.
v The pdksh Korn Shell package is required for all DB2 systems.
v A remote shell utility is required for partitioned database systems. DB2 supports
the following remote shell utilities:
– rsh
– ssh
boxes.
Chapter 1. Installation prerequisites 11
By default, DB2 uses rsh when executing commands on remote DB2 nodes, for example, when starting a remote DB2 database partition. To use the DB2 default, the rsh-server package must be installed (see table below). For a comparison between rsh and ssh, see the “Security issues when installing DB2” section of the Administration Guide: Implementation.
If you choose to use the rsh remote shell utility, inetd (or xinetd) must be installed and running as well. If you choose to use the ssh remote shell utility, you need to set the DB2RSHCMD registry variable immediately after the DB2 installation is complete. If this registry variable is not set, rsh is used. For more information on the DB2RSHCMD registry variable, see the Performance Guide book.
v The nfs-utils Network File System support package is required for partitioned
database systems.
All required packages should be installed and configured before continuing with the DB2 setup. For general Linux information, see your Linux distribution documentation.
Package requirements for SUSE Linux
Package name Description
pdksh Korn Shell. This package is required for partitioned database
environments.
openssh This package contains a set of server programs which allow
users to run commands on (and from) remote computers via a secure shell. This package is not required if you use the default configuration of DB2 with rsh.
rsh-server This package contains a set of server programs which allow
users to run commands on remote computers, login in to other computers, and copy files between computers (rsh, rexec, rlogin, and rcp). This package is not required if you configure DB2 to use ssh.
nfs-utils Network File System support package. It allows access to local
files from remote computers.
Package requirements for Red Hat
Directory Package name Description
/System Environment/Shell pdksh Korn Shell. This package is required for
partitioned database environments.
/Applications/Internet openssh This package contains a set of client
programs which allow users to run commands on a remote computer via a secure shell. This package is not required if you use the default configuration of DB2 with rsh.
/System Environment/ Daemons
openssh-server This package contains a set of server
programs which allow users to run commands from a remote computer via a secure shell. This package is not required if you use the default configuration of DB2 with rsh.
12 Getting started with DB2 installation and administration
Package requirements for Red Hat
Directory Package name Description
/System Environment/ Daemons
rsh-server This package contains a set of programs
which allow users to run commands on a remote computer. Required for partitioned database environments. This package is not required if you configure DB2 to use ssh.
/System Environment/ Daemons
nfs-utils Network File System support package.
It allows access to local files from remote computers.
Software considerations:
v One of the following browsers is required to view online help and to run First
Steps (db2fs):
– Mozilla 1.4 and up
– Firefox 1.0 and up
– Netscape 7.0 and up
An X Window System software capable of rendering a graphical user interface is
v
required if you want to use the DB2 Setup wizard to install DB2 or if you want to use any DB2 graphical tools. (Available only on Linux for x86 and Linux on AMD 64/EM64T.)
DB2 product installation on NFS (Network File System):
The installation of DB2 products on NFS (Network File System) is not recommended. Running DB2 products on NFS (for example, NFS mounting /opt/IBM/db2/V9.1 and then running off code that was physically installed on a remote system) requires several manual setup steps. There are also a number of potential issues with setting up NFS for DB2. These include possible problems that involve:
v Performance (impacted by network performance)
v Availability (you are allowing a single point of failure)
v Licensing (there is no checking done across machines)
v Diagnosing NFS errors can be difficult
As mentioned, the setup for NFS will require several manual actions including:
v Ensuring that the mount point preserve the install path
v Permission must be controlled (for example, write permission should not be
given to the mounting machine)
v DB2 registries have to be set up manually and maintained across all mounting
machines
v The list installed DB2 products and features command (db2ls) must be set up
and maintained properly if you need to detect DB2 products and features
v More care is required when updating your DB2 product environment
v More steps are required when cleaning up on the exporting machine and the
mounting machine
For detailed instructions, look for the “Setting Up DB2 on NFS Mounted File System” white paper which will be available soon after DB2 Version 9 is made available.
Chapter 1. Installation prerequisites 13
Related concepts:
v “Security issues when installing the DB2 database manager” on page 6
Related tasks:
v “Modifying kernel parameters (Linux)” in Quick Beginnings for DB2 Servers
v “Preparing to install DB2 for Linux on zSeries” in Quick Beginnings for DB2
Servers
Related reference:
v “Communication protocols supported” in Quick Beginnings for DB2 Clients
v “IBM Software Development Kit for Java levels for DB2 products” in Quick
Beginnings for DB2 Servers
v “Communications variables” in Performance Guide

Centralized user-management considerations (Linux)

In environments that include security software, such as NIS (Network Information Services) or NIS+, there are some installation considerations. The DB2 installation scripts attempt to update objects that are under the control of the security packages, such as users and groups, and will not be able to do so if NIS or NIS+ is being used for user management.
At instance creation, without a security component present, instance owner’s group list is modified to include that of the database administrative server (DAS) user’s primary group, if the DAS is created. If the instance creation program is unable to modify these properties (it will not if NIS/NIS+ is controlling the group), it reports that it could not. The warning message provides the necessary information to manually make the changes.
These considerations hold true for any environment in which an external security program does not allow the DB2 installation or instance creation programs to modify user characteristics.
If the DB2 Setup wizard detects NIS on your computer, you are not given the option of creating new users during the installation. Instead, you must choose existing users.
Consider the following restrictions if you are using NIS or NIS+:
v Groups and users must be created on the NIS server before running the DB2
Setup wizard.
v Secondary groups must be created for the DB2 instance owner and the DB2
Administration Server on the NIS server. Yo u must then add the primary group of the instance owner to the secondary DB2 Administration Server group. Likewise, you must add the primary DB2 Administration Server group to the secondary group for the instance owner.
v On a partitioned DB2 database system, before you create an instance, there must
be an entry for the instance in the etc/services file. For example, if you want to create an instance for the user db2inst1, you require an entry similar to the following:
DB2_db2inst1 50000/tcp
Related tasks:
v “Installing DB2 servers (Linux)” on page 19
14 Getting started with DB2 installation and administration
Related reference:
v “Installation requirements for DB2 clients and servers (AIX)” in Quick Beginnings
for DB2 Servers
v “Installation requirements for DB2 clients and servers (HP-UX)” in Quick
Beginnings for DB2 Servers
v “Installation requirements for DB2 clients and servers (Linux)” on page 11
v “Installation requirements for DB2 clients and servers (Solaris Operating
System)” in Quick Beginnings for DB2 Servers
Chapter 1. Installation prerequisites 15
16 Getting started with DB2 installation and administration

Chapter 2. Installation

Installing DB2 servers (Windows)

This task describes how to start the DB2 Setup wizard on Windows. You will use the DB2 Setup wizard to define your installation and install your DB2 product on your system.
Prerequisites:
Before you start the DB2 Setup wizard:
v If you are planning on setting up a partitioned database environment, see the
"Setting up a partitioned database environment" topic.
v Ensure that your system meets installation, memory, and disk requirements.
v If you are planning to use LDAP on Windows 2000 or Windows Server 2003 to
register the DB2 server in Active Directory, you should extend the directory schema before you install.
v You must have a local Administrator user account with the recommended user
rights to perform the installation.
v Although not mandatory, it is recommended that you close all programs so that
the installation program can update any files on the computer without requiring a reboot.
Restrictions:
v The DB2 copy name and the instance name cannot start with a numeric value.
v The DB2 copy name and the instance name must be unique among all DB2
copies.
v The use of XML features is restricted to a database that is defined with the code
set UTF-8 and that has only one database partition.
Procedure:
To start the DB2 Setup wizard:
1. Log on to the system with the local Administrator account that you have
defined for the DB2 installation.
2. Insert your DB2 product CD into the drive. If enabled, the auto-run feature
automatically starts the DB2 Setup launchpad. If the auto-run does not work, use Windows Explorer to browse the DB2 product CD and double-click on the setup icon.
3. From the DB2 Setup launchpad, you can view installation prerequisites and the
release notes, or you can proceed directly to the installation. Yo u may want to review the installation prerequisites and release notes for late-breaking information.
4. Click Install a Product and the Install a Product window will display the
products available for installation.
If you have no existing DB2 products installed on your computer, launch the installation by clicking Install New. Proceed through the installation following the DB2 Setup wizard's prompts.
© Copyright IBM Corp. 1993, 2006 17
If you have at least one existing DB2 product installed on your computer, you can:
v Click Install New to create a newDB2 copy
v Click Work with Existing to upgrade an existing DB2 copy, to add
functionality to an existing DB2 copy, or to install an add-on product.
v Click Migrate to migrate an existing DB2 Version 8 copy.
The DB2 Setup wizard will determine the system language, and launch the
5.
setup program for that language. Online help is available to guide you through the remaining steps. To invoke the online help, click Help or press F1. You can click Cancel at any time to end the installation.
DB2 product will be installed, by default, in the x:\Program
Your Files\IBM\sqllib directory, where x: represent the drive letter of the drive where you have installed your DB2 product.
If you are installing on a system where this directory is already being used, the DB2 product installation path will have _xx added to it, where _xx are digits, starting at 01 and increasing depending on how many DB2 copies you have installed.
You can also specify your own DB2 product installation path.
For information on errors encountered during installation, review the installation log file located in the My Documents\DB2LOG\ directory. The log file uses the following format: DB2-ProductAbrrev-DateTime.log, for example, DB2-ESE-Tue Apr 04 17_04_45 2006.log.
If you want your DB2 product to have access to DB2 documentation either on your local computer or on another computer on your network, then you must install the DB2 Information Center. TheDB2 Information Center contains documentation for the DB2 database system and DB2 related products. By default, DB2 information will be accessed from the web if the DB2 Information Center is not locally installed.
DB2 Express memory limits and the DATABASE_MEMORY configuration parameter:
If you are installing DB2 Express Edition or DB2 Express-C Edition on a system that has more memory than the maximum memory limit of 4GB, as outlined in the terms and conditions of the product, you need to explicitly set the DATABASE_MEMORY configuration parameter to 4GB or less, so that the Self Tuning Memory Manager will work within your licensed memory limits.
Note: If you have more than one database on that server, the sum of all database
memory usage cannot exceed 4GB.
You can use the Control Center or the UPDATE DATABASE CONFIGURATION command to make this change. For example, to set the DATABASE_MEMORY limit to 4GB, enter the following command:
DB2 UPDATE DATABASE CONFIGURATION using DATABASE_MEMORY 1000000 IMMEDIATE; CONNECT RESET;
Also, when using the Configuration Advisor to assist you in configuring the performance of your database, you need to set the Target Memory on the Server page to a percentage of your total system memory that will ensure you stay under the 4GB memory limit.
18 Getting started with DB2 installation and administration
Related concepts:
v “About the Release Notes” in Release notes
v “DB2 database object naming rules” in Administration Guide: Implementation
v “DB2 Information Center installation options” in Quick Beginnings for DB2 Servers
Related tasks:
v “Notification and contact list setup and configuration” in Administration Guide:
Implementation
v “Tools catalog database and DB2 administration server (DAS) scheduler setup
and configuration” in Administration Guide: Implementation
v “Migrating a DB2 server (Windows)” in Migration Guide
v “Setting up a partitioned database environment” in Quick Beginnings for DB2
Servers
v “Using the Default DB2 Selection wizard (Windows)” in Quick Beginnings for
DB2 Servers
Related reference:
v “UPDATE ADMIN CONFIGURATION command” in Command Reference
v “Multiple DB2 copies roadmap” in Administration Guide: Implementation
v “Disk and memory requirements” on page 3
v “Installation requirements for DB2 clients and servers (Windows)” on page 5
v “Language identifiers for running the DB2 Setup wizard in another language”
on page 67

Installing DB2 servers (Linux)

This task describes how to start the DB2 Setup wizard on Linux systems. The DB2 Setup wizard is used to define your installation preferences and to install your DB2 product on your system.
Prerequisites:
Before you start the DB2 Setup wizard:
v Ensure that your system meets installation, memory, and disk requirements. v You must have root authority to perform the installation.
v The DB2 product image must be available.
v The DB2 Setup wizard is a graphical installer. You must have X windows
software capable of rendering a graphical user interface for the DB2 Setup wizard to run on your machine. Ensure that the X windows server is running. Ensure that you have properly exported your display. For example, export
DISPLAY=9.26.163.144:0.
v If NIS/NIS+ or similar security software is used in your environment, you must
manually create required DB2 users before you start the DB2 Setup wizard. Refer to the referenced Centralized user-management considerations topic before you begin.
Restrictions:
The use of XML features is restricted to a database that is defined with the code set UTF-8 and has only one database partition.
Chapter 2. Installation 19
Procedure:
To start the DB2 Setup wizard:
1. Log on to the system as a user with root authority.
2. Change to the directory where the DB2 product CD is mounted by entering the
following command:
cd /cdrom
where /cdrom represents mount point of the DB2 product CD.
3. If you downloaded the DB2 product image, you must decompress and untar
the product file.
a. Decompress the product file:
gzip -d product.tar.gz
where product is the name of the product that you downloaded.
b. Untar the product file:
tar -xvf product.tar
c. Change directory:
cd ./product/disk1
4. Enter the ./db2setup command from the directory where the product image
resides to start the DB2 Setup wizard.
5. The IBM DB2 Setup Launchpad opens. From this window, you can view
installation prerequisites and the release notes, or you can proceed directly to the installation. Yo u may want to review the installation prerequisites and release notes for late-breaking information.
6. Click Install a Product and the Install a Product window will display the
products available for installation.
Launch the installation by clicking Install New. Proceed through the installation following the DB2 Setup wizard's prompts.
Once you have initiated the installation, proceed through the DB2 Setup wizard installation panels and make your selections. Installation help is available to guide you through the remaining steps. To invoke the installation help, click Help or press F1. Yo u can click Cancel at any time to end the installation.
Your DB2 product will be installed, by default, in the following directory:
Linux /opt/ibm/db2/V9.1
you are installing on a system where this directory is already being used, the
If DB2 product installation path will have _xx added to it, where _xx are digits, starting at 01 and increasing depending on how many DB2 copies you have installed.
You can also specify your own DB2 product installation path.
installation logs, db2setup.log and db2setup.err will be located, by default, in
The the /tmp directory. Yo u can specify the location of the log files.
The db2setup.log file captures all DB2 installation information including errors. The db2setup.err file captures any error output that is returned by Java™ (for example, exceptions and trap information).
There is no longer a db2setup.his file. Instead, the DB2 installer saves a copy of the db2setup.log file in the DB2_DIR/install/logs/ directory, and renames it
20 Getting started with DB2 installation and administration
db2install.history. If the name already exists, then the DB2 installer renames it db2install.history.xxxx, where xxxx is 0000-9999, depending on the number of installations you have on that machine.
Each installation copy has a separate list of history files. If an installation copy is removed, the history files under this install path will be removed as well. This copying action is done near the end of the installation and if the program is stopped or aborted before completion, then the history file will not be created.
On Linux 32-bit, if you want your DB2 product to have access to DB2 documentation either on your local computer or on another computer on your network, then you must install the DB2 Information Center. The DB2 Information Center contains documentation for the DB2 database system and DB2 related products.
DB2 Express memory limits and the DATABASE_MEMORY configuration parameter:
If you are installing DB2 Express Edition or DB2 Express-C Edition on a system that has more memory than the maximum memory limit of 4GB, as outlined in the terms and conditions of the product, you need to explicitly set the DATABASE_MEMORY configuration parameter to 4GB or less, so that the Self Tuning Memory Manager will work within your licensed memory limits.
Note: If you have more than one database on that server, the sum of all database
memory usage cannot exceed 4GB.
You can use the Control Center or the UPDATE DATABASE CONFIGURATION command to make this change. For example, to set the DATABASE_MEMORY limit to 4GB, enter the following command:
DB2 UPDATE DATABASE CONFIGURATION using DATABASE_MEMORY 1000000 IMMEDIATE; CONNECT RESET;
Also, when using the Configuration Advisor to assist you in configuring the performance of your database, you need to set the Target Memory on the Server page to a percentage of your total system memory that will ensure you stay under the 4GB memory limit.
Related concepts:
v “DB2 Information Center installation options” in Quick Beginnings for DB2 Servers
v “DB2 database object naming rules” in Administration Guide: Implementation
Related tasks:
v “Notification and contact list setup and configuration” in Administration Guide:
Implementation
v “Tools catalog database and DB2 administration server (DAS) scheduler setup
and configuration” in Administration Guide: Implementation
v “Migrating a DB2 server (Linux and UNIX)” in Migration Guide
Related reference:
v “Centralized user-management considerations (Linux)” on page 14
v “UPDATE ADMIN CONFIGURATION command” in Command Reference
v “Multiple DB2 copies roadmap” in Administration Guide: Implementation
Chapter 2. Installation 21
22 Getting started with DB2 installation and administration
Loading...
+ 79 hidden pages