I. Preparations before installation
First, to install DB2 on Windows, create a db2admin account, add the account to the Administrator group, and grant the account necessary permissions. Second, DB2 installation source can view the IBM China (http://www.ibm.com/cn/) site obtained.
In addition, this article describes how to install DB2 using a convenient and responsive file method, which makes it easy to deploy DB2 UDB Express, it also allows you to embed DB2 installation in your own applications.
Ii. Installation
DB2 response file installation can be embedded in the background Installation Process of the existing installer, which is transparent to end users.
Step 1: generate a response file. When you use the interactive installation utility to install DB2, you are prompted to select the installation and provide necessary configuration data before the installation starts. The response file only contains the installation options and configuration data, which are ready for Embedded use. You can use three methods to generate a response file:
• Use DB2 Setup Wizard
• Use the DB2 response file generator utility (Windows only)
• Manually generate a response File
In addition, the current response file is available. The Windows-based installer response file is in the "/DB2/Windows/samples/db2exp. RSP" path after downloading and unzipping. Sample image of the response file:
1. Start DB2 setup wizardinstallation (setup.exe) in the unzipped root directory and enter the "installation type" window. Keep the default option "click" Next ":
2. In the following window, you can choose to save all options in the response file or perform installation, such:
After the DB2 Setup Wizard process is complete, it is saved as the DB2 response file we generated. You can also select the path and file name for the generated response file.
Tip: You can manually create a response file because it is an ASCII text file. Of course, this requires a deep understanding of the response file. If you are not familiar with this aspect, we recommend that you use the sample response file.
Step 2: Install the response File
After the response file is generated in the previous step, the installation is simple. Use the same executable file used in Gui installation. To verify this, you must provide the correct response file name instead of entering the command or double-hitting setup.exe. You can also specify other options (such as the path and name of the log file) during installation ). It is related to the running of setup.exe parameters in the prompt:
After the installation program is started, it will run in the background and there will be no graphical interface for DB2 installation. When DB2 is installed in your own installer, it is like a part of the installation process. After the installation is complete, the DB2 installation process returns a return code to your program. Based on this return code, we can determine whether the installation is successful. Are some major return codes:
OK. After the installation is complete, you can find the DB2 Program Group in "start"-"program:
Step 3: Create a database
The simplest way to create a database is to manually add the database part to the response file. Of course, you will be prompted to create it at the end of the previous installation process. Is the database part included in the sample response file:
Summary:
You can install DB2 transparently in the installation program by using the DB2 response file. It does not require user input during the installation process, and it provides detailed and timely installation progress information through the log file. Installing with response files is good for executing large-scale DB2 deployment or embedding DB2 in application installation.
Appendix 1: uninstall DB2 on Windows (preferably at the doscommand prompt)
1. Uninstall the database
2. Disconnect all applications
3. Stop all DB2 processes and services
4. Delete DB2 Products
Appendix 2: DB2 technical reference website:
Http://www.ibm.com/software/data/developer
Http://www.db2mag.com
Http://www.ibm.com/software/data/education.html