Friday, February 11, 2011

Applying fix packs DB2 9.5

It is recommended that you keep your DB2® database environment running at the latest fix pack level to ensure problem-free operation. To install a fix pack successfully, perform all of the necessary tasks pre- and post-installation tasks.

About this task
A DB2 fix pack contains updates and fixes for problems (Authorized Program Analysis Reports, or "APARs") found during testing at IBM, as well as fixes for problems reported by customers. The APARLIST.TXT file describes the fixes contained in each fix pack and it is available for download at http://www-01.ibm.com/support/docview.wss?rs=71&uid=swg21255607.
Fix packs are cumulative. This means that the latest fix pack for any given version of DB2 database contains all of the updates from previous fix packs for the same version of DB2.
There are two types of fix pack images:
  • A fix pack for each individual DB2 database product.
    Use this type of fix pack if you only have a single DB2 database product installed and you want to upgrade it to a new fix pack level, or if you want to install a DB2 database product at a particular fix pack level.
  • A universal fix pack (Linux® or UNIX® only). A universal fix pack services installations where more than one DB2 database product has been installed.
    For Windows® operating systems, if you have more than one DB2 database product installed in a single DB2 copy, you must download and uncompress all of the corresponding product-specific fix packs before starting the fix pack installation process.
If national languages have been installed on Linux or UNIX operating systems, you also require a separate national language fix pack. The national language fix pack can not be installed alone. A universal or product-specific fix pack must be applied at the same time and they must both be at the same fix pack level. For example, if you are applying a universal fix pack to non-English DB2 database products on Linux or UNIX, you must apply both the universal fix pack and the national language fix pack to update the DB2 database products.
Note:
  • Since the DB2 Client fix pack is contained within the DB2 database server fix packs (namely the fix packs for Enterprise Server Edition, Workgroup Server Edition, Express® Edition, Personal Edition and Connect Enterprise Edition), you can use a DB2 database server fix pack to upgrade DB2 Clients.
If you have multiple DB2 copies on the same system, those copies can be at different version and fix pack levels. If you want to apply a fix pack to one or more DB2 copies, you must install the fix pack on those DB2 copies one by one.
When installing a fix pack on a multi-partition database system, the system must be offline and all computers participating in the instance must be upgraded to the same fix pack level.

Procedure
To install a fix pack:
  1. Check fix pack prerequisites.
  2. Perform the necessary tasks prior to installing a fix pack.
  3. Choose a fix pack installation method and install the fix pack.
  4. Perform the necessary tasks after installing the fix pack.
  5. Apply the appropriate DB2 database product license.
1. Checking fix pack prerequisites
Ensure that you meet all of the software, hardware and operating system prerequisites before you download a fix pack.
Before downloading a fix pack, perform the following steps:
  1. Ensure that your system meets all of the system requirements. Refer to: r0025127.htm
    This action prevents technical problems that might occur after the installation and configuration of the fix pack.
  2. For 64-bit DB2® for Linux on iSeries® and pSeries®, ensure that the IBM® XL C/C++ Compiler run time is installed.
    Download and install the IBM XL C/C++ Advanced Edition V7.0 for Linux Run-Time Environment Component. Refer to: http://www.ibm.com/support/docview.wss?uid=swg24007906
  3. For AIX®, if DB2 database products already exist on the system and the Trusted Computing Base (TCB) is enabled, ensure it is in a consistent state.
    Ensure that the TCB is in a consistent state for any file or directory related to a DB2 instance, the DB2 Administration Server, and installed DB2 files. The TCB can be in an inconsistent state if, for example, DB2 instances were removed without using the db2idrop command.
    To check the TCB state, enter the following command as root:
    tcbck -n ALL
    Refer to AIX documentation for details regarding the Trusted Computing Base.
  4. Review the Flashes and open Authorized Problem Analysis Reports (APARs) on the DB2 for Linux, UNIX and Windows product support Web site: http://www.ibm.com/software/data/db2/support/db2_9/
    Open APARs describe defects that are not yet addressed in a fix pack, and they might contain a workaround that will impact your use of the database system. For a list of open DB2 for Linux, UNIX and Windows APARs, refer to: http://www.ibm.com/support/docview.wss?rs=71&uid=swg21255155
  5. Ensure that you have sufficient file system free space to download and extract the fix pack.
    On Linux and UNIX, you need to have a file system with one gigabyte of free space to contain the .tar.gz file and the uncompressed installation image. If you also plan to install a national language fix pack, you need up to two gigabytes of free space.
  6. Ensure that you have the free space required to install the fix pack.
    The free space must be available in the location of the DB2 copy that you are updating or in the location where you plan to create a new installation of DB2.
    • On Windows, the space required to install the fix pack is equal to the space required for the DB2 Version 9.1 for Linux, UNIX and Windows general availability (GA) installation. Ensure the space required is available in the location of the DB2 copy that you are updating or in the location where you plan to create a new installation of DB2. Refer to Disk and memory requirements.
    • On Linux and UNIX:
      • If you do not already have DB2 installed and you are using the fix pack to create a new installation, refer to Disk and memory requirements.
      • If you already have DB2 installed, the space required to install the fix pack is slightly greater than the space consumed by the existing DB2 database products. This space is only required temporarily during the fix pack installation process.
        To determine the space used by the existing DB2 database products, perform the command:
        du -k -s DB2DIR
        where DB2DIR represents the location where the DB2 database product is installed.
  7. If you already have a DB2 database product installed and have obtained special fixes, contact IBM support to determine whether you need an updated version of the fixes before you install a fix pack.
    This helps to ensure that your system is in a consistent state and that no special fixes are lost.
  8. Optional: Review the summary of "what's new" in the fix pack. This information is located under Product Overviews.
Once you have ensured that you meet all of these prerequisites, complete the remainder of the necessary tasks prior to installing a fix pack.

2. Prior to installing a fix pack
In order to install a fix pack, you must first download and uncompress the fix pack. If you already have DB2® database products installed in the selected path, you must also stop various DB2 processes.
If you have not already done so, check the fix pack prerequisites.
Before installing a fix pack, perform the following steps:
  1. Get the fix pack. On Linux® and UNIX®, there must not be any spaces in the directory path where you plan to download and uncompress the fix pack. If there are spaces in the directory path, the installation will fail. For example, make sure your directory path resembles the following: /home/DB2FixPack/FP1/. It should not resemble the following: /home/DB2 FixPack/FP1/.
  2. Uncompress the fix pack:
  3. If you already have DB2 database products installed in the selected installation path:
Before installing a fix pack, if there are DB2® database products installed in the selected installation path, you must stop all of the DB2 processes. If you have multiple DB2 copies, you need to stop only the DB2 processes that are associated with the copy that you are updating.
To stop all DB2 processes, perform the following steps:
  1. Log on as root.
  2. Determine which instances are associated with the DB2 copy by issuing the command:
    DB2DIR/instance/db2ilist
    where DB2DIR represents the location where the DB2 copy is installed.
  3. Run the following commands for each instance in the DB2 copy:
    su - iname
    . $HOME/sqllib/db2profile
    db2 force applications all
    db2 terminate
    db2stop
    db2licd -end      # run at each physical partition
    exit
    where iname represents the instance owner name. If you are an HACMP™ user, you must use the ha_db2stop command to stop DB2 instead of the db2stop command. If you use the db2stop command instead of the ha_db2stop command, you will trigger a failure event.
  4. If the DB2 Administration Server (DAS) belongs to the DB2 copy that you are updating, stop the DAS:
    su - aname
    . $HOME/das/dasprofile
    db2admin stop
    exit
    where aname represents the DAS owner name.
    Note: Since there can only be one DAS on the system, this step affects all other DB2 copies on the system.
  5. (Optional) On AIX®, run slibclean to unload unused shared libraries from memory before installation:
    /usr/sbin/slibclean
  6. Disable the fault monitor processes:
    1. Log on as root.
    2. Locate where the db2fmcu command runs from by issuing the command:
      ps -ef
      For example, on AIX the db2fmcu command is run from DB2DIR/bin directory, where DB2DIR is the location where the DB2 copy is installed.
    3. Switch to the directory indicated by the ps command.
    4. Disable the Fault Monitor Coordinator (FMC) by issuing the command: db2fmcu -d
      Note:
      1. Since there is only one Fault Monitor Coordinator, this step affects all DB2 copies on the system.
      2. After you apply the fix pack, the Fault Monitor Coordinator is reset so that the system's inittab file is again configured to include the FMC. If you do not want to use the FMC, you must reissue the above command after you have applied the fix pack.
    5. To stop the Fault Monitor Daemon, issue the command:
      db2fm -i iname -D
      where iname represents the instance owner name. The command must be performed once for each instance.
  7. If you are installing DB2 Version 9 Fix Pack 1 or 2, disable the auto-start of an instance using the db2iauto command:
    db2iauto -off <instance name>
    If desired, re-enable instance auto start after installation:
    db2iauto -on <instance name>
    If you are installing DB2 Version 9 Fix Pack 3 and the fault monitor coordinator is enabled at the beginning of the fix pack install, disable the auto-start as described in the previous example. If the fault monitor coordinator is not enabled at the beginning of the fix pack install, disabling the auto-start of an instance is not required.
  8. Ensure all DB2 interprocess communications are cleaned for the instance to be updated. As the instance owner, run the following command at each physical partition:
    $HOME/sqllib/bin/ipclean
Related information

4. Installing a fix pack to update existing DB2 database products (Linux® and UNIX®)

Follow these instructions if a DB2® database product is already installed and you want to apply a new fix pack level. The installFixPack command is used to install the fix pack.
  • Ensure that you perform all of the necessary tasks prior to installing a fix pack.
  • If there is more than one DB2 database product installed in the selected path, you must use a universal fix pack image to install the fix pack.
  • If you want to update an existing DB2 database product that has national languages installed, you must obtain the national language fix pack in addition to either an individual fix pack or a universal fix pack. National language fix packs can not be used alone.For example, to install a fix pack on a DB2 Version 9.1 database product with non-English support installed, download the DB2 database product-specific fix pack image (or the universal fix pack image) and the national language fix pack. Then run installFixPack from the DB2 database product-specific fix pack image (or the universal fix pack image).
To install a fix pack:
  1. Log on as root.
  2. Change to the directory that contains the fix pack image.
  3. Launch the installation by issuing the installFixPack command. For example,
    ./installFixPack -b DB2DIR
    where DB2DIR is the location of the DB2 products that you want to update.
Perform the necessary post-installation tasks for fix packs to complete the installation.
Related information

5. Post-installation tasks for fix packs (Linux and UNIX)

After installing a fix pack, you must bind the database utilities and the DB2® CLI bind files. Depending on your database products and the fix pack installation method used, you might also need to update the DB2 instances, update the system catalog objects, restart the DB2 instances, restart the DB2 Administration Server, migrate the XSR objects and launch the djxlink command.
Perform the following actions:
  1. If you have WebSphere® Federation Server installed, run the djxlink command. Perform the following tasks after installing the fix pack and before running db2iupdt:
    1. Log on as root.
    2. Remove or rename the file djxlink.out, which is located in the DB2DIR/lib directory, where DB2DIR is the DB2 installation directory.
    3. Ensure that all of the appropriate variables are set, either in your current environment or in the db2dj.ini file. For example, if you are using a federated server to connect to an Oracle data source, set the environment variable ORACLE_HOME to the Oracle home directory.
    4. Run the command:
      djxlink
  2. Update instances to use the new level of DB2. This task is mandatory if you installed a fix pack to update an existing installation. If you installed the fix pack to create a new installation, this task is not required. If you have multiple DB2 copies, update the instances in the DB2 copy where you installed the fix pack. All instances in the DB2 copy must be updated after a fix pack is installed.
    Perform the following steps:
    1. Log on as root.
    2. Determine which instances are associated with the DB2 copy by issuing the command:
      DB2DIR/instance/db2ilist
      where DB2DIR represents the location where the DB2 copy is installed.
    3. If you made any changes to the db2profile or db2cshrc scripts, either back up the scripts or copy the changes into the userprofile and usercshrc scripts, respectively. This action is required because the db2iupdt command overwrites the db2profile and db2cshrc scripts. It does not overwrite the userprofile and usercshrc scripts.
    4. For each instance, issue the command:
      DB2DIR/instance/db2iupdt iname
      where iname represents the instance name and DB2DIR represents the location where the DB2 copy is installed.
    5. If the DB2 Administration Server (DAS) belongs to the DB2 copy where you installed the fix pack, issue the command:
      DB2DIR/instance/dasupdt
      where DB2DIR is the location where the DB2 copy is installed. If this DB2 copy is now running at a more recent fix pack level than all of the other DB2 copies, consider updating the DAS to belong to this DB2 copy.
  3. If you are installing DB2 Version 9.1 Fix Pack 2 or later on a DB2 Version 9.1 GA or Fix Pack 1 copy and you have decomposition-enabled XML schemas in any of the databases, run the db2xdbmig command for each of those databases.
  4. Optional: Update the system catalog objects in your databases to support the fix pack. For DB2 Version 9.1 Fix Pack 2 or later, this task is strongly recommended if you want to use capabilities specific to the fix pack. This task is not necessary if you installed the fix pack to create a new installation, since there are no existing databases.
    For each instance in the DB2 copy, perform the following actions:
    1. Log in as the instance owner.
    2. For each database, issue the command:
      db2updv9 -d dbname  
      where dbname represents the name of the database.
  5. Restart the instances and the DAS. This step is required if you installed a fix pack to update an existing installation. If you installed the fix pack to create a new installation, this step is not required.
    To restart an instance:
    1. Log in as the instance owner.
    2. Issue the command db2start.
    Repeat for each instance.
    To restart the administration server, log in as the DAS owner and run the db2admin start command.
  6. Bind the bind files
  7. Optional: Recompile applications. To take advantage of any changes to the files linked to in the application, recompiling applications is recommended.
Once you have completed these tasks, the fix pack installation and configuration is complete.

Source: IBM

No comments:

Post a Comment