LDP/LDP/howto/docbook/DB2-HOWTO.xml

2449 lines
129 KiB
XML
Raw Normal View History

2005-01-04 20:46:13 +00:00
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
2001-04-27 16:58:10 +00:00
<!ENTITY colon "&#x003A;"> <!-- COLON -->
<!ENTITY dollar "&#x0024;"> <!-- DOLLAR SIGN -->
<!ENTITY mdash "&#x2014;"> <!-- EM DASH -->
2005-01-04 20:46:13 +00:00
<!ENTITY ndash "&#x2013;"> <!-- EM DASH -->
<!ENTITY reg "&#x00AE;"> <!-- EM DASH -->
<!ENTITY trade "&#x2122;"> <!-- EM DASH -->
2001-04-27 16:58:10 +00:00
]>
<article id="index">
<!-- CVS revision info: $Id$ -->
2001-04-27 16:58:10 +00:00
<articleinfo>
2005-01-04 20:46:13 +00:00
<title>DB2 Universe Database Version 8.2 for Linux HOWTO</title>
<author>
<firstname>Ian</firstname>
<surname>Hakes</surname>
</author>
<author>
<firstname>Rory</firstname>
<surname>Hinton</surname>
</author>
<othercredit role='converter'>
<firstname>Dan</firstname>
<surname>Scott</surname>
<contrib>Conversion to DocBook XML.</contrib>
</othercredit>
<authorinitials>idmh</authorinitials>
2001-04-27 16:58:10 +00:00
<revhistory>
<revision>
2005-01-04 20:46:13 +00:00
<revnumber>1.0.0</revnumber>
<date>2004-12-09</date>
<authorinitials>idmh</authorinitials>
<revremark>Initial release of DB2 V8.2 HOWTO.
</revremark>
</revision>
<revision>
<revnumber>1.0.1</revnumber>
<date>2005-01-06</date>
<authorinitials>idmh</authorinitials>
<revremark>Fixed typos in Red Hat 2.6 Enhancements section
</revremark>
</revision>
2001-04-27 16:58:10 +00:00
</revhistory>
<abstract>
<para>
2005-01-04 20:46:13 +00:00
This HOWTO is intended for anyone interested in installing and
using 32-bit IBM DB2&reg; Universal Database on Linux&reg;. If you're
interested in 64&ndash;bit or other architectures, we refer you to the
official documentation sources (see the Resources section for a
link).
2001-04-27 16:58:10 +00:00
</para>
</abstract>
</articleinfo>
2005-01-04 20:46:13 +00:00
<sect1 id='introduction'><title>Introduction</title>
<sect2><title>Who should read this HOWTO</title>
<para>This HOWTO is intended for anyone interested in installing and
using 32-bit IBM DB2&reg; Universal Database on Linux&reg;. If you're
interested in 64&ndash;bit or other architectures, we refer you to the
official documentation sources (see the Resources section for a
link).</para>
<para>The information found in this document is based on our experiences
installing and configuring DB2 UDB Version 8.2.</para></sect2>
<sect2><title>Disclaimer</title>
<para>No liability for the contents of this document can be accepted.
Use the concepts, examples and information at your own risk. There may
be errors and inaccuracies, that could be damaging to your system.
Proceed with caution, and although it is highly unlikely that accidents
will happen because of following advice or procedures described in this
document, the authors do not take any responsibility for any damage
claimed to be caused by doing so.</para>
<para>All copyrights are held by their by their respective owners,
unless specifically noted otherwise. Use of a term in this document
should not be regarded as affecting the validity of any trademark or
service mark. Naming of particular products or brands should not be seen
as endorsements.</para>
<para>This HOWTO is not official IBM documentation, and cannot be
construed as such. IBM accepts no responsibility, liability or coverage
for the material or instructions contained in this HOWTO. The views
expressed in this document are those of the authors and not IBM
Corporation.</para></sect2>
<sect2><title>Copyright and license</title>
<para>Copyright (c) 2004 IBM Corporation.</para>
<para>Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License, Version
1.2 or any later version published by the Free Software Foundation;
with the Invariant Sections being "Disclaimer" and "About the Authors".
This document is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without ebaseven the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. A copy of the
license is included in the section entitled "GNU Free Documentation
License".</para></sect2>
<sect2><title>Credits</title>
<para>Ian Hakes is the current owner and maintainer of this HOWTO.
Please send all suggestions for improvement, criticisms or questions to
db2howto@REMgmail.com (remove the REM).</para>
<para>Big thanks to Dan Scott, who kindly handed this project over with
his blessing, and even found time to handle the DocBook conversion for this
version. Dan is responsible for getting both of us interested in
DB2 UDB on Linux throughout the past four years. His work on the
original DB2 UDB Version 7.1 for Linux HOWTO, published by the LDP,
stands as a testament to his hard work and dedication and we hope this
document can live up to those high standards.</para>
<para>We'd also to thank: Rav Ahuja, Grant Hutchison, Ryan Chase, and
Darin McBride for their input and patience in answering our endless
stream of questions.</para>
<para>Most of all, we must thank our wives and children for allowing us
to spend weeknights and weekends clattering away on our laptops and
servers to get this document together. We couldn't have done it without
their love and support.</para></sect2>
<sect2><title>About the authors</title>
<para>Ian Hakes, R.H.C.E., has worked for IBM in DB2 UDB Information
Development since 1999. Currently, he is the team lead for the DB2 UDB
Information Development Infrastructure team, developing solutions to
improve writers lives as they put together the official documentation.
Before that, he was the writer responsible for the DB2 UDB SQL Reference
manual. His free time is spent mainly on computers, thinking about how
much nicer it would be to be outside sailing or hiking.</para>
<para>Rory A.A. Hinton, Ph.D., is presently employed at ATI
Technologies. He works in Application Engineering, writing BIOS
development and register programming reference guides. In his spare
time, he cuts his lawn, drinks Ricard with ice and water, and hosts a
weekly talk radio show on CIUT 89.5 FM in Toronto. He tries to live by
the motto: "I want to work, provide for my family, and die quietly
without pain."</para></sect2></sect1>
<sect1 id='prerequisites'><title>Prerequisites</title>
<para>Prerequisites are the elements required on your system before you
can install and use DB2 UDB Version 8.2. These elements include
hardware, software, and communication pieces required for DB2 UDB
Version 8.2 to run successfully. This section covers:
2001-04-27 16:58:10 +00:00
<itemizedlist>
2005-01-04 20:46:13 +00:00
<listitem><para>Hardware requirements:
2001-04-27 16:58:10 +00:00
<itemizedlist>
2005-01-04 20:46:13 +00:00
<listitem><para>Supported processors</para></listitem>
<listitem><para>Disk space requirements</para></listitem>
<listitem><para>Memory
requirements</para></listitem>
</itemizedlist></para></listitem>
<listitem><para>Software requirements:
2001-04-27 16:58:10 +00:00
<itemizedlist>
2005-01-04 20:46:13 +00:00
<listitem><para>Linux distribution</para></listitem>
<listitem><para>Kernel levels and libraries
requirements</para></listitem>
<listitem><para>Additional software requirements</para></listitem>
<listitem><para>The IBM Developer Kit (SDK) for
Java&trade;</para></listitem>
</itemizedlist></para></listitem></itemizedlist></para>
<sect2><title>Hardware requirements</title>
<sect3><title>Supported processors</title>
2001-04-27 16:58:10 +00:00
<para>
<itemizedlist>
2005-01-04 20:46:13 +00:00
<listitem><para>x86 (Intel&reg; Pentium&reg;, Intel Xeon, and AMD
Athlon)</para></listitem>
<listitem><para>x86&ndash;64 (Intel EM64T and AMD64)</para></listitem>
<listitem><para>IA64 (Intel Itanium 2 or later)</para></listitem>
<listitem><para>POWER&trade; (any iSeries&trade; or pSeries&reg; that
supports
Linux)</para></listitem>
</itemizedlist></para></sect3>
<sect3><title>Disk space requirements</title>
<para>Take into account the disk space requirements before you install
and configure DB2 UDB on your distribution:
<table><title>Disk space requirements</title>
<tgroup cols="3">
<colspec colname="COL1"></colspec>
<colspec colname="COL2"></colspec>
<colspec colname="COL3"></colspec>
<thead>
<row>
<entry valign="top" colname="COL1"><para>Install type</para></entry>
<entry valign="top" colname="COL2"><para>Description</para></entry>
<entry valign="top" colname="COL3"><para>Required disk
space</para></entry></row></thead>
<tbody>
<row>
<entry colname="COL1"><para>Typical</para></entry>
<entry colname="COL2"><para>DB2 UDB is installed with most features and
functionality, including graphical tools such as the Control Center and
the Development Center.</para></entry>
<entry colname="COL3"><para>450 to 500 MB</para></entry></row>
<row>
<entry colname="COL1"><para>Compact</para></entry>
<entry colname="COL2"><para>DB2 UDB is installed with basic features and
functionality, without the graphical tools.</para></entry>
<entry colname="COL3"><para>350 to 400 MB</para></entry></row>
<row>
<entry colname="COL1"><para>Custom</para></entry>
<entry colname="COL2"><para>This option allows you to select the
features and functionality that you want to install.</para></entry>
<entry colname="COL3"><para>350 to 700
MB</para></entry></row></tbody></tgroup></table></para>
<para>It's important to allocate enough disk space for the required
software prerequisites, along with the product documentation (if
desired) and the databases you create. For example, in Version 8.2, DB2
UDB product documentation is accessed through the DB2 UDB Information
Center. This is a separately installable product that requires at least
100 MB when installing the core English language files. Additional space
is required for additional languages. However, if disk space is an
issue, you can configure DB2 UDB to access the Information Center from
the Web. More detail about this really great feature is provided in the
section called "Installing the DB2 UDB Information Center"
.</para></sect3>
<sect3><title>Memory requirements</title>
<para>You should allocate a minimum of 256 MB of RAM for a product like
the DB2 UDB Enterprise Server Edition, but additional memory should be
allocated for other software and communication processes. When
determining memory requirements, consider the following points:
2001-04-27 16:58:10 +00:00
<itemizedlist>
2005-01-04 20:46:13 +00:00
<listitem><para>Your SWAP space should be at least twice as much as your
RAM.</para></listitem>
<listitem><para>Additional memory should be allocated for any non-DB2
UDB software that may be running on your system.</para></listitem>
<listitem><para>Additional memory is required to support database
clients and database activity.</para></listitem>
<listitem><para>These memory requirements will be affected by the size
and complexity of your database system, as well as specific performance
requirements.</para></listitem>
</itemizedlist></para></sect3></sect2>
<sect2><title>Software requirements</title>
<sect3><title>Distribution levels that are supported by DB2 UDB Version 8.2</title>
<para>In DB2 UDB Version 6, only 32-bit Intel architectures were
supported. With the release of DB2 UDB Version 8.2, IBM has demonstrated
its support for the Linux platform by validating on a much broader range
of architectures. For the sake of convenience, this table lists the
recommended and validated distributions that DB2 UDB officially supports
in Version 8.2.
<table><title>Recommended and validated distributions</title>
<tgroup cols="9">
<colspec colname="COL1" colwidth="133*"></colspec>
<colspec colname="COL2" colwidth="52*"></colspec>
<colspec colname="COL3" colwidth="63*"></colspec>
<colspec colname="COL4" colwidth="66*"></colspec>
<colspec colname="COL5" colwidth="67*"></colspec>
<colspec colname="COL6" colwidth="62*"></colspec>
<colspec colname="colspec1" colwidth="55*"></colspec>
<colspec colname="COL7" colwidth="50*"></colspec>
<colspec colname="colspec2" colwidth="55*"></colspec>
<thead>
<row>
<entry valign="middle" colname="COL1" morerows="3" align="center"><para>Distributions</para></entry>
<entry valign="middle" nameend="colspec2" align="center" namest="COL2"><para>Platforms</para></entry></row>
<row>
<entry valign="middle" colname="COL2" morerows="1" align="center"><para>x86</para></entry>
<entry valign="middle" nameend="COL4" align="center" namest="COL3"><para>x86_64</para></entry>
<entry valign="middle" colname="COL5" morerows="1" align="center"><para>IA64</para></entry>
<entry valign="middle" nameend="colspec1" morerows="1" align="center" namest="COL6"><para>POWER</para></entry>
<entry valign="middle" nameend="colspec2" morerows="1" align="center" namest="COL7"><para>zSeries&reg;</para></entry></row>
<row>
<entry valign="middle" colname="COL3" align="center"><para>AMD64</para></entry>
<entry valign="middle" colname="COL4" align="center"><para>EM64T</para></entry></row>
<row>
<entry valign="middle" colname="COL2" align="center"><para>32&ndash;bit</para></entry>
<entry valign="middle" colname="COL3" align="center"><para>64&ndash;bit</para></entry>
<entry valign="middle" colname="COL4" align="center"><para>64&ndash;bit</para></entry>
<entry valign="middle" colname="COL5" align="center"><para>64&ndash;bit</para></entry>
<entry valign="middle" colname="COL6" align="center"><para>32&ndash;bit</para></entry>
<entry valign="middle" colname="colspec1" align="center"><para>64&ndash;bit</para></entry>
<entry valign="middle" colname="COL7" align="center"><para>31&ndash;bit</para></entry>
<entry valign="middle" colname="colspec2" align="center"><para>64&ndash;bit</para></entry></row></thead>
<tbody>
<row>
<entry colname="COL1"><para>Red Hat Enterprise Linux (RHEL)
3</para></entry>
<entry colname="COL2" align="center"><para>x</para></entry>
<entry colname="COL3" align="center"><para>x</para></entry>
<entry colname="COL4" align="center"><para>x</para></entry>
<entry colname="COL5" align="center"><para>x</para></entry>
<entry colname="COL6" align="center"><para>x</para></entry>
<entry colname="colspec1" align="center"><para>x</para></entry>
<entry colname="COL7" align="center"><para>x</para></entry>
<entry colname="colspec2" align="center"><para>x</para></entry></row>
<row>
<entry colname="COL1"><para>SuSE Linux Enterprise Server (SLES)
8</para></entry>
<entry colname="COL2" align="center"><para>x</para></entry>
<entry colname="COL3" align="center"><para>x</para></entry>
<entry colname="COL4" align="center"><para></para></entry>
<entry colname="COL5" align="center"><para>x</para></entry>
<entry colname="COL6" align="center"><para>x</para></entry>
<entry colname="colspec1" align="center"><para></para></entry>
<entry colname="COL7" align="center"><para>x</para></entry>
<entry colname="colspec2" align="center"><para>x</para></entry></row>
<row>
<entry colname="COL1"><para>SuSE Linux Enterprise Server (SLES)
9</para></entry>
<entry colname="COL2" align="center"><para>x</para></entry>
<entry colname="COL3" align="center"><para>x</para></entry>
<entry colname="COL4" align="center"><para>x</para></entry>
<entry colname="COL5" align="center"><para>x</para></entry>
<entry colname="COL6" align="center"><para>x</para></entry>
<entry colname="colspec1" align="center"><para>x</para></entry>
<entry colname="COL7" align="center"><para>x</para></entry>
<entry colname="colspec2" align="center"><para>x</para></entry></row></tbody></tgroup></table>For
a list of all of the distributions that are officially supported, as
well as the latest information about kernels, libraries, integrated
cluster environments, and papers, refer to the DB2 UDB for Linux
validation Web site listed in the Resource
section.</para></sect3>
<sect3><title>Required kernel levels and libraries</title>
<sect4><title>Kernel parameter values</title>
<para>To successfully run DB2 UDB on your Linux distribution, you may be
required to update some of the default kernel parameter settings. For
example, the 2.4.x series kernel message queue parameter msgmni has a
default value that allows only a limited number of simultaneous
connections to DB2 UDB.</para>
<para>These are the recommended values for DB2 UDB to run optimally:
2001-04-27 16:58:10 +00:00
<itemizedlist>
2005-01-04 20:46:13 +00:00
<listitem><para>kernel.shmmax=268435456 for 32-bit</para></listitem>
<listitem><para>kernel.shmmax=1073741824 for 64-bit</para></listitem>
<listitem><para>kernel.msgmni=1024</para></listitem>
<listitem><para>fs.file-max=8192</para></listitem>
<listitem><para>kernel.sem="250 32000 32 1024"</para></listitem>
</itemizedlist></para>
<para>Fortunately, DB2 UDB Version 8.2 has a new feature that checks the
values of the kernel.semmni, kernel.msgmni, and kernel.shmmax parameters
when you enter the db2start command, and changes them for you if the
current values are not optimal. This new feature makes these changes:
<itemizedlist>
<listitem><para>The semmni kernel parameter is changed to
1024</para></listitem>
<listitem><para>The msgmni kernel parameter is changed to
1024</para></listitem>
<listitem><para>The shmmax kernel parameter is changed to 268435456
(32-bit) or 1073741824 (64-bit)</para></listitem>
</itemizedlist></para>
<para>For example, after you issue the db2start command for the
first time, you should receive output like the following messages in
your db2diag.log file:
<screen>
ADM0506I DB2 has automatically updated the "semmni" kernel
parameter from "128" to the recommended value "1024".
2004-07-31-16.38.59.074791 Instance:db2inst1
Node:000
PID:15996(db2sysc) TID:8192 Appid:none
base sys utilities sqlesysc_main Probe:9
ADM0506I DB2 has automatically updated the "msgmni" kernel
parameter from "16" to the recommended value "1024".
2004-07-31-16.38.59.076916 Instance:db2inst1
Node:000
PID:15996(db2sysc) TID:8192 Appid:none
base sys utilities sqlesysc_main Probe:9
ADM0506I DB2 has automatically updated the "shmmax" kernel
parameter from "33554432" to the recommended value "268435456".
2004-07-31-16.39.01.262594 Instance:db2inst1
Node:000
PID:15994(db2star2) TID:8192 Appid:none
base sys utilities startdbm Probe:911
ADM7513W Database manager has started.</screen></para>
<para>Notice that db2start did not update the fs.file-max parameter. Any
kernel at 2.4.18 and later automatically updates this parameter.
Because of this new feature, it is no longer necessary for you to
manually update the kernel.shmmax, kernel.msgmni, and kernel.sem
parameters prior to installing DB2
UDB.</para></sect4>
<sect4><title>Manually updating kernel parameters</title>
<para>However, if you need to change these default settings, you can
update them manually. To check your current shared memory segment,
semaphore array, and message queue limits, enter the ipcs -l command.
Your output should look something like this:
<screen> ------ Shared Memory Limits --------
max number of segments = 4096
max seg size (kbytes) = 32768
max total shared memory (kbytes) = 8388608
min seg size (bytes) = 1
------ Semaphore Limits --------
max number of arrays = 1024
max semaphores per array = 250
max semaphores system wide = 32000
max ops per semop call = 32
semaphore max value = 32767
------ Messages: Limits --------
max queues system wide = 1024
max size of message (bytes) = 8192
default max size of queue (bytes) = 16384
</screen></para>
<para>For example, here are instructions on how to modify the
kernel.shmmax, kernel.sem, and the kernel.msgmni parameters on Red Hat
Linux 8, and how to keep them set after a reboot.
<orderedlist>
<listitem><para>Log on as a user with root authority</para></listitem>
<listitem><para>Open up <filename>/etc/sysctl.conf</filename> in a text editor and add
entries:
<screen>kernel.shmmax=268435456
kernel.msgmni=1024
kernel.sem="250 32000 32 1024"</screen></para></listitem>
<listitem><para>Enter the sysctl -p command to load in sysctl settings
from <filename>/etc/sysctl.conf</filename>.</para></listitem>
<listitem><para>Enter the ipcs -l to view the updated kernel parameters
in sysctl.</para></listitem>
</orderedlist>
To view all sysctl settings,
enter: <command>sysctl -a</command>. You can also temporarily update the kernel parameters
(during run time) by using the <command>sysctl -w</command> command. For example, to
change the kernel.msgmni parameter to 1024, enter the command:
<screen>sysctl -w kernel.msgmni=1024</screen>
These settings will
not remain after the next reboot unless they are saved in the
<filename>/etc/sysctl.conf</filename> file.</para>
<para>Again, consider the same procedure on SuSE Linux. Modifying kernel
parameters on SuSE Linux is a little different from the method on Red
Hat Linux. These instructions will explain how to update the
kernel.shmmax, kernel.sem, and the kernel.msgmni parameters, and how
to set them for reboot.
<orderedlist>
<listitem><para>Log in as a user with root authority.</para></listitem>
<listitem><para>Some SuSE Linux distributions do not have a
<filename>/etc/sysctl.conf</filename> file. If so, you need to create one manually using a
text editor.</para></listitem>
<listitem><para>In the <filename>/etc/sysctl.conf</filename> file, add entries:
<programlisting> kernel.shmmax=268435456
kernel.msgmni=1024
fs.file-max=8129
kernel.sem="250 32000 32 1024"</programlisting></para></listitem>
<listitem><para>Enter the <command>sysctl -p</command> command to load in sysctl settings
from <filename>/etc/sysctl.conf</filename>.</para></listitem>
<listitem><para>Add sysctl -p to a system initialization file to set
kernel parameters after each reboot. To do this, write a script and
configure it to run automatically at runlevel 5. Specifically, you
need to create an executable file in <filename class='directory'>/etc/init.d/</filename>, and then add pointers
to this script in <filename class='directory'>/etc/init.d/rc5.d</filename>. For example, in <filename class='directory'>/etc/init.d</filename> create
an executable file named <command>kerneldb2</command> that contains the script:
<screen>#! /bin/sh
#
#
# /etc/init.d/kerneldb2
#
### END INIT INFO
touch /var/lock/subsys/kerneldb2
/sbin/sysctl -p >> /var/lock/subsys/kerneldb2
</screen></para>
<para>Then in <filename class='directory'>/etc/init.d/rc5.d</filename>, we added pointers to the kerneldb2 script by entering
the commands:
<screen>cd /etc/init.d/rc5.d
ln -s ../kerneldb2 S99kerneldb2
ln -s ../kerneldb2 K99kerneldb2</screen>
Like Red Hat Linux, you
can temporarily update the kernel parameters (during run time) by using
the <command>sysctl -w</command> command. For example, to change the kernel.sem
parameter, enter the command:
<screen>sysctl -w kernel.sem="250 32000 32 1024"</screen>
Again, these settings will not
remain after the next reboot unless they are saved in the
<filename>/etc/sysctl.conf</filename>
file.</para></listitem>
</orderedlist></para></sect4></sect3>
<sect3><title>The IBM Developer Kit for Java (SDK), Version 1.3.1 and 1.4.1</title>
<para>If the IBM SDK for Java is required by a component being
installed, and it's not already installed on your computer, the SDK for
Java will be installed if you use either the DB2 UDB Setup wizard or a
response file to install the product. If you use the db2_install utility
to install DB2 UDB, the SDK won't get installed. In that case, you must
install the rpm file manually.</para>
<para>You require the appropriate level of IBM Software Development Kit
for Java (SDK) to use Java-based tools like the Control Center and the
Development Center, and to create and run Java applications, including
stored procedures and user-defined functions.</para>
<table><title>SDK levels by operating system</title>
<tgroup cols="2">
<colspec colname="COL1"></colspec>
<colspec colname="COL2"></colspec>
2001-04-27 16:58:10 +00:00
<thead>
<row>
2005-01-04 20:46:13 +00:00
<entry valign="middle" colname="COL1" align="center"><para>Operating
system</para></entry>
<entry valign="middle" colname="COL2" align="center"><para>SDK for Java
level</para></entry></row></thead>
2001-04-27 16:58:10 +00:00
<tbody>
<row>
2005-01-04 20:46:13 +00:00
<entry colname="COL1"><para>Linux x86</para></entry>
<entry colname="COL2"><para>SDK 1.4.1 Service Release
2</para></entry></row>
2001-04-27 16:58:10 +00:00
<row>
2005-01-04 20:46:13 +00:00
<entry colname="COL1"><para>Linux IA64</para></entry>
<entry colname="COL2"><para>SDK 1.3.1 Service Release
6</para></entry></row>
2001-04-27 16:58:10 +00:00
<row>
2005-01-04 20:46:13 +00:00
<entry colname="COL1"><para>Linux x86-64 (hybrid)</para></entry>
<entry colname="COL2"><para>32-bit SDK 1.4.1 Service Release
2</para></entry></row>
<row>
2005-01-04 20:46:13 +00:00
<entry colname="COL1" morerows="1"><para>Linux 390</para></entry>
<entry colname="COL2"><para>SDK 1.4.1 Service Release
2</para></entry></row>
2001-04-27 16:58:10 +00:00
<row>
2005-01-04 20:46:13 +00:00
<entry colname="COL2"><para>SDK 1.4.1 Service Release
2</para></entry></row>
2001-04-27 16:58:10 +00:00
<row>
2005-01-04 20:46:13 +00:00
<entry colname="COL1"><para>Linux PPC (hybrid)</para></entry>
<entry colname="COL2"><para>SDK 1.4.1 Service Release
2</para></entry></row></tbody></tgroup></table>
<para>To manually install the SDK rpm file:
<orderedlist>
<listitem><para>Run one of these rpm commands appropriate for your Linux
operating system from the <filename class='directory'>/cdrom/db2/linux/Java-1.4</filename> directory:
<table><title>RPM commands</title>
<tgroup cols="3">
<colspec colname="COL1"></colspec>
<colspec colname="COL2"></colspec>
<colspec colname="COL3"></colspec>
<thead>
<row valign="middle">
<entry colname="COL1" align="center"><para>Operating
system</para></entry>
<entry colname="COL2" align="center"><para>Command</para></entry>
<entry colname="COL3" align="center"><para>Destination
Directory</para></entry></row></thead>
<tbody>
2001-04-27 16:58:10 +00:00
<row>
2005-01-04 20:46:13 +00:00
<entry colname="COL1"><para>Linux IA32</para></entry>
<entry colname="COL2"><para>rpm -ivh
IBMJava2-SDK-1.4.1-2.0.i386.rpm</para></entry>
<entry colname="COL3"><para>/opt/IBMJava2-141</para></entry></row>
2001-04-27 16:58:10 +00:00
<row>
2005-01-04 20:46:13 +00:00
<entry colname="COL1"><para>Linux IA64</para></entry>
<entry colname="COL2"><para>rpm -ivh
IBMJava2-SDK-1.4.1-2.0.ia64.rpm</para></entry>
<entry colname="COL3"><para>/opt/IBMJava2-141</para></entry></row>
2001-04-27 16:58:10 +00:00
<row>
2005-01-04 20:46:13 +00:00
<entry colname="COL1"><para>Linux 390</para></entry>
<entry colname="COL2"><para>rpm -ivh
IBMJava2-SDK-1.4.1-2.0.s390.rpm</para></entry>
<entry colname="COL3"><para>/opt/IBMJava2-s390-141</para></entry></row>
2001-04-27 16:58:10 +00:00
<row>
2005-01-04 20:46:13 +00:00
<entry colname="COL1"><para>Linux 390 64-bit</para></entry>
<entry colname="COL2"><para>rpm -ivh
IBMJava2-SDK-1.4.1-2.0.s390x.rpm</para></entry>
<entry colname="COL3"><para>/opt/IBMJava2-s390-141</para></entry></row>
<row>
2005-01-04 20:46:13 +00:00
<entry colname="COL1"><para>Linux PPC 32-bit</para></entry>
<entry colname="COL2"><para>rpm -ivh
IBMJava2-SDK-1.4.1-2.0.ppc.rpm</para></entry>
<entry colname="COL3"><para>/opt/IBMJava2-ppc-141</para></entry></row>
2001-04-27 16:58:10 +00:00
<row>
2005-01-04 20:46:13 +00:00
<entry colname="COL1"><para>Linux PPC 64-bit</para></entry>
<entry colname="COL2"><para>rpm -ivh
IBMJava2-SDK-1.4.1-2.0.ppc64.rpm</para></entry>
<entry colname="COL3"><para>/opt/IBMJava2-ppc64-141</para></entry></row></tbody></tgroup></table></para></listitem>
<listitem><para>Set up the Java environment for all users by adding
these lines to your <filename>/etc/profile</filename> file:
<screen>export PATH=$PATH:/opt/<varname>dest-dir</varname>/jre/bin</screen>
where <varname>dest-dir</varname> corresponds to the destination directory listed in
the table above.</para></listitem>
</orderedlist></para>
<para>When you install DB2 UDB on Linux, the RPM-based installation
attempts to install IBM's version of Java (IBM SDK 1.4.1 SR2). If a
later installed level of the RPM, such as IBM SDK 1.5.1 SR1, is
detected, the back-level RPM is not installed.</para>
<para>However, in this case, the installation leaves the JDK_PATH
database configuration parameter pointing to the back-level path. As a
result, none of the Java-dependent functionality, including the
installation of the DB2 UDB Tools Catalog, will work.</para>
<para>To solve this problem, run this command as the instance owner (for
example, db2inst1):
<screen>db2 update dbm cfg using JDK_PATH <varname>existing SDK path</varname></screen>
where <varname>existing SDK path</varname> points to the previous Java path. This change will point DB2 UDB
to the correct IBM Developer Kit for the Java-based
tools.</para></sect3>
<sect3><title>Additional software requirements</title>
<para>Depending on your DB2 UDB requirements, you may be required to
install additional software packages for DB2 UDB to function properly.
Make sure that these software packages are installed prior to using DB2
UDB.
2001-04-27 16:58:10 +00:00
<itemizedlist>
2005-01-04 20:46:13 +00:00
<listitem><para>X Window System software, capable of rendering a
graphical user interface. You need this if you want to use the DB2 UDB
Setup wizard graphical installer, or any of the DB2 UDB graphical
tools.</para></listitem>
<listitem><para>A Web browser, to view topics in the DB2 UDB Information
Center.</para></listitem>
<listitem><para>If you are using NIS or NIS+ for security authentication
on your system, you must create DB2 UDB user accounts before installing
DB2 UDB.</para></listitem>
<listitem><para>Additional packages, as outlined in the following table:
<table><title>Package requirements</title>
<tgroup cols="3">
<colspec colname="COL2" colwidth="48*"></colspec>
<colspec colname="COL3" colwidth="75*"></colspec>
<colspec colname="COL4" colwidth="173*"></colspec>
<thead>
<row>
<entry valign="top" colname="COL2"><para>Package name</para></entry>
<entry valign="top" colname="COL3"><para>RPM name</para></entry>
<entry valign="top" colname="COL4"><para>Description</para></entry></row></thead>
<tbody>
<row>
<entry colname="COL2"><para>pdksh</para></entry>
<entry colname="COL3"><para>pdksh (version 5.2 or later)</para></entry>
<entry colname="COL4"><para>Korn Shell. Required for multiple-partition
database environments.</para></entry></row>
<row>
<entry colname="COL2"><para>rsh-server</para></entry>
<entry colname="COL3"><para>rsh (version 0.17 or later)</para></entry>
<entry colname="COL4"><para>Contains a set of programs that allow users
to run commands on a remote computer. Required for multiple-partition
environments.</para></entry></row>
<row>
<entry colname="COL2"><para>nfs-utils</para></entry>
<entry colname="COL3"><para>nfs-utils (version 1.0 or
later)</para></entry>
<entry colname="COL4"><para>Network File System support package. It
allows access for local files to remote machines. Required for systems
utilizing NFS
mounted drives.</para></entry></row></tbody></tgroup></table>
To check whether you have these packages installed, use the
<command>rpm -q</command> commands:
<screen>rpm -qa | grep pdksh
rpm -qa | grep rsh
rpm -qa | grep nfs</screen>
For each command, if you have these packages installed, your
system should return the following output:
<screen>pdksh-5.2.14-19
rsh-0.17-10
rsh-server-0.17-10
redhat-config-nfs-1.0.1-3
nfs-utils-1.0.1-2</screen>
To install these
packages on Red Hat Linux, use the Red Hat Linux installation CDs, or
the <command>up2date</command> utility, and the <command>rpm</command> command. For example, to install pdksh
on from the Red Hat Linux CD, mount the Red Hat Linux CD #3, and
enter this command as root:
<screen>rpm -ivh /mnt/cdrom/RedHat/RPMS/pdksh-5.2.14-19.i386.rpm</screen>
To install using the up2date package, run this command as root:
<screen>up2date pdksh</screen>
To install these packages on SuSE Linux, you can also use <command>rpm</command>
or use the handy YaST (Yet another Setup Tool) utility. For example, to
install pdksh on SuSE Linux Pro 8 using YaST:
<orderedlist>
<listitem><para>Log on as root</para></listitem>
<listitem><para>From the YaST Control Center, select Software -> Install
or Remove Software, then choose the appropriate
packages.</para></listitem>
</orderedlist></para></listitem>
</itemizedlist></para></sect3></sect2></sect1>
<sect1 id='planning'><title>Installation considerations and planning</title>
<para>After verifying that your system meets the basic requirements, you
need to plan your installation by considering installation methods,
storage planning, and the creation of users and groups:
<itemizedlist>
<listitem><para>Installation choices:
<itemizedlist>
<listitem><para>db2setup installation</para></listitem>
<listitem><para>db2_install installation</para></listitem>
<listitem><para>response file installation</para></listitem>
<listitem><para>RPM command
installation</para></listitem>
</itemizedlist></para></listitem>
<listitem><para>Storage planning:
<itemizedlist>
<listitem><para>Raw devices versus file systems
<itemizedlist>
<listitem><para>Raw device configuration</para></listitem>
<listitem><para>File system
configuration</para></listitem>
</itemizedlist></para></listitem>
<listitem><para>Log storage</para></listitem>
<listitem><para>Temporary table space
storage</para></listitem>
</itemizedlist></para></listitem>
<listitem><para>User and group setup:
<itemizedlist>
<listitem><para>User and group requirements</para></listitem>
<listitem><para>Creating users - single-partition</para></listitem>
<listitem><para>Creating users - multiple-partition
<itemizedlist>
<listitem><para>DAS user considerations for a multiple-partition
environment</para></listitem>
</itemizedlist></para></listitem></itemizedlist></para></listitem></itemizedlist></para>
<sect2><title>Installation methods</title>
<para>You can use four methods to install DB2 UDB:
<itemizedlist>
<listitem><para><command>db2setup</command> utility</para></listitem>
<listitem><para><command>db2_install</command> utility</para></listitem>
<listitem><para>A DB2 response file</para></listitem>
<listitem><para>Linux <command>rpm</command> command</para></listitem>
2001-04-27 16:58:10 +00:00
</itemizedlist>
2005-01-04 20:46:13 +00:00
Each
method has its own advantages and disadvantages. The preferred
method often depends on your level of expertise and type of environment,
but in general, if a graphical terminal is available, using db2setup is
recommended.</para>
<sect3><title>db2setup installation</title>
<para>The <command>db2setup</command> command starts the DB2 UDB Setup wizard, a
Java-based graphical tool that installs DB2 UDB. It lays down the DB2
UDB filesets, the IBM SDK for Java, and allows you to create DB2 UDB
instances, create new users and groups, configure existing users,
configure communications, create the tools catalog database, and set up
notification. The DB2 UDB Setup wizard also allows you to create a
response file.</para>
<para>Using <command>db2setup</command> is the best method for less experienced
users, because most of the configuration is automatically performed
during the installation. Again, you require X Window System software
capable of rendering a graphical user interface, to use db2setup
successfully.</para></sect3>
<sect3><title>db2_install installation</title>
<para>The <command>db2_install</command> command starts the <command>db2_install</command> script. This script
installs all DB2 UDB packages on your Linux system using the RPM
installation utility. This method is reliable and commonly used by
expert users for installing DB2 UDB on larger, more complex
multiple-partition systems. However, tasks such as setting up users and
groups, creating instances, tools catalog database creation, and
notification setup need to be performed manually after the
installation is completed.</para>
<para>A limitation to <command>db2_install</command> is that it only installs user
assistance (like help, messages, and tool interfaces) in English,
whereas <command>db2setup</command> installs support for one or more different languages.
Also, a <command>db2_install</command> installation can take longer (considering the higher
number of manual configuration tasks), it requires a higher level of
knowledge and skill, and it cannot create response
files.</para></sect3>
<sect3><title>Response file installation</title>
<para>A response file can be created using the DB2 UDB Setup wizard or
by editing a sample response file. It allows you to install DB2 UDB
across multiple machines with consistent installation and configuration
settings. A response file installation is fast, because it bypasses the
graphical wizard and does the configuration for you. Another advantage
of using a response file is that it creates a Database Administration
Server (DAS) on each machine, while with <command>db2_install</command>
the DAS must be created manually after installation.</para>
<para>The sample response file can be used to install DB2 UDB, configure
users, create instances, set up notification, create the tools catalog,
and configure a large number of DBM parameters. This is the quickest
installation method if you already have all the information you need.
Unlike <command>db2setup</command>, the response file installation is
not interactive, and it takes longer to prepare the response
file.</para></sect3>
<sect3><title>RPM command installation</title>
<para>The Red Hat Package Manager (RPM) is a Linux software installation
command. The various DB2 UDB installation methods use RPM to lay down
the appropriate files on the system. Using the RPM command to install
DB2 UDB allows you to select specific DB2 UDB files. However, the RPM
installation method will only install the DB2 UDB code. It will not
create instances, user IDs, or response files during DB2 installation.
Please note that this installation method is not officially supported or
recommended.</para></sect3></sect2>
<sect2><title>Storage planning</title>
<para>In this section these storage considerations are discussed:
<itemizedlist>
<listitem><para>Raw devices versus file systems
<itemizedlist>
<listitem><para>Raw device configuration</para></listitem>
<listitem><para>File system configuration</para></listitem>
</itemizedlist>
</para>
</listitem>
<listitem><para>Log storage</para></listitem>
<listitem><para>Temporary table space storage</para></listitem>
</itemizedlist></para>
<sect3><title>Raw devices versus file systems</title>
<para>This section describes and compares raw devices and file systems
as storage mechanisms for DB2 UDB on Linux, and how to configure
them.</para>
<sect4><title>Raw device configuration</title>
<para>Raw devices can only be used for Database Managed Storage (DMS).
DMS table spaces require more administration, but provide superior
performance over System Managed Storage. Using raw I/O improves
performance because it bypasses the buffering performed by the Linux
kernel and allows processes to interact with the physical device
directly. In comparison, the file system uses system-based I/O, which
means that data is buffered twice: first at the database manager level
and then at the kernel (or file system) level. At this level, the
kernel intercepts the calls and transfers the data to its own buffer
before passing it on to the physical device or process. The additional
buffering impedes performance.</para>
<para>To perform raw I/O on a block device, you must first bind the
Linux kernel's pool of raw device nodes to that block device. This is
done by running the <command>raw</command> command as root.
The <command>raw</command> utility is normally
supplied by the Linux distribution.</para>
<para>For example, if your disk partition is <filename class='partition'>/dev/hda12</filename> and you want to
bind it to <filename class='partition'>/dev/raw/raw1</filename>, enter the command:
<screen>bash# raw /dev/raw/raw1 /dev/hda12</screen>
Next, configure the
<filename>/etc/rc.d/boot.local</filename> file so that DB2 UDB can access the raw device at
boot time. This configuration is done by adding entries to
<filename>/etc/rc.d/boot.local</filename>:
<screen>raw /dev/raw/raw1 /dev/hda12 raw /dev/raw/raw2 /dev/hda13</screen>
To show
all current raw devices available, issue the following command:
<screen>raw -qa</screen>
You should receive output similar
to:
<screen>/dev/raw/raw1: bound to major 3, minor 12
/dev/raw/raw2: bound to major 3, minor 13</screen>
For detailed instructions on how to set up raw I/O on your Linux computer,
refer to the IBM DB2 UDB Administration Guide: Implementation documentation.</para></sect4>
<sect4><title>File system configuration</title>
<para>A popular method for configuring disk space for DB2 UDB on Linux
is to use separate file systems to store and run DB2 UDB. File systems
can be used by DB2 UDB either as system managed storage (SMS) or as
database managed storage (DMS). SMS table spaces are commonly used
because they provide good performance with very little administration
cost. File systems have many benefits. For example, they can be
distributed across a network and have network-oriented authentication
and replication capabilities, which makes them essential for a
multiple-partition database system.</para>
<para>You should create different partitions during your Linux OS
installation. It has become customary for certain basic directories,
such as <filename class='directory'>/db2home</filename> to be placed
in separate file systems, or partitions, for several reasons:
2001-04-27 16:58:10 +00:00
<itemizedlist>
2005-01-04 20:46:13 +00:00
<listitem><para>Disk capacity - there is a limited amount of space on
each disk, and you might run out of space if you use a single disk for
multiple purposes.</para></listitem>
<listitem><para>Performance - the root directory has to be searched
linearly every time any path name in Linux is accessed. If the root
directory is cluttered, this will impair performance of the entire
system.</para></listitem>
<listitem><para>Backup - it is better to separate frequently changing
data from seldom changing data. This way you can save system resources
by backing up some file systems more frequently than
others.</para></listitem>
<listitem><para>User convenience - it is easier to find things if the
naming convention is well-organized.</para></listitem>
2001-04-27 16:58:10 +00:00
</itemizedlist>
2005-01-04 20:46:13 +00:00
File system configuration, or partitioning, is typically performed by using the
<command>fdisk</command> tool. Red Hat Linux has a graphical disk configuration
utility; for SuSE Linux, you can also use the graphical YaST tool. Linux
provides several journal file system formats, such as Ext3, JFS, XFS and
ReiserFS.</para>
<para>For example, to show all defined file systems, issue the
<command>df</command> command. You should receive output that is similar
to this:
<screen>
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda1 4200828 1588840 2611988 38% /
/dev/hda5 54416 4682 46925 10% /boot
/dev/hda8 3099260 32828 2909000 2% /database
/dev/hda9 1035660 32828 950224 4% /db2log1
/dev/hda10 2071384 32828 1933332 2% /db2temp
/dev/hda7 1035660 32828 950224 4% /db2home_Local
/dev/hda11 3099260 20 2941808 1% /software_Local
/dev/hda19 1035660 32828 950224 4% /db2log2
</screen>
To show all NFS mounted file systems,
issue the <command>showmount -a</command> command on the host where the file system
physically exists. You should receive output that is similar to this:
<screen>udblnx03.local:/software
udblnx04.local:/software
udblnx05.local:/software</screen></para>
<para>There are many different ways to configure disk partitions and
file systems, depending on your environment. You should follow these
recommendations when configuring your system:
2001-04-27 16:58:10 +00:00
<itemizedlist>
2005-01-04 20:46:13 +00:00
<listitem><para>For single-partition and multiple-partition database
systems, you should create a separate file system for the DB2 UDB user
home directories. Avoid creating databases on this file system. For
multiple-partition environments, you should create a separate DB2 UDB
home file system on one of the machines in the cluster to be used as the
instance home directory. This file system is to be shared between all
machines in the cluster via NFS (that is, NFS-exported from the NFS
server machine, and NFS-mounted on the remaining
machines).</para></listitem>
<listitem><para>You should create a separate file system for database
storage. For multiple-partition database systems, there should be a
separate database file system on each physical system that participates
in the partitioned database.</para></listitem>
<listitem><para>For performance or availability reasons, you should
avoid putting user data on the catalog node. When restoring the catalog
node, the restore is faster when there is no data on this
node.</para></listitem>
<listitem><para>You should create separate partitions for the primary
copy of DB2 UDB logs, DB2 UDB mirrored logs, and DB2 UDB temporary table
spaces. In addition, you may want to create a separate file system for
user table spaces in order to separate them from the database files.
This configuration is commonly used in many production
environments.</para></listitem>
</itemizedlist>
Here is an example of one possible configuration:
<table><title>Partition configuration</title>
<tgroup cols="2">
<colspec colname="COL1"></colspec>
<colspec colname="COL2"></colspec>
<thead>
<row>
<entry valign="middle" colname="COL1" align="center"><para>Partition
name</para></entry>
<entry valign="middle" colname="COL2" align="center"><para>Description</para></entry></row></thead>
<tbody>
<row>
<entry colname="COL1"><para>/</para></entry>
<entry colname="COL2"><para>Linux</para></entry></row>
<row>
<entry colname="COL1"><para>/boot</para></entry>
<entry colname="COL2"><para>Linux</para></entry></row>
<row>
<entry colname="COL1"><para>/swap</para></entry>
<entry colname="COL2"><para>Linux Swap space</para></entry></row>
<row>
<entry colname="COL1"><para>/db2home</para></entry>
<entry colname="COL2"><para>For storing the home directories for DB2 UDB
users (for example, db2inst1, db2fenc1, dasusr1)</para></entry></row>
<row>
<entry colname="COL1"><para>/database</para></entry>
<entry colname="COL2"><para>For storing the
database</para></entry></row>
<row>
<entry colname="COL1"><para>/db2log1</para></entry>
<entry colname="COL2"><para>Used to storing primary copy of
logs</para></entry></row>
<row>
<entry colname="COL1"><para>/db2log2</para></entry>
<entry colname="COL2"><para>Used to store DB2 UDB mirrored
logs</para></entry></row>
<row>
<entry colname="COL1"><para>/db2temp</para></entry>
<entry colname="COL2"><para>For storing DB2 UDB temporary table
spaces</para></entry></row>
<row>
<entry colname="COL1"><para>/software</para></entry>
<entry colname="COL2"><para>Used for storing software. For example, we
downloaded the DB2 UDB install image into this
directory.</para></entry></row>
<row>
<entry colname="COL1"><para>/tablespaces</para></entry>
<entry colname="COL2"><para>Holds all user table
spaces</para></entry></row></tbody></tgroup></table>
<note><para>Mirroring log files helps protect a database from accidental
deletion of an active log and data corruption caused by disk
error. While this functionality increases the high availability of a
system, log mirroring may impact system performance as all log data will
be written to both the log path and the mirror log
path.</para></note></para></sect4></sect3>
<sect3><title>Log storage</title>
<para>By default, DB2 UDB sets the log path to the default database path
during database creation.</para>
<para>You should store both the primary copy of the logs and the mirror
logs each on a physically separate disk, preferably one that is also on
a different disk controller.</para>
<para>Mirror logs are created using the MIRRORLOGPATH
configuration parameter. Log mirroring allows the database to write an
identical second copy of log files to a different path. For example, you
can change the primary log path from the default to <filename class='directory'>/db2log1</filename>, and
set the mirror log path to <filename class='directory'>/db2log2</filename>
by issuing these commands:
<screen>db2 update db cfg for db_name using NEWLOGPATH /db2log1
db2 update db cfg for db_name using MIRRORLOGPATH /db2log2</screen>
<note><para>These changes will only take place after you deactivate and
activate your database, using the <command>db2stop</command> and
<command>db2start</command> commands.</para></note></para></sect3>
<sect3><title>Temporary table space storage</title>
<para>DB2 UDB uses system temporary table spaces for many SQL
operations, such as JOIN and SORT. The temporary table space,
TEMPSPACE1, is one of the three default table spaces (SYSCATSPACE,
TEMPSPACE1, and USERSPACE1) that gets created during database creation.
By default, TEMPSPACE1 gets placed in the database path. For larger
systems, we recommend that your temporary tables paces are located on a
separate file system and disk.</para>
<para>In a multiple-partition database environment, the catalog node
should contain all three default table spaces, and the other database
partitions should each contain only TEMPSPACE1 and USERSPACE1.</para>
<para>The following example shows how to create a system temporary table
space on multiple nodes in the <filename class='directory'>/db2temp</filename>
file system:
<programlisting>connect to db_name;
create temporary tablespace TEMPSPACE01 in IBMTEMPGROUP
managed by SYSTEM
using ('/db2temp/$INSTANCE/db_name/n001tmp/tempspace01') on \
dbpartitionnum (1)
using ('/db2temp/$INSTANCE/db_name/n002tmp/tempspace01') on \
dbpartitionnum (2)
using ('/db2temp/$INSTANCE/db_name/n003tmp/tempspace01') on \
dbpartitionnum (3)
using ('/db2temp/$INSTANCE/db_name/n004tmp/tempspace01') on \
dbpartitionnum (4)
extentsize 32
prefetchsize 128
bufferpool IBMDEFAULTBP
overhead 24.1
transferrate 0.9;
drop tablespace
tempspace1;</programlisting></para></sect3></sect2>
<sect2><title>User and group setup</title>
<para>DB2 UDB requires user IDs and groups. This section discusses these
IDs and groups and how to create them.</para>
<sect3><title>User and group requirements</title>
<para>DB2 UDB requires a minimum of three users and groups: the instance
owning user, the fenced user, and the Database Administration Server
(DAS) user. You may use the default names provided by the setup
utilities, or specify your own user and group names. For example,
consider the following default user IDs and group names produced by the
DB2 UDB Setup wizard:
<table><title>Default user IDs and group names</title>
<tgroup cols="4">
<colspec colname="COL1"></colspec>
<colspec colname="COL2"></colspec>
<colspec colname="COL3"></colspec>
<colspec colname="COL4"></colspec>
<thead>
<row>
<entry valign="middle" colname="COL1" align="center"><para>Required user</para></entry>
<entry valign="middle" colname="COL2" align="center"><para>User name</para></entry>
<entry valign="middle" colname="COL3" align="center"><para>Group name</para></entry>
<entry valign="middle" colname="COL4" align="center"><para>Description</para></entry></row></thead>
<tbody>
<row>
<entry colname="COL1"><para>Instance owner</para></entry>
<entry colname="COL2"><para>db2inst1</para></entry>
<entry colname="COL3"><para>db2iadm1</para></entry>
<entry colname="COL4"><para>Administers the
instance</para></entry></row>
<row>
<entry colname="COL1"><para>Fenced user</para></entry>
<entry colname="COL2"><para>db2fenc1</para></entry>
<entry colname="COL3"><para>db2fadm1</para></entry>
<entry colname="COL4"><para>Responsible for executing fenced user
defined functions, such as JDFs and stored
procedures.</para></entry></row>
<row>
<entry colname="COL1"><para>DAS user</para></entry>
<entry colname="COL2"><para>dasusr1</para></entry>
<entry colname="COL3"><para>db2asgrp</para></entry>
<entry colname="COL4"><para>Administers the DB2 UDB Administration
Server</para></entry></row></tbody></tgroup></table></para></sect3>
<sect3><title>Creating users - single-partition</title>
<para>You must have root authority to create users and groups. There are
three ways in which you can create a DB2 UDB user ID:
<itemizedlist>
<listitem><para>DB2 UDB Setup Wizard. The DB2 UDB Setup Wizard creates
all of the required users and groups for you during installation. The
default users and groups that get created are displayed in the previous
table. DB2 UDB Setup also gives you an option to specify your own user
and group names.</para></listitem>
<listitem><para>Response file. Users can also be created during a
response file installation if you specify user and group information in
the response file. For example, consider the following entries in a
response file that create the three required users and groups for DB2
UDB:
<programlisting>* DAS user
DAS_USERNAME = dasusr1
DAS_GROUP_NAME = dasadm1
DAS_HOME_DIRECTORY = /home/dasusr1
DAS_PASSWORD = 235262333285355231346
ENCRYPTED = DAS_PASSWORD
* Instance-owning user
inst1.NAME = db2inst1
inst1.GROUP_NAME = db2grp1
inst1.HOME_DIRECTORY = /db2home/db2inst1
inst1.PASSWORD = 235262333285355231346
ENCRYPTED = inst1.PASSWORD
inst1.AUTOSTART = YES
inst1.AUTHENTICATION = SERVER
inst1.SVCENAME = db2c_db2inst1
inst1.PORT_NUMBER = 50001
inst1.FCM_PORT_NUMBER = 60000
inst1.MAX_LOGICAL_NODES = 4
* Fenced user
nst1.FENCED_USERNAME = db2fenc1
inst1.FENCED_GROUP_NAME = db2fgrp1
inst1.FENCED_HOME_DIRECTORY = /db2home/db2fenc1
inst1.FENCED_PASSWORD = 235262333285355231346
ENCRYPTED = inst1.FENCED_PASSWORD</programlisting>
</para></listitem>
<listitem><para>Manually using command line. To use this method, follow
these steps:
<orderedlist>
<listitem><para>Log on to your machine as root.</para></listitem>
<listitem><para>Create groups for the instance owner, the fenced user
and the DAS user by using these commands:
<screen>groupadd db2iadm1
groupadd db2fadm1
groupadd db2asgrp</screen>
Linux will
create the groups using the first available group ID (GID) numbers
available over 500. You can specify GID numbers if you
prefer.</para></listitem>
<listitem><para>Create a user that belongs to each group and specify the
home directory. For example, you can choose to place all home
directories in <filename class='directory'>/db2home</filename> by entering
these commands:
<screen>
useradd -g db2iadm1 -m -d /db2home/db2inst1 db2inst1 -p password1
useradd -g db2fadm1 -m -d /db2home/db2fenc1 db2fenc1 -p password2
useradd -g db2asgrp -m -d /db2home/dasusr1 dasusr1 -p password3</screen>
</para>
</listitem>
</orderedlist>
2001-04-27 16:58:10 +00:00
</para>
</listitem>
2005-01-04 20:46:13 +00:00
</itemizedlist>
</para></sect3>
<sect3><title>Creating users - multiple-partition</title>
<para>In a multiple-partition database environment, you only need to
create one shared home directory for the instance owner and fenced user
(but remember to create users on each computer). When creating users in
a multiple-partition environment, make sure that the user and group IDs
are the same on each machine. Consider the following setup:
<itemizedlist>
<listitem><para>A shared home directory, <filename class='directory'>/db2home</filename>, on the
instance-owning machine, which is NFS-mounted on the remaining machines
in the cluster. In this directory are found the home directories for the
instance-owning user and fenced user: db2inst1 and
db2fenc1.</para></listitem>
<listitem><para>A local home directory for the DAS user on each
computer, dasusr1, which is stored in the <filename class='directory'>/home</filename>
directory.</para></listitem>
</itemizedlist>
The DB2 Administration Server
(DAS) has changed significantly in DB2 UDB Version 8. Therefore, you
should take note of the following DAS user
considerations.</para>
2001-04-27 16:58:10 +00:00
2005-01-04 20:46:13 +00:00
<sect4><title>DAS user considerations for a multiple-partition environment</title>
2001-04-27 16:58:10 +00:00
<para>
2005-01-04 20:46:13 +00:00
<itemizedlist>
<listitem><para>A DAS must be running on each physical machine in the
multiple-partition database for the graphical administration tools (for
example, Control Center) to work.</para></listitem>
<listitem><para>You can only have one Version 8 DAS on each machine
(although a V7 and V8 DAS can co-exist on one
machine).</para></listitem>
<listitem><para>Just like an instance, each DAS must be created under a
user ID. It does not matter whether a different user ID is used for each
DAS in the environment, or whether the same user ID is used and that the
user ID's home directory is not shared.</para></listitem>
<listitem><para>If the same user ID is to be used on each machine, then
that user ID's home directory cannot be shared with the other
machines.</para></listitem>
<listitem><para>If a different user ID is used for each DAS, then the
home directories of the user IDs that are used can be
shared.</para></listitem>
<listitem><para>If an existing user is used as the DAS user, this user
must also exist on all the participating computers before
installation.</para></listitem>
<listitem><para>For response file installations: If your response file
specifies to create a new DAS user on each machine in the cluster, and
that user already exists on any of the participating computers, then
that user must have the same primary group as the new DAS
user.</para></listitem>
</itemizedlist></para></sect4></sect3></sect2></sect1>
<sect1 id='installing'><title>Installing DB2 UDB Version 8.2</title>
<sect2><title>db2setup installation</title>
<formalpara><title>Prerequisites</title>
2001-04-27 16:58:10 +00:00
<para>
2005-01-04 20:46:13 +00:00
<itemizedlist>
<listitem><para>Ensure that your system meets the installation, memory,
and disk requirements outlined earlier.</para></listitem>
<listitem><para>Review the installation considerations for IBM Developer
Kit for Java 1.4.1.</para></listitem>
<listitem><para>You require root authority to perform the
installation.</para></listitem>
<listitem><para>The DB2 UDB Setup wizard is a graphical installer. You
must have X Window System software capable of rendering a graphical
user interface for the DB2 UDB Setup wizard to run on your
machine.</para></listitem>
<listitem><para>For 2.6 kernels, ensure that Asynchronous I/O (AIO) has
been installed. To use AIO you must install libaio-0.3.96 or later, and
have a kernel that supports AIO. AIO can be enabled and disabled at run
time by issuing the db2set command. To enable AIO for DB2 UDB after
installation, execute the command <command>db2set DB2LINUXAIO=true</command>
and restart DB2 UDB.</para>
<para>For additional 2.6 kernel performance enhancements, see
<xref linkend="kernels" /></para>
</listitem>
</itemizedlist></para></formalpara>
<formalpara><title>Procedure</title>
<para>To install DB2 UDB ESE (single-partition):
<orderedlist>
<listitem><para>Log on to the system as a user with root
authority.</para></listitem>
<listitem><para>Enter the command to mount the DB2 UDB installation CD:
<screen>mount /mnt/cdrom</screen>
</para></listitem>
<listitem><para>Change to the <filename class='directory'>/mnt/cdrom</filename> directory.</para></listitem>
<listitem><para>Run the <command>db2setup</command> command.</para></listitem>
<listitem><para>When the IBM DB2 UDB Launchpad opens, select Install
Products.</para></listitem>
<listitem><para>Select the DB2 UDB Enterprise Server Edition button on
the next window. Click <guibutton>Next</guibutton>. The DB2 Information Management Software
splash screen will appear as the DB2 UDB installer prepares your system
for the installation of DB2 UDB.</para></listitem>
<listitem><para>When the Welcome to the DB2 Setup Wizard window appears,
click <guibutton>Next</guibutton>.</para></listitem>
<listitem><para>On the <guilabel>Software License Agreement</guilabel> window, read the
license agreement and select the Accept button if you accept the terms
(the Decline button is selected by default). Click
Next.</para></listitem>
<listitem><para>On the <guilabel>Select the installation type</guilabel> window, select the
kind of installation you want to perform. You have three
installation options:
<itemizedlist>
<listitem><para>Typical: 370&ndash;480 MB. This option installs most of
the DB2 UDB components, using a typical configuration with default
values. This option includes all of the required features, ODBC
support, and commonly used tools such as the Control Center. This option
does not install the Application Development and Business Intelligence
tools. If you want to install these tools, then you should choose the
Custom installation type. You can select the View Features button to see
what components get installed with this option.</para></listitem>
<listitem><para>Compact: 320&ndash;390 MB. This option installs only the
basic DB2 UDB components, with minimal configuration performed on your
computer. With this option you get server support, client support, and
getting started functionality. The DB2 UDB Setup wizard creates an
instance and customizes it to use the communication protocols that are
detected on your system. Click the View Features button for more
information.</para></listitem>
<listitem><para>Custom: 320&ndash;890 MB. This option allows you to
install only those components that you select, and to create and
customize an instance to use communication protocols that are detected
on your system.</para></listitem>
2001-04-27 16:58:10 +00:00
</itemizedlist>
2005-01-04 20:46:13 +00:00
Click <guibutton>Next</guibutton>. (The rest of these instructions are based on the
Custom installation option).</para></listitem>
<listitem><para>On the <guilabel>Select the installation action</guilabel> window, select the
<guilabel>Install DB2 UDB Enterprise Server Edition on this computer</guilabel> check box.
You can also choose to save your installations settings in a response
file by selecting the <guilabel>Save your settings in a response file</guilabel> check box.
You should choose this option if you plan to install DB2 UDB, with these
same settings, on other computers in your environment.</para></listitem>
<listitem><para>Select the features you want installed on the <guilabel>Select the
features to install</guilabel> window. You can preview each component by selecting
it and reading the corresponding description in the <guilabel>Description</guilabel> section
on the window. Once you have decided what features you want to install,
click <guibutton>Next</guibutton>.</para></listitem>
<listitem><para>Select what languages you want installed on your
computer on the <guilabel>Languages</guilabel> window. English is selected by default in the
<guilabel>Selected languages</guilabel> section of the window. Click <guibutton>Next</guibutton>.</para></listitem>
<listitem><para>In the <guilabel>Specify the location of the DB2 Information Center</guilabel> window, select how you want to access the DB2 UDB
Information Center. The DB2 UDB Information Center contains
documentation for DB2 UDB and other related DB2 products. The <guibutton>On the IBM
Web site</guibutton> button is selected by default. By choosing this option DB2 UDB
is configured to access documentation on the Web using your browser.
However, if you want to install a copy of the DB2 UDB Information Center
on your local computer, then select the <guibutton>Install the DB2
Information Center separately after this DB2 product installation</guibutton> button
(refer to the section on Installing the DB2 UDB Information Center in
this HOWTO for more information). If you have a copy of the DB2 UDB
Information Center installed elsewhere on an intranet server, you can
choose the <guibutton>On the following intranet server</guibutton> button to gain access to DB2
UDB documentation. Specify the values in the <guilabel>Host name</guilabel>
and <guilabel>Port number</guilabel>
text fields (the default value for the port number is <literal>51000</literal>). Click the
Help button for more information. Click <guibutton>Next</guibutton>.</para></listitem>
<listitem><para>Fill out the information for the user that will
administer the Database Administration Server on the
<guilabel>Set user information for the DB2 Administration Server</guilabel> window. Select either the
<guibutton>New user</guibutton> button, or the <guibutton>Existing user</guibutton> button. The <guilabel>Password</guilabel> and <guilabel>Confirm password</guilabel>
text boxes are outlined in red indicating required fields that
must be filled in for the installation to continue. Click <guibutton>Next</guibutton>.</para></listitem>
<listitem><para>If you want to create a new DB2 UDB instance, then
select the <guibutton>Create a DB2 instance</guibutton> button on the
<guilabel>Set up a DB2 instance</guilabel> window. Otherwise, select the
<guibutton>Do not create a DB2 instance</guibutton> button. If
you select this option, you will need to create a new instance after the
installation by using the <command>db2icrt</command> command. Click
<guibutton>Help</guibutton> for more
information. Click <guibutton>Next</guibutton>.</para></listitem>
<listitem><para>If your installation is a single-partition installation,
as in this example, select the <guibutton>Single-partition instance</guibutton> button on the
<guilabel>Select how the instance will be used</guilabel> window. Choosing this option means
that this instance will only reside on your local computer and will not
be used in a partitioned environment. Click <guibutton>Next</guibutton>.</para></listitem>
<listitem><para>Fill out the information for the DB2 UDB instance owner
on the <guilabel>Set user information for the DB2 instance owner</guilabel>
window. Select either the <guibutton>New user</guibutton> button, or the
<guibutton>Existing user</guibutton> button. The <guilabel>Password</guilabel>
and <guilabel>Confirm password</guilabel> text boxes are outlined in red indicating required
fields that must be filled in for the installation to continue. Click <guibutton>Next</guibutton>.</para></listitem>
<listitem><para>Fill out the information for the fenced user on the
<guilabel>Set user information for the fenced user</guilabel> window.
Select either the <guibutton>New user</guibutton> button, or the
<guibutton>Existing user</guibutton> button. The <guilabel>Password</guilabel>
and <guilabel>Confirm password</guilabel>
text boxes are outlined in red indicating required fields that must be
filled in for the installation to continue. For more information on
fenced users, and how fenced users relate to fenced and non-fenced
user-defined functions (UDFs) and stored procedures, click Help. Click
Next.</para></listitem>
<listitem><para>Configure the DB2 UDB instance for TCP/IP communications
on the <guilabel>Configure DB2 instance TCP/IP communication</guilabel>
window. Either accept
the default values found in the <guilabel>Service name</guilabel> and
<guilabel>Port number</guilabel> fields, or
select your own. If you choose to configure the instance at a later
time, select the <guibutton>Do not configure at this time</guibutton> button.
Click <guibutton>Next</guibutton>.</para></listitem>
<listitem><para>In the <guilabel>Set instance properties</guilabel> window,
select an instance authentication type that will apply to all of the
databases that are owned by the instance. There are three authentication
types:
<itemizedlist>
<listitem><para>Server: this type specifies that authentication occurs
on the server using the local operating system
security.</para></listitem>
<listitem><para>Server Encrypt: this type specifies that the server
accepts encrypted server authentication schemes.</para></listitem>
<listitem><para>Client: this type specifies that authentication occurs
on the database partition where the application is invoked using
operating system security.</para></listitem>
</itemizedlist>
Select the <guibutton>Autostart the instance of system startup</guibutton>
button if you want the instance to start when you start up your system.
Click <guibutton>Next</guibutton>.</para></listitem>
<listitem><para>On the <guilabel>Prepare the DB2 tools catalog</guilabel>
window select the <guibutton>Use a local database</guibutton> button
if you plan on using the Task Center or scheduler. This option creates
a database on your local computer that
stores task metadata. If you do not have this repository, the scheduler
will not function. If you want to create a DB2 UDB tools catalog after
you finish the installation, select the <guibutton>Do not prepare the DB2 tools
catalog on this computer</guibutton> button. You can create the DB2 UDB tools
catalog manually by using the <command>CREATE TOOLS CATALOG</command> command.
Click <guibutton>Next</guibutton>.</para></listitem>
<listitem><para>If you decide to create a DB2 UDB tools catalog, you can
specify the required information for the local database on the Specify a
local database to store the DB2 tools catalog window. You can
specify which instance, which database, and which schema in which to
store the DB2 UDB tools catalog. The DB2 UDB tools catalog will be
placed in the home directory of the instance owner.
Click <guibutton>Next</guibutton>.</para></listitem>
<listitem><para>Specify the administration contact list on the
<guilabel>Set up the administration contact list</guilabel> window.
This list stores
administrator contact information that is used for notifying
administrators if and when a database requires attention. Either create
a new contact list that is stored locally, or use an existing global
contact list that resides on a remote DB2 UDB server. If you check the
<guibutton>Enable notification</guibutton> button, your system will search
for an available SMTP server and set it to be used for e-mail notifications.
Click <guibutton>Next</guibutton>.</para></listitem>
<listitem><para>On the <guilabel>Specify a contact for health monitor
notification</guilabel> window select the health monitor that will
run on the DB2 UDB instance
you are setting up. The DB2 UDB health monitor will send a
notification e-mail to the person you specify in the <guilabel>Name</guilabel>
and <guilabel>Email address</guilabel> fields, if and when a health indicator
threshold is breached.
You can choose to have this notified by a pager by selecting the
<guilabel>Address is for a pager</guilabel> check box. Select the
<guibutton>Defer this task until after installation is complete</guibutton>
button if you want to specify health
notification contacts later on. You can use the Task Center or the
Control Center to create these contacts. Click <guibutton>Next</guibutton>.</para></listitem>
<listitem><para>Click <guibutton>Finish</guibutton> on the <guilabel>Start
copying files</guilabel> window to complete the installation.
The <guilabel>Current settings</guilabel> section provides a summary
of your installation and configuration settings.</para></listitem>
</orderedlist>
While the files are being copied to your computer you will see two status bars
on the <guilabel>Installing DB2 UDB Enterprise Server Edition</guilabel> window,
indicating the installation task progress and the overall installation progress. When the
installation is finished the <guilabel>Setup Complete</guilabel> window indicates what
post-installation steps need to be taken, along with a status report of
the installation. Click <guibutton>Finish</guibutton> to exit the DB2 UDB Setup
wizard.</para></formalpara></sect2></sect1>
<sect1 id='distros'><title>Distribution Specific Considerations</title>
<para>In this part of the HOWTO, we will cover any tweaks, fixes or
requirements that need to be made to get DB2 UDB running on specific
Linux distributions.</para>
<sect2><title>Red Hat Enterprise Linux (RHEL) 3</title>
<para>These installation notes are based on a single-partition
installation using the 2.4.21&ndash;20 kernel (September 20,
2004).</para>
<sect3><title>Pre-installation notes</title>
<para>The pdksh package required for a multiple-partition environment
setup is installed by default on Red Hat Enterprise Linux 3.</para>
<para>RHEL 3 has backported the asynchronous I/O kernel capabilities of
the 2.6 kernel into their 2.4 kernel, but you will need to download and
install the libaio RPM package to take advantage of this.</para>
<para>To check for the pdksh or libaio RPM packages, run the commands:
<screen>rpm -qi pdksh
rpm -qi libaio</screen> If either
package needs to be installed, you can add it to your system with the
Red Hat up2date utility (this requires registration for a Red Hat
Network account). Just run:
<screen>up2date pdksh
up2date libaio</screen></para>
<para>No Java package is installed by default, so there are no conflicts
with the Java 2 SDK from IBM that DB2 UDB
installs.</para></sect3>
<sect3><title>Installation notes</title>
<para>The installation on Red Hat Enterprise Linux 3 completed
successfully, with no problems getting the GUI tools or installer
working, and no errors during the install. This smooth installation
isn't surprising, given that RHEL 3 is an officially supported platform
for Version 8.2</para></sect3>
<sect3><title>Post-installation notes</title>
<para>Initialize the Asynchronous I/O so DB2 UDB can take advantage of
this new kernel feature. As the instance owner:
<screen>db2set DB2LINUXAIO=TRUE</screen></para></sect3></sect2>
<sect2><title>SuSE Linux Enterprise (SLES) 9</title>
<para>SuSE Linux Enterprise Server 9 was released in August 2004 to
great anticipation. It is currently the only Enterprise level Linux
distribution certified by DB2 UDB that runs on the 2.6 kernel by
default.</para>
<para>These notes are based on the 2.6.5-7 kernel (the SuSE Linux kernel
update as of September 10, 2004), and installing a single-partition
environment.</para>
<sect3><title>Pre-installation notes</title>
<para>
<orderedlist>
<listitem><para>The pdksh package is installed in a default setup
(required for multiple-partition and high availability
installations)</para></listitem>
<listitem><para>The IBMJava2-JRE-1.4.2 rpm package is also installed by
default</para></listitem>
<listitem><para>The kernel parameters (ipcs -l) before DB2 UDB
installation:
<screen>
max number of segments: 4096
max segsize: 32768
max number of arrays: 128
max queues system wide: 16
default max size of queue: 16384</screen></para></listitem>
<listitem><para>Asynchronous I/O package (libaio) is also installed by
default.</para></listitem>
</orderedlist></para></sect3>
<sect3><title>Installation Notes</title>
<para>I received an error during start up of the db2setup utility:
<screen>/db2/ese/db2/linux/install/db2jinst:
line 131: 3474 Segmentation fault
$JAVA_PATH/$JAVA_INTERPRETER $JAVA_OPTIONS \
-cp $JAVA_CLASSPATH $DB2SetupRun "$@" 2>/tmp/db2setup.err.running
</screen>
The solution here is to run
<screen>export LD_ASSUME_KERNEL="2.4.19"</screen>
from the
terminal where you launched the db2setup utility, then run db2setup
again. This change will only affect the Java installer, not the
kernel performance.</para></sect3>
<sect3><title>Post-installation notes</title>
<para>The kernel parameters (ipcs -l) after installation look like:
<screen>
max number of segments: 4096
max segsize: 262144 (updated)
max number of arrays: 1024 (updated)
max queues system wide: 1024 (updated)
default max size of queue: 16384
</screen></para>
<para>Initialize the Asynchronous I/O so DB2 UDB can take advantage of
this new kernel feature. As the instance owner:
<screen>db2set DB2LINUXAIO=TRUE</screen></para>
<para>Optional: update the DB2 UDB JDK_PATH parameter so DB2 UDB uses
SLES's installed Java 2 package. As the instance owner:
<screen>db2 update dbm cfg using JDK_PATH /opt/IBMJava2-142</screen></para>
<para>Surprisingly, my installation didn't have Mozilla installed by
default. To have the DB2 UDB help display properly, Mozilla should be
installed using YaST.</para></sect3></sect2>
<sect2><title>SuSE Linux Enterprise (SLES) 8</title>
<para>These installation notes are based on the 2.4.21 kernel (SLES
kernel on September 20, 2004)</para>
<sect3><title>Pre-installation notes</title>
<para>The pdksh package is installed in the default setup (required for
multiple-partition and high availability installations).</para>
<para>Also, SLES 8 installs the IBMJava2&ndash;SDK-1.3.1 rpm package in
a typical installation.</para></sect3>
<sect3><title>Installation notes</title>
<para>SuSE Linux Professional installs its own 1.3.1 Java JRE by default
(the "IBMJava2-SDK-1.3.1" rpm package). During the DB2 UDB installation,
this will cause a warning to be generated:
<screen>Command to be run: "/bin/rpm -ivh \
'/mnt/cdrom/db2/linux/Java-1.4/IBMJava2-SDK-1.4.1-2.0'.i386.rpm"
Warning: there may be a version of this package already installed.</screen>
Since this package was
supplied by SuSE Linux, it will have been installed into a different
directory tree than the JDK from IBM that DB2 UDB installs.
Therefore, there are 3 options you can choose to deal with this issue:
<orderedlist>
<listitem><para>Uninstall the Java2-1.3.1 package before installing,
using either the YaST tool, or with the command line rpm -e
IBMJava2-SDK-1.3.1 command. After installation, this will leave the
IBMJava2&ndash;SDK&ndash;1.4.1 package as the only Java installation
on the system.</para></listitem>
<listitem><para>Leave both Java packages installed. By default, DB2 UDB
will use the 1.4.1 JRE that it installs. The fact that SuSE Linux's Java
package installs to a different directory means that the two packages
will not conflict.</para></listitem>
<listitem><para>Remove the IBM package (either with YaST or with rpm -e
IBMJava2-SDK-1.4.1) after the installation completes. Update the DB2 UDB
JDK_PATH configuration parameter to use the package installed by SuSE
Linux:
<screen>db2 update dbm cfg using JDK_PATH /usr/lib/java</screen></para></listitem>
</orderedlist></para>
<para>Other than that one minor issue, DB2 UDB installed cleanly and
setup was problem free.</para></sect3></sect2>
<sect2><title>SuSE Linux Professional 9.1</title>
<para>Note that IBM does not officially support this distribution for
DB2 UDB V8.2. Any problems you encounter using this distribution must be
replicated on a supported distribution before IBM Support will help you
resolve the issue.</para>
<para>These notes are based on a single-partition installation on the
2.4.21 kernel (September 20, 2004).</para>
<sect3><title>Pre-installation
notes</title>
<para>If you want to run a multiple-partition environment, you will need
to install the pdksh package found on CD
4.</para></sect3>
<sect3><title>Installation notes</title>
<para>SuSE Linux Professional installs its own 1.4.2 Java JRE by default
(the "java2&ndash;jre-1.4.2" package). During the DB2 UDB installation,
this will cause a warning to be generated:
<screen>Command to be run: "/bin/rpm -ivh \
'/mnt/cdrom/db2/linux/Java-1.4/IBMJava2-SDK-1.4.1-2.0'.i386.rpm"
Warning: there may be a version of this package already installed.</screen>
Since this package was
supplied by SuSE Linux, it will have been installed into a different
directory tree than the JDK from IBM that DB2 UDB installs.
Therefore, there are 3 options you can choose to deal with this issue:
<orderedlist>
<listitem><para>Uninstall the java2&ndash;jre&ndash;1.4.2 package
before installing, using either the YaST tool, or with command line rpm
erase command. This will leave the IBMJava2&ndash;SDK package as the
only Java installation on the system.</para></listitem>
<listitem><para>Leave both Java packages installed. By default, DB2 UDB
will use the 1.4.1 JRE that it installs. The fact that SuSE Linux's Java
package installs to a different directory means that the two packages
will not conflict.</para></listitem>
<listitem><para>Remove the IBM package (either with YaST or with rpm -e
IBMJava2-SDK) after the installation completes. Update the DB2 UDB
JDK_PATH configuration parameter to use the package installed by SuSE
Linux:
<screen>db2 update dbm cfg using JDK_PATH /usr/lib/java</screen></para></listitem>
</orderedlist></para>
<para>Other than that one minor issue, DB2 UDB installed cleanly and
setup was problem free.</para></sect3></sect2>
<sect2><title>SuSE Linux Personal 9.1</title>
<para>Note that IBM does not officially support this distribution for
DB2 UDB V8.2. Any problems you encounter using this distribution must be
replicated on a supported distribution before IBM Support will help you
resolve the issue.</para>
<para>These notes are based on the 2.6.4-52-default kernel and
installing to a single-partition
environment.</para>
<sect3><title>Pre-installation notes</title>
<para>The pdksh package is not installed by default. If you want to
install a multiple-partition environment on SuSE Linux Personal, you
will have to install.</para>
<para>The installer may complain about being unable to use the SMTP
server even though postfix is installed and sendmail is available in the
path. Make sure that postfix has been started before
installation.</para></sect3>
<sect3><title>Installation notes</title>
<para>The usual trick of adding an xhost entry for localhost and then
exporting the DISPLAY=localhost:0 when installing (so that the graphical
utilities are displayed on a non-root user's desktop) didn't seem to
work here. Instead, try executing ssh -X root@localhost and launch the
utilities from there.</para></sect3></sect2>
<sect2><title>Fedora Core 2</title>
<para>Note that IBM does not officially support this distribution for
DB2 UDB V8.2. Any problems you encounter using this distribution must be
replicated on a supported distribution before IBM Support will help you
resolve the issue.</para>
<para>Fedora Core 2 is a release of the Fedora Project (the
Red-Hat-sponsored and community-supported open source project). The
Fedora Project is a source for new technologies and enhancements that
may be incorporated into Red Hat Enterprise Linux (RHEL) in the
future.</para>
<para>These notes are based on both the default 2.6.5-1 and the update
2.6.8-1 kernels (the Fedora Core 2 kernel update on September 13, 2004
was 2.6.8-1), and installing to a single-partition
environment.</para>
<sect3><title>Pre-installation notes</title>
<para>The kernel parameters (ipcs -l) before DB2 UDB installation:
<screen>
max number of segments: 4096
max segsize: 32768
max number of arrays: 128
max queues system wide: 16
default max size of queue: 16384</screen></para>
<para>The asynchronous I/O package (libaio) is also required to take
advantage of the 2.6 kernel improvements. Install the libaio package
from the Fedora Core CD.</para></sect3>
<sect3><title>Install
Notes</title>
<para>The default 2.6.5 kernel had no installation issues with the
db2setup GUI installer.</para>
<para>On the 2.6.8 kernel, however, I received an error when running the
db2setup utility (the error may not display to the terminal; instead, if
the db2setup command seems to fail without error, check the
/tmp/db2setup.err file) :
<screen>JVMDG080: Cannot find class com/ibm/jvm/Trace
JVMXM012: Error occurred in diagnostics initialization(2)
Could not create the Java virtual machine.
</screen>
The workaround for this error is to
install Sun's Java 2 Platform Standard Edition 5.0 RC (Fedora Core
2 doesn't install a Java package by default). The rpm file is available
from http://java.sun.com/j2se/1.5.0/download.jsp. After installing Java,
set the environment variables in the terminal where you execute the
db2setup utility:
<screen>export DB2USELOCALJRE=TRUE
export JAVA_HOME=/usr/java/jre1.5.0/
</screen>/usr/java/jre1.5.0/ is the location
where Java is installed by default in the rpm from Sun.</para>
<para>The last step to making this work &ndash; and this is very
important &ndash; is to add in a link named "jre" in Sun's Java folder
so that db2setup works properly with the directory:
<screen>cd /usr/java/jre1.5.0/
mkdir jre
cd jre
ln -s ../bin bin</screen></para>
<para>After making these changes, the db2setup GUI installer works
properly.</para>
<para>Alternatively, you can avoid the Java-based problems by installing
on Fedora Core 2 using
<screen>./db2setup -r db2ese.rsp</screen>
where db2ese.rsp is a
slightly modified response file (the sample response files are found
in the "db2/linux/samples/
directory)</para></sect3>
<sect3><title>Post-installation notes</title>
<para>The kernel parameters (ipcs -l) after installation look like:
<screen>
max number of segments: 4096
max segsize: 262144 (updated)
max number of arrays: 1024 (updated)
max queues system wide: 1024 (updated)
default max size of queue: 16384
</screen></para>
<para>Initialize the Asynchronous I/O so DB2 UDB can take advantage of
this new kernel feature. As the instance owner, run:
<screen>db2set DB2LINUXAIO=TRUE</screen></para>
<para>For the GUI tools (DB2 UDB Control Center, DB2 UDB Configuration
Assistant, DB2 UDB First Steps) to work properly under the 2.6.8-1
kernel, you'll need to tell DB2 UDB to use the Sun JRE. As the instance
owner, execute this command:
<screen>db2 update dbm cfg using JDK_PATH /usr/java/jre1.5.0/</screen>
With that update,
the DB2 UDB Java-based tools will work
properly.</para></sect3></sect2>
<sect2><title>Mandrake Linux 10.1 (Community)</title>
<para>Note that IBM does not officially support this distribution for
DB2 UDB V8.2. Any problems you encounter using this distribution must be
replicated on a supported distribution before IBM Support will help you
resolve the issue.</para>
<para>These notes are based on the 2.6.8.1&ndash;16mdk kernel and
installing to a single-partition
environment.</para>
<sect3><title>Pre-installation notes</title>
<para>The pdksh package is not installed by default. If you want to
install a multiple-partition environment on Mandrake Linux, you will
have to install it using drakconf (it's on CD3). Also, no Java package
is installed by default, so we don't have to worry about any conflicts
arising from that.</para></sect3>
<sect3><title>Installation
notes</title>
<para>The GUI based installation went smoothly, with no reported
problems or issues. If you do experience a hang with the Java installer,
try the Sun Java workaround described in the Fedora Core 2
section.</para></sect3>
<sect3><title>Post-installation notes</title>
<para>Be careful of the Mandrake Linux security "msec" utility &ndash;
it can mess up DB2 UDB functionality by changing world readable
directories (like /home/db2inst1/sqllib/) that are necessary to run DB2
UDB to non-world readable. If you find that DB2 UDB is not working
properly, investigate your
security settings.</para></sect3></sect2></sect1>
<sect1 id='help'><title>Installing the DB2 UDB Information Center</title>
<para>The new DB2 UDB Information Center is a new initiative from IBM to
improve the documentation delivery system in Version 8.2. It's based on
the open-source Eclipse architecture help system, and provides a better
way to serve up the DB2 UDB
documentation.</para>
<sect2><title>Installing the Information Center
locally</title>
<para>In this example, we'll install the Information Center on Red Hat
Enterprise Linux (RHEL) 3, just because the DB2 UDB installation was so
smooth.</para>
<para>To begin, mount the CD in the drive, or expand the tarball
containing the installation utilities. Since the DB2 UDB Information
Center has it's own Java based installer, any Java issues that you
experienced above while installing DB2 UDB will likely recur here.
However, the fixes we've provided for the DB2 UDB install should work
for the DB2 UDB Information Center install too.</para>
<para>After mounting, run the "db2setup" utility from the base
directory. This will launch the Java-based setup wizard. You can also
use the other setup methods we've talked about, but since the GUI
installation sets up and configures everything for you, that's the
method we recommend.</para>
<para>Installation Steps:
<orderedlist>
<listitem><para>Select the "Install Products" option from the launcher,
and then the "DB2 UDB Information Center" from the next panel, and click
"Next".</para></listitem>
<listitem><para>Read the description and click "Next".</para></listitem>
<listitem><para>Read the license agreement, and if you agree, select
"Accept" and click "Next".</para></listitem>
<listitem><para>If you want to keep your installation settings in a
response file (for installing on a different machine with identical
settings), check the empty box, otherwise click
"Next".</para></listitem>
<listitem><para>Add any additional languages that you want to have
installed. English is installed by default and cannot be deselected.
Each additional language will add anywhere from 5&ndash;50 MB to the
installation size. Click "Next".</para></listitem>
<listitem><para>The next panel is where things get a little interesting.
Here you can specify the service name that the Information Center will
run under. An entry will be added to the <filename>/etc/services</filename> file for this
service. You probably don't need to change this, unless you have another
service running as "db2icserver". </para>
<para>Also, this panel is where
you specify the system port that the Information Center will use to
serve up the documentation. By default, this is port
51000.</para>
<para>The check box on this page will change the
configuration for all DB2 UDB products installed on the local system, so
that their help system will use the parameters you define here.Click
"Next".</para></listitem>
<listitem><para>Read the summary of what will be done, then click
"Finish" to start the file
installation</para></listitem>
</orderedlist></para>
<sect3><title>Troubleshooting</title>
<para>After installation, there are a couple of minor gotchas that you
might run into.</para>
<para>First of all, there is a bug in the CD installation that won't
unlock the CD mount. When you try to unmount the CD, you'll get the
dreaded "device is busy" message from the OS. The solution here is to
restart the Information Center daemon with the commands:
<screen>cd /tmp
/etc/init.d/db2icd restart</screen>
After the restart is complete, you can unmount the CD cleanly. This
information is covered in an ibm.com technote (<ulink url='http://www.ibm.com/support/docview.wss?uid=swg21179518'>http://www.ibm.com/support/docview.wss?uid=swg21179518</ulink>)</para>
<para>Another configuration change that you can make is to change what
directory the Information Center uses as a temporary working directory.
To do this, modify the DB2_ECLIPSEIC_DATA parameter in the db2ic.conf
file found in the <filename class='directory'>/var/db2/v81/</filename>
directory. This temporary directory can
be anywhere where the "bin" user can write to.</para>
<para>Also in this file, you can change the port used to serve up the
Information Center, in case you change your mind later on about the one
you set up during the install. Just change the DB2_ECLIPSEIC_PORT
parameter to the new number (though it must be under 65535).</para>
<para>After making any changes, do a
<screen>/etc/init.d/db2icd restart</screen>
to have your changes picked up
by the Information Center (see below for more details on the db2icd
daemon).</para></sect3></sect2>
<sect2><title>The Information Center daemon</title>
<para>The Information Center daemon is set up during installation and is
used to launch the background process that runs the Information Center.
The daemon script, named db2icd is installed to the <filename class='directory'>/etc/init.d/</filename>
directory, and start up symbolic links are added to the
<filename class='directory'>/etc/init.d/rc.X/</filename> run-level folders. By default, the daemon is turned on
for run-levels 2, 3 and 5. You can modify these run-levels with any
system init utility (chkconfig, ntsysv, or any of the X-based
variants).</para>
<para>There are 5 commands you can pass to the daemon:
<orderedlist>
<listitem><para>start &mdash; Starts the Information Center, using the
configuration parameters set in the /var/db2/v81/db2ic.conf
file.</para></listitem>
<listitem><para>stop &mdash; Brings down the Information
Center.</para></listitem>
<listitem><para>restartor reload&mdash; A combination command
that stops, then starts the daemon again.</para></listitem>
<listitem><para>reload &mdash; Same as restart.</para></listitem>
<listitem><para>status &mdash; Provides information on whether the
Information Center is running, and if it is running, what the process
IDs (PID)
are.</para></listitem>
</orderedlist></para></sect2>
<sect2><title>Accessing an installed Information Center</title>
<para>There are three places where you can access the DB2 UDB
Information Center from your client:
<orderedlist>
<listitem><para>Access the publib.boulder.ibm.com Web site (this is the
default set during a client installation)</para></listitem>
<listitem><para>Access an intranet machine that is hosting the DB2 UDB
Information Center within your own organization</para></listitem>
<listitem><para>Access an Information Center that is set up on your
local machine</para></listitem>
</orderedlist>
You can configure the
access points during the installation (only by specifying a "Custom"
installation) or afterwards either in the tools configuration panel (in
the GUI tools), or from the command line.</para>
<para>For the GUI tools (Control Center), open the Tools menu, select
Tools Settings, and then the Documentation tab. On this panel, you can
specify a host URL and port where an Information Center can be found.
When putting a hostname in, do not add the "http://" prefix, or any
subdirectories &ndash; just type in the hostname, and the internal code
will do the rest.</para>
<para>To change the access points from the command line, execute these
commands:
<screen>db2set DB2_DOCHOST=<varname>host_URL</varname>
db2set DB2_DOCPORT=<varname>host_port</varname></screen>
where
host_URL is the location hostname of the Information Center. This could
be: mydocserver.myorg.net or localhost (for a local installation), and
host_port is the port number where the Information Center was
installed.</para>
<para>By default, these DB2 UDB environment settings are blank, which
means that DB2 UDB defaults to the
http://publib.boulder.ibm.com/infocenter/db2help/ Web site.</para>
<para>To invoke the DB2 UDB Information Center from the GUI tools, click
on the "?" icon in the toolbar, any of the "Help" hyperlinks or buttons,
or by selecting any of the menu items in the "Help" menu.</para>
<para>To invoke the DB2 UDB Information Center from the command line,
issue the db2icdocs or
db2helpcommands.</para></sect2></sect1>
<sect1 id='uninstalling'><title>Removing DB2 UDB Version 8.2</title>
<orderedlist>
<listitem><para>Remove the DAS by issuing the
/opt/IBM/db2/V8.1/instance/dasdrop command as root.</para></listitem>
<listitem><para>Remove the instance by issuing the
/opt/IBM/db2/V8.1/instance/db2idrop <varname>db2 instance</varname>command as root,
where <varname>db2 instance</varname> refers to the actual instance you want to drop
(for example,
/opt/IBM/db2/V8.1/instance/db2idrop db2inst1).</para></listitem>
<listitem><para>Mount the DB2 UDB installation CD and run the
/mnt/cdrom/db2_deinstall command as root. This will remove DB2 UDB from
your system.</para></listitem>
<listitem><para>Remove the users that were created during the
installation of DB2 UDB ESE by entering these commands as root:
<screen>userdel -r db2inst1
userdel -r dasusr1
userdel -r db2fenc1</screen>(If you
created different user names during installation, substitute as
necessary.)</para></listitem>
</orderedlist>
<para>Optionally, you can remove IBM's version of the Java 2 package
that DB2 UDB installs:
<screen>rpm -e IBMJava2-SDK</screen></para>
</sect1>
<sect1 id="kernels"><title>DB2 UDB and the 2.6 kernel</title>
<para>DB2 UDB Version 8.2 can take advantage of a number of performance
enhancements introduced in the 2.6 kernel. There is a good paper by Rav
Ahuja, Dan Behman and John Keenleyside that goes in depth on the
specific enhancements of DB2 UDB V8.2 (see the Resources Section); we'll
cover a few of the highlights and how to implement them.
<itemizedlist>
<listitem><para>Asynchronous I/O handling</para>
<para>Asynchronous I/O is a kernel processing
enhancement that allows applications to submit I/O requests, and then
continue working without having to wait for the I/O request to be
completed. </para>
<para>As mentioned in a few of the
distribution-specific instructions, this requires the installation of
the libaio package, and the setting of the DB2LINUXAIO DB2 UDB
configuration parameter.</para></listitem>
<listitem><para>Direct I/O caching</para>
<para>Direct I/O is a different cache writing policy. Instead of using buffered I/O
writes, direct I/O caching eliminates the file copying from the file
cache to user buffer, thus reducing CPU utilization.</para>
<para>To enable Direct I/O cache on a database, you specify the NO FILE SYSTEM
CACHING parameter for the CREATE, TABLESPACE, ALTER TABLESPACE or CREATE
DATABASE commands.</para></listitem>
<listitem><para>Vector I/O</para>
<para>Vector (or scatter/gather) I/O allows a number of I/O buffers to be used instead of
one contiguous buffer, thus avoiding additional copying
during reads.</para>
<para>To enable Vector I/O, set the DB2_SCATTERED_IO
configuration parameter to "ON".</para></listitem>
<listitem><para>Large page support</para>
<para>Large page
support allows the application to force the kernel into using larger
memory pages, thus reducing the memory overhead required to track
the pages, boosting the overall available memory. </para>
<para>Enabling
large page support requires both a 2.6 kernel (or a backported 2.4
kernel like the one in RHEL), and installation of the libcap RPM.
Turning on large page support is distribution dependent.</para>
<para>For
SuSE Linux Enterprise 8:
<itemizedlist>
<listitem><para>During boot-up, add the parameter bigpages=xxxM to the
kernel boot command, where xxx is the desired large page size in
MB</para></listitem>
<listitem><para>After boot, log in as root and run
<screen>echo 1 > /proc/sys/kernel/shm-use-bigpages</screen> This
will dynamically enable the large page support in the
kernel</para></listitem>
<listitem><para>Before running db2start, execute this command to tell
DB2 UDB to use the large page configuration:
<screen>db2set DB2_LGPAGE_BP=YES</screen></para></listitem>
</itemizedlist></para>
<para>For
Red Hat Enterprise Linux 3
<itemizedlist>
<listitem><para>As root, run:
<screen>echo XXX > /proc/sys/vm/hugetlb_pool</screen> where XXX is
2005-01-04 20:46:13 +00:00
a numerical value equivalent to the number of "huge pages" desired. (Red
Hat Linux uses "huge" pages instead of large pages). Note also that
the size you enter must be available in a contiguous block of memory,
otherwise the large page limit will be restricted by the largest block
that is available.</para></listitem>
<listitem><para>Check the large page usage by running the command:
<screen>cat /proc/meminfo | grep -i huge</screen></para></listitem>
<listitem><para>Before running db2start, execute this command to tell
DB2 UDB to use the large page configuration:
<screen>db2set DB2_LGPAGE_BP=YES</screen></para></listitem>
</itemizedlist></para>
<para>For
Distributions using 2.6 kernel
<itemizedlist>
<listitem><para>As root, run:
<screen>echo XXX > /proc/sys/vm/nr_hugepages</screen>
2005-01-04 20:46:13 +00:00
where XXX is
a numerical value equivalent to the number of "huge pages"
desired</para></listitem>
<listitem><para>Check the large page usage by running the command:
<screen>cat /proc/meminfo | grep -i huge</screen></para></listitem>
<listitem><para>Before running db2start, execute this command to tell
DB2 UDB to use the large page configuration:
<screen>db2set DB2_LGPAGE_BP=YES</screen></para></listitem>
</itemizedlist></para></listitem></itemizedlist></para></sect1>
<sect1 id="using"><title>Using DB2 UDB</title>
<para>This section gives you the basic information you need to start
working with DB2 UDB on Linux. It includes instructions on issuing DB2
UDB commands and SQL statements from the command line, as well as the
commands you need to start the DB2 UDB Control Center and the DB2 UDB
Information Center.</para>
<sect2><title>DB2 UDB Control Center</title>
<para>The left side of the DB2 UDB Control Center provides an
object-oriented view of the database objects that you have catalogued,
including DB2 UDB instances and databases on other DB2 UDB servers. One
way to add, edit, or drop database objects is to right-click on an
object to bring up a menu.</para>
<para>To start the DB2 UDB Control Center
<orderedlist>
<listitem><para>Ensure you are logged on to your Linux workstation using
either the DB2 UDB Administration Server user ID or the DB2 UDB instance
user ID. If you use the su command to become the user, ensure you
include the -l parameter to initialize the environment for the
user.</para></listitem>
<listitem><para>Start the X server, if it is not already
started.</para></listitem>
<listitem><para>Issue the db2cc command to start the DB2 UDB Control
Center.</para></listitem>
</orderedlist></para></sect2>
<sect2><title>DB2 UDB Information Center</title>
<para>As mentioned above, the new DB2 UDB Information Center is a
revamped documentation display system that now encapsulates the task,
concept and reference information required to properly run DB2 UDB. It
can be installed locally, on an intranet server, or accessed directly
from an ibm.com hosting service</para>
<para>To start the DB2 UDB Information Center:
<orderedlist>
<listitem><para>Ensure you are logged on to your Linux workstation using
either the DB2 UDB Administration Server user ID or the DB2 UDB instance
user ID. If you use the su command to become the user, ensure you
include the -l parameter to initialize the environment for the
user.</para></listitem>
<listitem><para>Ensure that the X server is started, because the
Information Center requires a Web browser.</para></listitem>
<listitem><para>Issue one of these launch commands:
<itemizedlist>
<listitem><para>db2help</para></listitem>
<listitem><para>db2ic</para></listitem>
<listitem><para>db2cc -ic</para></listitem>
</itemizedlist></para></listitem>
</orderedlist>
Alternatively, you can launch the Information Center from within the Control Center (or
any of the other GUI tools), by clicking an item under the "Help" menu,
or by clicking on the "?" icon.</para>
<para>If you did not install the DB2 UDB Information Center, or have not
configured your tools to use a different server, these commands will
launch a detected browser, and take you directly to the IBM hosted DB2
UDB Information Center at <ulink url='http://publib.boulder.ibm.com/infocenter/db2help/'>http://publib.boulder.ibm.com/infocenter/db2help/</ulink>.</para></sect2>
<sect2><title>DB2 UDB CLP</title>
<para>If you are logged on to your Linux workstation using either the
DB2 UDB Administration Server user ID or the DB2 UDB instance user ID,
you can issue DB2 UDB commands and SQL statements from the command
line.</para>
<para>If this is your first time using DB2 UDB, I would suggest creating
the sample database that ships with DB2 UDB. The sample database is used
throughout the DB2 UDB documentation and is required by most of the
sample applications.</para>
<para>To create the sample database, you can either select the Create
the sample database option from the DB2 UDB First Steps launchpad, or
by issuing the db2sampl command.</para>
<para>Before you can issue an SQL statement, you have to connect to a
database. To connect to a database, enter the command:
<screen>db2 CONNECT TO <varname>database</varname> USER <varname>userID</varname> USING <varname>password</varname></screen></para>
<para>To connect to a database, and have DB2 UDB prompt you for the
password, issue the command:
<screen>db2 CONNECT TO <varname>database</varname> USER <varname>userID</varname></screen></para>
<para>To connect to a database using the default user ID, issue the
command:
<screen>db2 CONNECT TO <varname>database</varname></screen></para>
<para>Once you have connected to a database, you can then issue SQL
statements or DB2 UDB commands against that database. For example, to
select all of the columns from the EMPLOYEE table in the SAMPLE
database, issue this command:
<screen>db2 "SELECT * FROM employee"</screen></para>
<para>You can avoid typing db2 as the prefix for every SQL statement and
DB2 UDB command by issuing DB2 UDB commands using the Command Line
Processor (CLP). To start the CLP, issue the db2 command by itself. DB2
UDB provides the following prompt:
<screen>You can issue database manager commands and SQL statements from the
command prompt. For example:
db2 => connect to sample
db2 => bind sample.bnd
For general help, type: ?.
For command help, type: ? command, where command can be
the first few keywords of a database manager command. For example:
? CATALOG DATABASE for help on the CATALOG DATABASE command
? CATALOG for help on all of the CATALOG commands.
2001-04-27 16:58:10 +00:00
2005-01-04 20:46:13 +00:00
To exit db2 interactive mode, type QUIT at the command prompt. Outside
interactive mode, all commands must be prefixed with 'db2'.
To list the current command option settings, type LIST COMMAND OPTIONS.
2001-04-27 16:58:10 +00:00
2005-01-04 20:46:13 +00:00
For more detailed help, refer to the Online Reference Manual.
2001-04-27 16:58:10 +00:00
2005-01-04 20:46:13 +00:00
db2 => </screen></para>
<para>Some users prefer to avoid the CLP because it prevents using the
command line history features of the shell.</para>
<para>Some users claim that running the CLP within an Emacs shell gives
them the best of both worlds: they get command line history, and they
don't have to escape commands that contain lots of quotation marks and
brackets.</para></sect2></sect1>
<sect1 id="resources"><title>Resources</title>
<para>This section lists available additional resources for information
on using DB2 UDB 8.2 for Linux:</para>
<sect2><title>Newsgroups</title>
2001-04-27 16:58:10 +00:00
<itemizedlist>
2005-01-04 20:46:13 +00:00
<listitem><para>comp.databases.ibm-db2</para>
<para>Covers the use of DB2 on all platforms, including Linux and UNIX,
Windows, z/OS, iSeries, and pSeries. This forum is quite
active.</para></listitem>
<listitem><para>ibm.software.db2.udb</para>
<para>Similar to comp.databases.ibm-db2, but handles questions specific to the DB2
Universal Database product only.</para></listitem>
<listitem><para>ibm.software.db2.udb.beta</para>
<para>Although this newsgroup was meant to serve users trying out the DB2 UDB V8.2
"Stinger" beta code, there are a lot of general questions about DB2 UDB
on Linux that might help you. Now that the final release is
available, activity on this forum has slowed down
significantly.</para></listitem></itemizedlist></sect2>
<sect2><title>Web sites</title>
2001-04-27 16:58:10 +00:00
<itemizedlist>
2005-01-04 20:46:13 +00:00
<listitem><para>DB2 Universal Database for Linux</para>
<para><ulink url='http://www.ibm.com/software/data/db2/linux/'>http://www.ibm.com/software/data/db2/linux/</ulink></para>
<para>The home portal for DB2 UDB information on Linux.</para></listitem>
<listitem><para>DB2 UDB Version 8.2 Information Center</para>
<para><ulink url='http://publib.boulder.ibm.com/infocenter/db2help/index.jsp'>http://publib.boulder.ibm.com/infocenter/db2help/index.jsp</ulink></para>
<para>The DB2 UDB Information Center is the most current source of official DB2
UDB documentation in 29 different languages. Set your browser language
preference and the site will return the translated version of a given
page if it is available, falling back to English content if not. Access
to the information is offered via search, navigation tree, or a
comprehensive <ulink url='http://publib.boulder.ibm.com/infocenter/db2help/topic/com.ibm.db2.udb.doc/core/db2idxA.htm'>master index</ulink>.</para></listitem>
<listitem><para>DB2 UDB Version 8.2 Linux validation site</para>
<para><ulink url='http://www.ibm.com/software/data/db2/linux/validate/'>http://www.ibm.com/software/data/db2/linux/validate/</ulink></para>
<para>Information regarding IBM recommended and validated Linux distributions for the
current version of DB2 UDB.</para></listitem>
<listitem><para>DB2 UDB Online Support</para>
<para><ulink url='http://www.ibm.com/software/data/db2/udb/support.html'>http://www.ibm.com/software/data/db2/udb/support.html</ulink></para>
<para>The official support channel for DB2 Universal Database for Linux, UNIX and
Windows. Contains information and downloads regarding Fixpaks, APARs,
Technotes, DB2 UDB Flashes, and more.</para></listitem>
<listitem><para>DB2 UDB Version 8.2 PDF Manuals</para>
<para><ulink url='http://www.ibm.com/software/data/db2/udb/support/manualsv8.html'>http://www.ibm.com/software/data/db2/udb/support/manualsv8.html</ulink></para>
<para>The place to get the official DB2 UDB manuals in PDF format.</para></listitem>
<listitem><para>DB2 UDB for Linux white papers</para>
<para><ulink url='http://www.ibm.com/software/data/db2/linux/papers.html'>http://www.ibm.com/software/data/db2/linux/papers.html</ulink></para>
<para>White papers typically provide overviews or introductions to new technology or
new releases of a product. Includes the DB2 UDB "Stinger"
Enhancements on Linux white paper.</para></listitem>
<listitem><para>DB2 Magazine</para>
<para><ulink url='http://www.db2mag.com'>http://www.db2mag.com</ulink></para>
<para>This Web site is the online version of DB2 Magazine, which publishes articles
about using DB2 UDB on Linux and other platforms. You can also sign up for a
free subscription to the print version of the
magazine.</para></listitem>
<listitem><para>IBM DeveloperWorks for DB2</para>
<para><ulink url='http://www.ibm.com/developerworks/db2/'>http://www.ibm.com/developerworks/db2/</ulink></para>
<para>A great resource for tutorials, learning resources, help and tips for
improving DB2 UDB and developing DB2 UDB-based
applications.</para></listitem>
<listitem><para>International DB2 Users Group (IDUG)</para>
<para><ulink url='http://www.idug.org/html/home.asp'>http://www.idug.org/html/home.asp</ulink></para>
<para>IDUG holds a number of international conferences on DB2 and has regional user
groups. While IDUG has traditionally focused on DB2 for z/OS and
iSeries, they have increasingly included information on DB2 UDB for
Linux, UNIX, and Windows. The IDUG Web site includes online discussion
forums and links to other DB2 resources.</para></listitem>
<listitem><para>Red Hat Linux</para>
<para><ulink url='http://www.redhat.com'>http://www.redhat.com</ulink></para>
<para>Home to the Red Hat Linux distribution.</para>
<para>Also see <ulink url='http://www.redhat.com/software/rhn/'>http://www.redhat.com/software/rhn/</ulink>
(the Red Hat Network) for more information on system updates and kernel
information.</para></listitem>
<listitem><para>SuSE Linux</para>
<para><ulink url='http://www.novell.com/linux/suse/index.html'>http://www.novell.com/linux/suse/index.html</ulink></para>
<para>A Novell business, this site is the home for the SuSE Linux distribution.</para>
<para>Also see <ulink url='http://support.novell.com/filefinder/'>http://support.novell.com/filefinder/</ulink> for more information on system
updates and kernel information.</para></listitem>
<listitem><para>Fedora Project</para>
<para><ulink url='http://fedora.redhat.com/'>http://fedora.redhat.com/</ulink></para>
<para>Home to the Fedora Project Linux distribution. </para>
<para>The Fedora Project is a Red-Hat-sponsored and community-supported open source
project. It is not a supported product of Red Hat,
Inc.</para></listitem>
<listitem><para>Mandrake Linux</para>
<para><ulink url='http://www.mandrakesoft.com/'>http://www.mandrakesoft.com/</ulink></para>
<para>Home to the Mandrake Linux distribution. </para>
<para>Their current slogan is "A Linux for everyone".</para></listitem></itemizedlist></sect2></sect1>
<sect1 id="gfdl"><title>GNU Free Documentation License</title><titleabbrev>Version 1.2, November
2002</titleabbrev>
<para>Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.</para>
<para>59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</para>
<para>Everyone is permitted to copy and distribute verbatim copies of
this license document, but changing it is not
allowed.</para>
<sect2><title>PREAMBLE</title>
<para>The purpose of this License is to make a manual, textbook, or
other functional and useful document "free" in the sense of freedom: to
assure everyone the effective freedom to copy and redistribute it, with
or without modifying it, either commercially or noncommercially.
Secondarily, this License preserves for the author and publisher a way
to get credit for their work, while not being considered responsible for
modifications made by others.</para>
<para>This License is a kind of "copyleft", which means that derivative
works of the document must themselves be free in the same sense. It
complements the GNU General Public License, which is a copyleft license
designed for free software.</para>
<para>We have designed this License in order to use it for manuals for
free software, because free software needs free documentation: a free
program should come with manuals providing the same freedoms that the
software does. But this License is not limited to software manuals; it
can be used for any textual work, regardless of subject matter or
whether it is published as a printed book. We recommend this License
principally for works whose purpose is instruction or
reference.</para></sect2>
<sect2><title>APPLICABILITY AND DEFINITIONS</title>
<para> This License applies to any manual or other work, in any
medium, that contains a notice placed by the copyright holder saying it
can be distributed under the terms of this License. Such a notice
grants a world-wide, royalty-free license, unlimited in duration, to use
that work under the conditions stated herein. The "Document", below,
refers to any such manual or work. Any member of the public is a
licensee, and is addressed as "you". You accept the license if you
copy, modify or distribute the work in a way requiring permission
under copyright law.</para>
<para>A "Modified Version" of the Document means any work containing the
Document or a portion of it, either copied verbatim, or with
modifications and/or translated into another language.</para>
<para>A "Secondary Section" is a named appendix or a front-matter
section of the Document that deals exclusively with the relationship of
the publishers or authors of the Document to the Document's overall
subject (or to related matters) and contains nothing that could fall
directly within that overall subject. (Thus, if the Document is in part
a textbook of mathematics, a Secondary Section may not explain any
mathematics.) The relationship could be a matter of historical
connection with the subject or with related matters, or of
legal, commercial, philosophical, ethical or political position
regarding them.</para>
<para>The "Invariant Sections" are certain Secondary Sections whose
titles are designated, as being those of Invariant Sections, in the
notice that says that the Document is released under this License. If a
section does not fit the above definition of Secondary then it is not
allowed to be designated as Invariant. The Document may contain zero
Invariant Sections. If the Document does not identify any Invariant
Sections then there are none.</para>
<para>The "Cover Texts" are certain short passages of text that are
listed, as Front-Cover Texts or Back-Cover Texts, in the notice that
says that the Document is released under this License. A Front-Cover
Text may be at most 5 words, and a Back-Cover Text may be at most 25
words.</para>
<para>A "Transparent" copy of the Document means a machine-readable
copy, represented in a format whose specification is available to the
general public, that is suitable for revising the document
straightforwardly with generic text editors or (for images composed of
pixels) generic paint programs or (for drawings) some widely available
drawing editor, and that is suitable for input to text formatters or for
automatic translation to a variety of formats suitable for input to text
formatters. A copy made in an otherwise Transparent file format whose
markup, or absence of markup, has been arranged to thwart or
discourage subsequent modification by readers is not Transparent. An
image format is not Transparent if used for any substantial amount of
text. A copy that is not "Transparent" is called "Opaque".</para>
<para>Examples of suitable formats for Transparent copies include plain
ASCII without markup, Texinfo input format, LaTeX input format, SGML or
XML using a publicly available DTD, and standard-conforming simple HTML,
PostScript or PDF designed for human modification. Examples of
transparent image formats include PNG, XCF and JPG. Opaque formats
include proprietary formats that can be read and edited only by
proprietary word processors, SGML or XML for which the DTD and/or
processing tools are not generally available, and the machine-generated
HTML, PostScript or PDF produced by some word processors for output
purposes only.</para>
<para>The "Title Page" means, for a printed book, the title page itself,
plus such following pages as are needed to hold, legibly, the material
this License requires to appear in the title page. For works in formats
which do not have any title page as such, "Title Page" means the text
near the most prominent appearance of the work's title, preceding the
beginning of the body of the text.</para>
<para>A section "Entitled XYZ" means a named subunit of the Document
whose title either is precisely XYZ or contains XYZ in parentheses
following text that translates XYZ in another language. (Here XYZ
stands for a specific section name mentioned below, such as
"Acknowledgements", "Dedications", "Endorsements", or "History".) To
"Preserve the Title" of such a section when you modify the Document
means that it remains a section "Entitled XYZ" according to
this definition.</para>
<para>The Document may include Warranty Disclaimers next to the notice
which states that this License applies to the Document. These Warranty
Disclaimers are considered to be included by reference in this License,
but only as regards disclaiming warranties: any other implication that
these Warranty Disclaimers may have is void and has no effect on the
meaning of this License.</para></sect2>
<sect2><title>VERBATIM COPYING</title>
<para>You may copy and distribute the Document in any medium, either
commercially or noncommercially, provided that this License, the
copyright notices, and the license notice saying this License applies to
the Document are reproduced in all copies, and that you add no other
conditions whatsoever to those of this License. You may not use
technical measures to obstruct or control the reading or further copying
of the copies you make or distribute. However, you may accept
compensation in exchange for copies. If you distribute a large enough
number of copies you must also follow the conditions in section
3.</para>
<para>You may also lend copies, under the same conditions stated above,
and you may publicly display copies.</para></sect2>
<sect2><title>COPYING IN QUANTITY</title>
<para>If you publish printed copies (or copies in media that commonly
have printed covers) of the Document, numbering more than 100, and the
Document's license notice requires Cover Texts, you must enclose the
copies in covers that carry, clearly and legibly, all these Cover Texts:
Front-Cover Texts on the front cover, and Back-Cover Texts on the back
cover. Both covers must also clearly and legibly identify you as the
publisher of these copies. The front cover must present the full title
with all words of the title equally prominent and visible. You may add
other material on the covers in addition. Copying with changes limited
to the covers, as long as they preserve the title of the Document and
satisfy these conditions, can be treated as verbatim copying in other
respects.</para>
<para>If the required texts for either cover are too voluminous to fit
legibly, you should put the first ones listed (as many as fit
reasonably) on the actual cover, and continue the rest onto adjacent
pages.</para>
<para>If you publish or distribute Opaque copies of the Document
numbering more than 100, you must either include a machine-readable
Transparent copy along with each Opaque copy, or state in or with each
Opaque copy a computer-network location from which the general
network-using public has access to download using public-standard
network protocols a complete Transparent copy of the Document, free of
added material. If you use the latter option, you must take reasonably
prudent steps, when you begin distribution of Opaque copies in quantity,
to ensure that this Transparent copy will remain thus accessible at the
stated location until at least one year after the last time you
distribute an Opaque copy (directly or through your agents or retailers)
of that edition to the public.</para>
<para>It is requested, but not required, that you contact the authors of
the Document well before redistributing any large number of copies, to
give them a chance to provide you with an updated version of the
Document.</para></sect2>
<sect2><title>MODIFICATIONS</title>
<para>You may copy and distribute a Modified Version of the Document
under the conditions of sections 2 and 3 above, provided that you
release the Modified Version under precisely this License, with the
Modified Version filling the role of the Document, thus licensing
distribution and modification of the Modified Version to whoever
possesses a copy of it. In addition, you must do these things in the
Modified Version:
<orderedlist>
<listitem><para>Use in the Title Page (and on the covers, if any) a
title distinct from that of the Document, and from those of previous
versions (which should, if there were any, be listed in the History
section of the Document). You may use the same title as a previous
version if the original publisher of that version gives
permission.</para></listitem>
<listitem><para>List on the Title Page, as authors, one or more persons
or entities responsible for authorship of the modifications in the
Modified Version, together with at least five of the principal authors
of the Document (all of its principal authors, if it has fewer than
five), unless they release you from this requirement.</para></listitem>
<listitem><para>State on the Title page the name of the publisher of the
Modified Version, as the publisher.</para></listitem>
<listitem><para>Preserve all the copyright notices of the
Document.</para></listitem>
<listitem><para>Add an appropriate copyright notice for your
modifications adjacent to the other copyright notices.</para></listitem>
<listitem><para>Include, immediately after the copyright notices, a
license notice giving the public permission to use the Modified Version
under the terms of this License, in the form shown in the Addendum
below.</para></listitem>
<listitem><para>Preserve in that license notice the full lists of
Invariant Sections and required Cover Texts given in the Document's
license notice.</para></listitem>
<listitem><para>Include an unaltered copy of this
License.</para></listitem>
<listitem><para>Preserve the section Entitled "History", Preserve its
Title, and add to it an item stating at least the title, year, new
authors, and publisher of the Modified Version as given on the Title
Page. If there is no section Entitled "History" in the Document, create
one stating the title, year, authors, and publisher of the Document as
given on its Title Page, then add an item describing the Modified
Version as stated in the previous sentence.</para></listitem>
<listitem><para>Preserve the network location, if any, given in the
Document for public access to a Transparent copy of the Document, and
likewise the network locations given in the Document for previous
versions it was based on. These may be placed in the "History" section.
You may omit a network location for a work that was published at least
four years before the Document itself, or if the original publisher of
the version it refers to gives permission.</para></listitem>
<listitem><para>For any section Entitled "Acknowledgements" or
"Dedications", Preserve the Title of the section, and preserve in the
section all the substance and tone of each of the contributor
acknowledgements and/or dedications given therein.</para></listitem>
<listitem><para>Preserve all the Invariant Sections of the Document,
unaltered in their text and in their titles. Section numbers or the
equivalent are not considered part of the section
titles.</para></listitem>
<listitem><para>Delete any section Entitled "Endorsements". Such a
section may not be included in the Modified Version.</para></listitem>
<listitem><para>Do not retitle any existing section to be Entitled
"Endorsements" or to conflict in title with any Invariant
Section.</para></listitem>
<listitem><para>Preserve any Warranty Disclaimers.</para></listitem>
</orderedlist></para>
<para>If the Modified Version includes new front-matter sections or
appendices that qualify as Secondary Sections and contain no material
copied from the Document, you may at your option designate some or all
of these sections as invariant. To do this, add their titles to the
list of Invariant Sections in the Modified Version's license notice.
These titles must be distinct from any other section titles.</para>
<para>You may add a section Entitled "Endorsements", provided it
contains nothing but endorsements of your Modified Version by various
parties--for example, statements of peer review or that the text has
been approved by an organization as the authoritative definition of a
standard.</para>
<para>You may add a passage of up to five words as a Front-Cover Text,
and a passage of up to 25 words as a Back-Cover Text, to the end of the
list of Cover Texts in the Modified Version. Only one passage of
Front-Cover Text and one of Back-Cover Text may be added by (or through
arrangements made by) any one entity. If the Document already includes
a cover text for the same cover, previously added by you or by
arrangement made by the same entity you are acting on behalf of, you may
not add another; but you may replace the old one, on explicit permission
from the previous publisher that added the old one.</para>
<para>The author(s) and publisher(s) of the Document do not by this
License give permission to use their names for publicity for or to
assert or imply endorsement of any Modified
Version.</para></sect2>
<sect2><title>COMBINING DOCUMENTS</title>
<para>You may combine the Document with other documents released under
this License, under the terms defined in section 4 above for modified
versions, provided that you include in the combination all of the
Invariant Sections of all of the original documents, unmodified, and
list them all as Invariant Sections of your combined work in its license
notice, and that you preserve all their Warranty Disclaimers.</para>
<para>The combined work need only contain one copy of this License, and
multiple identical Invariant Sections may be replaced with a single
copy. If there are multiple Invariant Sections with the same name but
different contents, make the title of each such section unique by adding
at the end of it, in parentheses, the name of the original author or
publisher of that section if known, or else a unique number. Make the
same adjustment to the section titles in the list of Invariant Sections
in the license notice of the combined work.</para>
<para>In the combination, you must combine any sections Entitled
"History" in the various original documents, forming one section
Entitled "History"; likewise combine any sections Entitled
"Acknowledgements", and any sections Entitled "Dedications". You must
delete all sections Entitled
"Endorsements".</para></sect2>
<sect2><title>COLLECTIONS OF DOCUMENTS</title>
<para>You may make a collection consisting of the Document and other
documents released under this License, and replace the individual copies
of this License in the various documents with a single copy that is
included in the collection, provided that you follow the rules of this
License for verbatim copying of each of the documents in all other
respects.</para>
<para>You may extract a single document from such a collection, and
distribute it individually under this License, provided you insert a
copy of this License into the extracted document, and follow this
License in all other respects regarding verbatim copying of that
document.</para></sect2>
<sect2><title>AGGREGATION WITH INDEPENDENT WORKS</title>
<para>A compilation of the Document or its derivatives with other
separate and independent documents or works, in or on a volume of a
storage or distribution medium, is called an "aggregate" if the
copyright resulting from the compilation is not used to limit the legal
rights of the compilation's users beyond what the individual works
permit. When the Document is included in an aggregate, this License does
not apply to the other works in the aggregate which are not themselves
derivative works of the Document.</para>
<para>If the Cover Text requirement of section 3 is applicable to these
copies of the Document, then if the Document is less than one half of
the entire aggregate, the Document's Cover Texts may be placed on covers
that bracket the Document within the aggregate, or the electronic
equivalent of covers if the Document is in electronic form. Otherwise
they must appear on printed covers that bracket the whole
aggregate.</para></sect2>
<sect2><title>TRANSLATION</title>
<para>Translation is considered a kind of modification, so you may
distribute translations of the Document under the terms of section 4.
Replacing Invariant Sections with translations requires special
permission from their copyright holders, but you may include
translations of some or all Invariant Sections in addition to the
original versions of these Invariant Sections. You may include a
translation of this License, and all the license notices in
the Document, and any Warranty Disclaimers, provided that you also
include the original English version of this License and the original
versions of those notices and disclaimers. In case of a disagreement
between the translation and the original version of this License or a
notice or disclaimer, the original version will prevail.</para>
<para>If a section in the Document is Entitled "Acknowledgements",
"Dedications", or "History", the requirement (section 4) to Preserve its
Title (section 1) will typically require changing the actual
title.</para></sect2>
<sect2><title>TERMINATION</title>
<para>You may not copy, modify, sublicense, or distribute the Document
except as expressly provided for under this License. Any other attempt
to copy, modify, sublicense or distribute the Document is void, and will
automatically terminate your rights under this License. However,
parties who have received copies, or rights, from you under this License
will not have their licenses terminated so long as such parties remain
in full compliance.</para></sect2>
<sect2><title>FUTURE REVISIONS OF THIS LICENSE</title>
<para>The Free Software Foundation may publish new, revised versions of
the GNU Free Documentation License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in
detail to address new problems or concerns. See
http://www.gnu.org/copyleft/.</para>
<para>Each version of the License is given a distinguishing version
number. If the Document specifies that a particular numbered version of
this License "or any later version" applies to it, you have the option
of following the terms and conditions either of that specified version
or of any later version that has been published (not as a draft) by the
Free Software Foundation. If the Document does not specify a version
number of this License, you may choose any version ever published (not
as a draft) by the Free Software
Foundation.</para></sect2></sect1>
<sect1 id='trademarks'><title>Trademarks</title>
<para>DB2, DB2 UDB,, DB2 Universal Database, IBM, iSeries, pSeries,
zSeries, and z/OS are trademarks or registered trademarks of
International Business Machines Corporation in the United States, other
countries, or both.</para>
<para>Java and all Java-based trademarks are trademarks of Sun
Microsystems, Inc. in the United States, other countries, or
both.</para>
<para>Windows is a trademark of Microsoft Corporation in the United
States, other countries, or both.</para>
<para>Intel and Pentium are trademarks of Intel Corporation in the
United States, other countries, or both.</para>
<para>UNIX is a registered trademark of The Open Group in the United
States and other countries.</para>
<para>Linux is a trademark of Linus Torvalds in the United States, other
countries, or both.</para>
<para>Other company, product, or service names may be trademarks or
service marks of others.</para></sect1></article>