Documente Academic
Documente Profesional
Documente Cultură
Information Management
IBM Software
Information Management
Table of Contents
1
2
5
6
7
8
3.2
Software Prerequisites.....................................................4
4.2
6.2
6.3
Repackaging..................................................................22
Appendix........................................................................23
8.1
Feedback.......................................................................24
Page 2 of 25
IBM Software
Information Management
Attention: Before you begin using the provided DB2 Enterprise 9.7 Trial Virtual Appliance, please make sure you read this guide
thoroughly in order to ensure the successful deployment of the DB2 virtual appliance.
2 Introduction
This document details the deployment procedure for DB2 Enterprise 9.7 Trial Virtual Appliance. It will allow you to experience
the fully functional DB2 data server in a VMware based virtual image (VM). The VM also includes customized YaST modules to
guide you through the configuration steps.
2.1
The following matrix is meant to provide you with an overview of the software components that are going to be installed in the
virtual appliance, as well as driver versions that are to be applied as part of the deployment.
Version
SUSE Linux Enterprise Server
11 + SP1
FP5
4.1 Alpha 4
1.8.3
2.2.1.0
Comment
3.1
Hardware Prerequisites
The DB2 Enterprise 9.7 Trial Virtual Appliance is available in both a 32-bit and 64-bit version.
It is required that you have met the following specifications on your host machine:
Page 3 of 25
IBM Software
Information Management
3.2
Requirement
Specification
Minimum: 1.5 GB
Minimum: 8.0 GB
Software Prerequisites
This Image is designed to run in VMware Workstation 5.5 / VMware Player 2.0 or later. You may download the software from the
VMware website: http://www.vmware.com.
4 Getting Started
4.1
To run the DB2 virtual appliance (either 32 or 64 bit), perform the following steps:
1.
Copy and extract the self-extracting package into a temporary directory. The self-extracting package name should be in
the form of:
2.
DB2_ESE_9.7_trial_VA_<bitness>bit.exe
Extract the contents of the package to the desired directory. On Linux you may use the command:
unrar x DB2_ESE_9.7_trial_VA_<bitness>bit.exe
(You will need an unrar utility that is supported on your platform.)
On Windows, you can extract the contents by executing the following self-extracting package:
DB2_ESE_9.7_trial_VA_<bitness>bit.exe
Attention: The uncompressed image files will take up about 4 GB of space and the size will grow as you use the DB2 virtual
appliance. Please make sure you have enough free disk space before un-compressing the self-extracted package.
3.
4.
Open the VMware image that was extracted to a directory in step two. You may do this by clicking File > Open and
browsing to the directory the files were extracted in.
Page 4 of 25
IBM Software
Information Management
4.2
4.2.1
(Optional) At any point in time when you are using the virtual appliance, if you wish to capture the current state of the image, you
can take a snapshot of the image by doing the following:
1. Click on the
2. Enter the name of the Snapshot and press on OK button to save the snapshot.
4.2.2
button. In the Manage Snapshot window, click on the snapshot you wish to
Page 5 of 25
IBM Software
Information Management
Page 6 of 25
IBM Software
Information Management
2.
Wait for the system to boot up and, if everything is successful, you should see the Language and Keyboard layout
screen, as shown below. Click Next to continue.
3.
Now you should see the Welcome screen. Click Next to continue.
4.
You must accept the Novell License Agreement in order to continue; otherwise, the virtual appliance will halt.
Page 7 of 25
IBM Software
Information Management
5. You also must accept the IBM DB2 License Agreement in order to continue. Click Next.
6. You can change the hostname of your virtual machine if you wish in the following configuration screen. Note that if you
are going to configure a static IP address for this virtual machine, you should uncheck the Change hostname via
DHCP checkbox. The next configuration screen will allow you to set the static IP. Click Next to continue.
IBM DB2 ESE 9.7 Trial Virtual Appliance
Copyright IBM Corp. 2011. All rights reserved
Page 8 of 25
IBM Software
Information Management
7. The next configuration screen, as shown below, allows you to optionally configure the network card in your virtual
machine. It has been preset to use DHCP. You can use the
change any of the configurations. Click Next to continue.
Page 9 of 25
IBM Software
Information Management
8. The next screen allows you to change the timezone of your machine. Please use the drop-down menus and the button
to change this configuration. Press Next to continue.
9. The following screen prompts you to choose a password for the root user. Please choose a secure password and press
Next to continue.
Page 10 of 25
IBM Software
Information Management
10. The next screen prompts you to choose passwords for the DB2 instance user, DB2 fenced user, and DB2
administration server user. You can change the default user and group values by un-checking the
checkbox. Press Next to continue.
11. The next screen will show a progress of the DB2 configuration. The DB2 system and instance users will be created.
Page 11 of 25
IBM Software
Information Management
12. The next screen shows a summary of the DB2 configuration. All tasks should report a status of OK. Press Next to
continue.
13. The next screen asks you to enter a name for the production database. You can leave the field blank to create the
database at a later time. Press Next to continue.
Page 12 of 25
IBM Software
Information Management
14. The next screen shows a summary of the DB2 Database Creation. All tasks should report a status of OK. You will
notice that only the default tablespaces are created in the database. If you wish to create additional
database/tablespaces, creation scripts are created for your convenience. Mark down the location of these scripts and
you will be able to create the desired database objects at a later time. Press Next to continue.
Page 13 of 25
IBM Software
Information Management
15. At this point, when you press the Next button, the suseconfig process will run to complete the setup of your system.
This takes a minute or so. You should now see the login screen of the system.
The system is now ready to be used and the DB2 database manager is started. To understand the configurations that have
been applied to your system, you can read about them in the section 8 Appendix.
It is highly recommended that the end user install the VMware Tools version that comes with their VMware product after the DB2
9.7 Virtual Appliance has been fully configured. VMware Tools brings in many benefits for the use of any virtual appliance,
including better clock synchronization with the host system, improved file movement between the host and guest OS (if
applicable), and improved GUI responsiveness. For more information on VMware Tools, please refer to your VMware product
manual.
6.2
In the deployed DB2 virtual appliance environment, a package is installed automatically which allows the user to easily start and
stop DB2 and setup required kernel environment with one single command.
6.2.1
The rcdb2 tool is pre-installed on the virtual appliance for your convenience. With one single rcdb2 command, you are able to:
check the current status of DB2 Administration Server and instances
setup required kernel parameters and start DB2 and activate all existing DB2 databases
IBM DB2 ESE 9.7 Trial Virtual Appliance
Copyright IBM Corp. 2011. All rights reserved
Page 14 of 25
IBM Software
Information Management
# rcdb2 status
DAS:
Instance db2inst1 (/opt/ibm/db2/V9.7):
running
running
To stop DB2, run the following command with the root user:
# rcdb2 stop
Stopping DAS:
Stopping instance db2inst1 (/opt/ibm/db2/V9.7):
done
done
To start DB2, run the following command with the root user:
# rcdb2 start
Starting DAS:
Starting instance db2inst1 (/opt/ibm/db2/V9.7):
Activating database ANYDB for db2inst1
done
done
done
Every time rcdb2 start is executed, it will verify and set the required kernel parameters to run DB2 on the system. When the
kernel parameters are verified in place, the tool will start DB2 Administration Server as well as every DB2 instances and
databases on the system.
To restart DB2, run the following command with the root user:
# rcdb2 restart
Stopping DAS:
Stopping instance db2inst1 (/opt/ibm/db2/V9.7):
Starting DAS:
Starting instance db2inst1 (/opt/ibm/db2/V9.7):
Activating database ANYDB for db2inst1
6.2.2
done
done
done
done
done
In a default Linux environment, the default kernel parameter values are not sufficient when running DB2 database on a system.
The DB2 virtual appliance customized rcdb2 start/stop script updates the recommended kernel parameters for a virtualized DB2
server.
By default, the DB2 virtual appliance customized rcdb2 start/stop script updates the following kernel parameters every time
rcdb2 start/restart is executed.
Page 15 of 25
IBM Software
Information Management
kernel.shmmax = <90%_of_physical_memory_on_system>
kernel.shmall = <90%_of_physical_memory_on_system_in_pages>
kernel.shmmni = 4096
kernel.msgmni = 1024
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.sem = 250 256000 32 4096
vm.swappiness = 0
vm.dirty_ratio = 10
vm.dirty_background_ratio = 5
fs.file-max = 262144
Attention: It is strongly recommended to keep the default DB2 kernel parameter settings. Modifying any default DB2 kernel
parameters may result in DB2 running on the system not able to perform properly.
If you are certain and would still like to modify the kernel parameters, execute the following command to modify the kernel
parameters temporarily. Note that you must have root authority to modify kernel parameters.
# /sbin/sysctl -w <kernel_parameter_name>=<new_value>
For example, if you would like to set the value of kernel.msgmax to 65536:
# /sbin/sysctl w kernel.msgmax=65536
NOTE: The kernel parameters will only be modified temporarily. Every time the system is rebooted, or when rcdb2 start/restart is
executed, the kernel parameters will be updated to the above default virtualized DB2 environment settings.
6.2.3
During the initial DB2 configuration module, certain Database Manager settings have been pre-configured for your DB2
environment. These settings are configured based on expert recommendations for easy administration. However, if you have
specific business requirements for your DB2 environment, you may change the parameters as required.
auto_maint ON;
auto_db_backup OFF;
auto_tbl_maint ON;
IBM DB2 ESE 9.7 Trial Virtual Appliance
Copyright IBM Corp. 2011. All rights reserved
Page 16 of 25
IBM Software
Information Management
auto_runstats ON;
auto_reorg ON;
All other database parameters are set to the DB2 default values.
db2set all
To display a list of configured DB2 Database Manager Configuration parameters:
db2set <REGISTRY_PARAMETER>=<VALUE>
To update Database Manager (DBM) configuration parameters:
Once you have successfully deployed the DB2 virtual appliance, you will be provided with scripts for creating additional
databases and tablespaces.
The location of the scripts is in the DB2 instances home directory under the bin directory:
/home/<DB2INSTANCE>/bin/createDatabase
Page 17 of 25
IBM Software
Information Management
/home/<DB2INSTANCE>/bin/createTablespaces
6.2.4.1 createDatabase script
The createDatabase script is executed if you have chosen to create a database in the DB2 configuration module.
The database created will have the following attributes:
Storage method: Automatic storage database using database/storage path on /db2fs
Database will be created under: /db2fs/<DB2INSTANCE>/NODE0000/<DBNAME>
Database partitions: 0
Buffer Pools: A bufferpool named bpool8k is created by default with page size of 8 kB.
If you wish to create an additional database, you can create a database using the preconfigured createDatabase script following
the following procedures:
1.
db2server:~ # su db2inst1
2.
db2inst1@db2server:~> cd bin
3.
When the database has successfully created, you should see the following message:
Page 18 of 25
IBM Software
Information Management
db2server:~ # su db2inst1
2.
db2inst1@db2server:~> cd bin
3.
The recommended tablespace sizing will be displayed. Enter Y to accept the default sizing or N to provide your own
sizing preferences.
6.3
The tablespaces will then be created. The createTablespaces progress may take several hours to finish. Please wait
patiently for the tablespaces to get created.
With the advent of IBM Data Studio comes a major advance in the way DB2 developers and administrators alike carry out
their day to day functions. Historically, depending on the tasks to be completed, it was common to switch back and forth
between disparate tools such as Control Center, Health Monitor, Developer Workbench, and even the DB2 Command Line
Processor (CLP).
The release of IBM Data Studio changes all this, facilitating DB2 administration, design, development, and monitoring all within
an integrated, Eclipsed-based environment. Data Studio, the same tool that allows tuning of buffer pools and restriction of
access to data objects, can now be used to develop data web services and debug stored procedures. By leveraging the power
of IBM Data Studio, users are certain to enjoy increased productivity as they find themselves able to perform a majority of their
tasks within a single environment.
6.3.1
To launch the IBM Data Studio, login as a DB2 instance user, and execute the following command:
IBM DB2 ESE 9.7 Trial Virtual Appliance
Copyright IBM Corp. 2011. All rights reserved
Page 19 of 25
IBM Software
Information Management
Minimize this window by clicking the minimize button located at the top right to bring you into the Data perspective as shown
below.
Page 20 of 25
IBM Software
Information Management
Page 21 of 25
IBM Software
Information Management
7 Repackaging
The purpose of pre-integrating software into the DB2 9.7 Virtual Appliance is to alleviate the application installation, configuration,
and integration tasks from the end-user, making the deployment of the applications on DB2 in a VA easy and painless.
We use SUSE Studio technology to build such appliances which accompany this document. As a SUSE Studio user, you can
also easily build customized appliances with DB2 through integrated templates.
If you are interested in integrating your solution into a DB2 Express-C virtual appliance, you can either search for db2 on SUSE
Studio (http://susegallery.com/search?q=db2), or visit the following links (respective of your desired architecture) to obtain the
integrated templates:
32bit http://susegallery.com/a/EMFF3Y/db2-express-c-972-sles11-sp1-32-bit
64bit http://susegallery.com/a/EMFF3Y/db2-express-c-972-sles11-sp1-64-bit
These templates both contain DB2 Express-C running on Novell SUSE Linux Enterprise Server 11 SP1 operating system.
For more information, or for other editions of DB2, please feel free to contact askdata@ca.ibm.com and enter "Use of DB2 9.7
Virtual Appliance for Repackaging" in the subject line.
Page 22 of 25
IBM Software
Information Management
8 Appendix
The following section provides information on certain configurations already performed on your DB2 Appliance.
8.1
Default
Configured in VA
Installation Directory
/opt/ibm/db2/V9.7
- /opt/ibm/db2/V9.7
db2inst1/db2grp1
dasusr1/dasadm1
db2fenc1/db2fgrp1
db2c_%INSTANCE%/50001
50001
DFTDBPATH
/home/%INSTANCE%
/db2fs
DIAGPATH
/home/%INSTANCE%
/db2fs/diag
DB2COMM
N/A
TCPIP
Page 23 of 25
IBM Software
Information Management
9 Additional Information
9.1
Feedback
Page 24 of 25
IBM Software
Information Management
Page 25 of 25