74 DB2 Deployment Guide
The general procedure for deploying multiple DB2 servers is as follows:
1. Create a response file:
Modify a sample response file or manually create one.
Use the DB2 Setup wizard to generate a response file.
Use the response file generator (db2rspgn).
2. If the response file was not created using the db2rspgn tool and if you wish to
include a database profile in your deployment, generate a DB2 profile using
the db2cfexp tool and include the DB2.CLIENT_IMPORT_PROFILE keyword
with the configuration profile name.
3. Place the DB2 install image on a share drive or a file server that is accessible
to all target systems.
4. Ensure that the proper license files are acquired and placed in the db2\license
directory of the install image.
5. Create a deployment script that executes the setup using the –u option with
the response file.
As mentioned in the previous section, the DB2 server product install image
should be placed on a file server that is accessible to all systems to which
installation will take place. The Samba file system or any network accessible
drive is ideal for DB2 server deployment in Windows. It is prudent to make this
centralized file server permanently available (as read-only) to ensure proper
future maintenance (for example, repair).
The deployment scripts for response file installation on the Windows platform
can be written in any language including Perl, Java, C, or batch files.
In Example 2-25, we have a batch file called DB2Deploy.bat to perform DB2
server installation on Windows. This batch file maps the DB2 install image
location to the local drive z using user ID somebody and password password.
Example 2-25 Windows batch file deployment script (DB2Deploy.bat)
Net use z: \\9.43.86.84\Software\DB2_server\Win\ESE\ESE\image /user:somebody
password
z:\setup /U Z:\PROD_ESE.rsp
echo %ERRORLEVEL%
Net use z: /DELETE
You can modify this batch script to take in the user ID and password as
parameters by changing the first line to:
Net use z: \\9.43.86.84\Software\DB2_server\Win\ESE\ESE\image /user:%1 %2