How to use db2iprune
--------------------

db2iprune is a command line utility that you can use to reduce the size of your DB2 Windows product installation image. 
This tool is useful for large-scale deployments of DB2, as well as for embedding DB2 within an application. It consists 
of an input file and a db2iprune executable. The input file, or ".prn" file, contains a full list of removable 
components and is used to indicate which features and languages you would like removed from the installation image. 
The db2iprune executable (db2iprune.exe) removes the cabinet (.cab) files associated with those features and languages. 
The result is a new, smaller DB2 installation image that can be installed using the regular DB2 installation methods.

To use db2iprune:


1. Open the input file, or ".prn" file, that is located in the db2iprune directory, and uncomment all features and 
   languages that you want removed from the DB2 installation image. Comments are denoted by an asterisk (*). The 
   db2iprune input file contains 3 keywords: PROD, LANG, and COMP.

   - The PROD keyword identifies the DB2 installation image to be pruned. This keyword is required and should not be 
     modified.

   - The LANG keyword is used to specify which language(s) to remove from the DB2 installation image. To remove the 
     .cab files for a language, as well as the doc files in the installation image for this language, simply 
     uncomment the equivalent LANG keyword.

   - The COMP keyword represents which feature(s) to remove from the DB2 installation image. To remove the .cab 
     files for a feature, simply uncomment the equivalent COMP keyword.  
            
   You may uncomment several COMP or LANG keywords in the same input file to remove several features or langauges. 
   The db2iprune input file behaves differently from the DB2 response files (used for silent installations). 
   The DB2 response file is used to specify components that you want to install, while the db2iprune input file is used 
   to specify components that you want REMOVED from the image and hence cannot be uninstalled.


2. From the command line, execute db2iprune.exe using the following syntax:

   db2iprune.exe -r <input file path> -p <root directory path> -o <destination directory path>

   - The parameter following the "-r" switch determines the full path to the db2iprune input file. 
   
   - The parameter following the "-p" switch determines the full path to the root directory of the source image.  
     This directory contains setup.exe, and is also the root directory of the DB2 installation CD.
     
   - The parameter following the "-o" switch determines the full path to where the new DB2 pruned image is copied.
     Make sure that you have write access to this directory.

   For example, if you are pruning a DB2 Run-Time Client image where the input file is located in c:\db2rtcl.prn, 
   the DB2 setup.exe file is located in d:\, and you want your pruned DB2 Run-Time Client image to be copied to the
   e:\compact_rtcl directory, you would enter the following command at the command prompt:
  
   db2iprune.exe -r c:\db2rtcl.prn -p d:\ -o e:\compact_rtcl


3.  Install and maintain the pruned DB2 installation image:

    You can use any of the regular DB2 installation methods to install and maintain a pruned DB2 installation 
    image:

    DB2 Setup Wizard installation:
    
    - For a TYPICAL install, the regular TYPICAL components for that product are installed (minus the components 
      removed by db2iprune).
      
    - For a COMPACT install, the regular COMPACT components for that product are installed (minus the components 
      removed by db2iprune).
      
    - For a CUSTOM install, only the remaining components are displayed in the feature selection panel. 
      The components removed by db2iprune are not displayed as options to install. However, the removed languages 
      will still be displayed in the language selection panel. Therefore, ensure that you do not select a language that 
      you have removed from the image using db2iprune. If you select a language that you have removed, you will receive 
      an error message. 

    Response file installation:
    
    If you plan to use a response file for an unattended installation, ensure that you specify only the languages 
    and features available in the DB2 pruned installation image. If you select a component that has been removed 
    by db2iprune, you will get an error message.

    FixPak installation:
    
    Since Windows DB2 FixPaks are full installation images, the db2iprune utility can be used with 
    FixPak images as well. The FixPak application process is the same for full and pruned images. When the DB2 
    FixPak is installed it detects and updates only the components that were installed using db2iprune and ignores 
    any components that are not installed. Note: if db2iprune is used with a FixPak image, ensure that the FixPak 
    image contains all of the components that were initially installed. If the FixPak image does not contain all the 
    installed components, you will receive an error about missing .cab files when the FixPak application is 
    attempted.
