Main
ibm.com/redbooks
DB2 Deployment Guide
Front cover
Page
Page
Page
Contents
Page
Page
Page
Notices
viii
Trademarks
Preface
The team that wrote this book
Acknowledgements
Become a published author
Comments welcome
Page
Page
1.1 DB2 deployment overview
1.2 DB2 9.5 for UNIX, Linux, and Windows products
1.2.1 DB2 Server products
DB2 Express-C and DB2 Express-C FTL Edition
DB2 Express Edition
DB2 Workgroup Server Edition
1.2.2 DB2 clients and drivers
IBM Data Server Runtime Client
IBM Data Server Client
IBM Data Server Driver for ODBC, CLI, and .NET
IBM Data Server Driver for JDBC and SQLJ
6
Table 1-1 Downloadable DB2 products and components
1.2.3 DB2 standalone and connect products
DB2 Personal Edition
DB2 Connect Personal Edition
DB2 Connect Enterprise Edition
DB2 Connect Application Server Edition
1.2.4 Other DB2 products
IBM Database Enterprise Developer Edition (DEDE) 9.5
InfoSphere Warehouse (as of 9.5.1)
1.3 Deployment considerations
1.3.1 New environment versus environment with existing DB2 installation
Nature of the client and application
Chapter 1. Introduction to DB2 deployment 13
Client/server relationship
Hardware and software considerations
Table 1-4 Hardware requirements for Version 9.5
14
Table1-5 illustrates the software requirements for DB2 9.5.
Table 1-5 Software requirement for DB2 9.5
Chapter 1. Introduction to DB2 deployment 15
1.3.2 DB2 version considerations
Chapter 1. Introduction to DB2 deployment 17
1.3.3 DB2 product considerations
Table 1-6 DB2 for LUW Server product listing: Features and functions
18
Page
20
Figure 1-2 shows the DB2 9.5 product decision flow.
Figure 1-2 DB2 9.5 product selection chart
1.3.4 License considerations
Authorized User license
This is a license based on the number of users that access given specific DB2 data servers.
Processor Value Unit license
1.3.5 Authorization considerations
Requirements and limitations on Linux and UNIX platforms
Requirements
Limitations
Requirements and limitations in Windows platforms
Requirements
Limitations
1.3.6 Configuration considerations
1.3.7 Other considerations
Page
Page
Page
2.1 Server deployment planning
2.1.1 System requirement
2.1.2 User and group required in deployment
DB2 Users and groups on Linux and UNIX
Instance owner user
Fenced user
Administration server user
Windows security
2.1.3 Non-root/non-Administrator installation
Non-root installation on UNIX/Linux
Elevated privileges installation on Windows
2.1.4 DB2 configuration profile and database profile
DB2 Configuration Assistant
Page
db2cfexp and db2cfimp
Database configuration
2.1.5 Considerations for a partitioned database
Licensing for a partitioned database
NFS
Remote shell
Users and groups in a partitioned database environment
Communication settings
2.2 DB2 server deployment methods
2.2.1 DB2 Setup wizard
Page
Page
2.2.2 db2_install
Page
2.2.3 Response file
Page
Creating a response file using the DB2 Setup wizard
Creating a response file using Response File Generator db2rspgn (for Windows)
Page
Creating a response file from the sample response file
Page
54
Deploying DB2 server with application
Page
2.2.4 Payload file deployment (for Linux and UNIX)
2.3 Mass deployment of DB2 server using a script
Baltic Banda
Zaire
2.3.1 Setup of SSH and NFS
Installing SSH on managed machines
Enabling SSH automatic login for root user
Page
Page
NFS configuration
2.3.2 DB2 license
2.3.3
Chapter 2. DB2 server deployment 65
Figure 2-7 Logic of the mass deployment script
Example 2-18 shows our sample deployment script db2srv_install.
Example 2-18 Source code of db2srv_install
66
Chapter 2. DB2 server deployment 67
68
Chapter 2. DB2 server deployment 69
Command line options
The following command line syntax is used for db2srv_install:
Page
Running a mass deployment
Page
2.3.4 Windows deployment scripts
Page
2.4 Fix pack deployment
2.4.1 Fix pack overview
Stopping all DB2 processes before deployment
Deployment method
Tasks after fix pack deployment
2.4.2 Mass deployment of DB2 fix pack with a script
Environment
Baltic Banda
Script logic and command line options
Zaire
Page
Sample deployment script
82
Chapter 2. DB2 server deployment 83
84
Chapter 2. DB2 server deployment 85
86
Example 2-28 shows the screen output.
Example 2-28 Performing the mass deployment of DB2 fix pack
Page
Page
Page
3.1 Client deployment planning
3.1.1 Select the right client type
3.1.2 Footprint
3.1.3 Reducing the size of the install image
?
3.1.4 Configuration and customization
Configuration profile
db2cli.ini initialization file
3.1.5 Compatibility
Multiple instance compatibility
Client /Server compatibility
3.1.6 Licensing
3.1.7 How to deploy the DB2 client
3.2 IBM Data Server Client, Runtime Client, Driver for ODBC, CLI, and .NET
3.2.1 IBM data server client installation methods
DB2 Setup wizard
db2_install script
Response file install
3.2.2 Client instance on the DB2 server
3.2.3 Reducing the installation image
The db2iprune command line utility
Page
Considerations for a pruned DB2 installation
3.2.4 Mass deployment of IBM data server client product
IBM data server client deployment on Windows
Packaging IBM data server client product using Microsoft SMS
Page
Page
Page
Page
Page
Page
Page
Page
Page
Page
Packaging IBM data server client product using Microsoft SCCM
Page
Page
Page
Page
Page
Page
Distributing DB2 install packages using the Microsoft SCCM
Page
Page
Page
Page
Page
Page
Page
Page
Page
Page
IBM data server client deployment on Linux and UNIX
3.3 Thin Client deployment
Page
Creating a thin client response file
Mapping a network drive from each thin client to the code server
Setting up thin clients using the thnsetup command
Page
Page
Page
4.1 Introduction to application deployment package
4.1.1 IBM Data Server Driver for JDBC and SQLJ
Page
IBM Data Server Driver for JDBC and SQLJ files
Database server configuration setup
Page
4.1.2 IBM Data Server Driver for ODBC, CLI, and .NET, and IBM Data Server Driver for ODBC and CLI
Page
Page
Installing IBM Data Server Driver for ODBC and CLI
Installing IBM Data Server Driver for ODBC, CLI, and .NET
Configuring IBM Data Server Driver for ODBC and CLI
Page
Page
License requirements
4.2 Java
Page
Deployment procedure for a Java application
Page
4.3 Deploying C/C++ applications
4.3.1 CLI and ODBC
Comparison of CLI and ODBC
4.3.2 Sample application
Page
4.3.3 Considerations for deployment of CLI and ODBC applications
Redistributable driver files
Connecting to database
4.3.4 Deploying a CLI application along with ODBC CLI driver
Preparing the redistributable driver files
160
Example 4-6 Script file bldpkg
Chapter 4. Deploying applications with DB2 161
Preparing the application executable file
Page
Page
Page
166
Deploying the application package to the target system
Page
4.3.5 Embedded SQL and Administrative API
4.4 PHP
4.4.1 PDO_IBM
4.4.2 IBM_DB2
4.4.3 Installation of IBM PHP drivers
Prerequisites
4.4.4 PHP
IBM Data Server Driver for CLI support
Installation procedure on Linux and UNIX
Page
Installation procedure on Windows
4.4.5 Sample application
4.4.6 Deploying a PHP application with the DB2 drivers
Preparing DB2 PHP driver and redistributable DB2 ODBC and CLI driver files
Preparing the PHP application package
Chapter 4. Deploying applications with DB2 177
178
Page
Deploying the DB2 PHP application
4.5 Ruby
4.5.1 IBM IBM_DB gem
4.5.2 Installation of IBM_DB gem
Installation procedure for Linux, UNIX, and Windows
4.5.3 Creating a sample Ruby application
4.5.4 Deploying a Ruby application with the DB2 drivers
Preparing IBM_DB gem and redistributable DB2 ODBC and CLI driver files
Preparing the Ruby application package
Chapter 4. Deploying applications with DB2 185
186
Deploying the DB2 Ruby application
4.5.5 Help and support
4.6 Python
4.6.1 IBM_DB driver
4.6.2 IBM_DB_DBI wrapper
4.6.3 IBM_DB_SA adaptor
4.6.4 Installation of IBM Python drivers
Prerequisites
Installation procedure
4.6.5 Creating a sample Python application
4.6.6 Deploying a Python application with the DB2 drivers
Preparing Python driver and redistributable DB2 driver files
Preparing the Python application package
Chapter 4. Deploying applications with DB2 195
196
Deploying the sample Python application
198
Example 4-37 Deploying using script py_app_install
4.6.7 Help and support
4.7 Perl
4.7.1 DBD::DB2
4.7.2 Installation of IBM Perl driver
Prerequisites to installing DBD::DB2
Installation procedure for Linux and UNIX
Installation procedure for Windows
4.7.3 Creating a sample Perl application
4.7.4 Deploying a Perl application with the DB2 drivers
Preparing Perl driver and redistributable DB2 driver files
Preparing the Perl application package
Chapter 4. Deploying applications with DB2 205
Page
Chapter 4. Deploying applications with DB2 207
Deploying the DB2 Perl application
Example 4-47 Deployment using script perl_app_install
4.7.5 Help and support
4.8 .NET
Deployment procedure for a .NET application
Page
Page
Page
databases
5.1 Introduction
Using a backup image
Using scripts
5.1.1 Sample database
5.2 Deploying a database using scripts
5.2.1 Collecting information about the database
Database creation
Database layout
Page
Database objects
Dependencies between database objects
db2look
Creating a database with the output from db2look
Page
5.2.2 Using a shell script
Command line processor options
CLP return codes
UNIX script
Windows script
Page
The complete Windows example
5.2.3 Using an application
Creating the database from Java
Creating database layout and database objects from Java
Java sample applications
5.3 Deploying a database using a backup image
5.4 Populating the database
5.4.1 Using SQL statements
Using a shell script
Using an application
5.4.2 Using DB2 utilities
Exporting data
Importing data
Import utility
Load utility
The db2move utility
Exporting data with db2move
Importing data with db2move
Loading data with db2move
5.5 Updating an existing installation
5.5.1 Updating non-table objects
5.5.2 Updating table objects
Preparing data
Altering the table
Using the stored procedure altobj
Using a custom script
Page
5.5.3 Automating update using DB2 metadata with a Java application
Java sample application: Automating update
Comparing two database configurations
Building the dependency map
The big picture of the application
Page
5.5.4 Alternatives: DB2 tools
5.6 Samples overview
5.6.1 Scripts
5.6.2 Shell scripts
Page
254
c:>importdb.cmd
5.6.3 Java applications
Page
Page
Page
A
A.1 C/C++
260
Page
262
A.2 PHP
Example A-2 shows the application used to demonstrate the deployment of the DB2 PHP application.
A.3 Ruby
Example A-3 shows the application used to demonstrate the deployment of the DB2 PHP application.
264
A.4 Python
Example A-4 shows the application used to demonstrate the deployment of the DB2 Python application.
A.5 Perl
Example A-5 shows the application used to demonstrate the deployment of the DB2 Perl application.
266
B
Locating the Web material
Using the Web material
System requirements for downloading the Web material
How to use the Web material
Related publications
IBM Redbooks
Other publications
IBM - DB2 9.5
IBM - DB2 9
Page
Online resources
DB2
Linux
Other
How to get Redbooks
Help from IBM
Page
Index
Symbols
Numerics
A
B
D
E
F
G
H
I
K
L
M
N
O
Q
R
S
280
T
U
V
W
X
Page
Page
Page
INTERNATIONAL TECHNICAL SUPPORT ORGANIZATION
DB2 Deployment Guide
Back cover