You are on page 1of 28

DB2 Installation Procedure

For 9.5 FP7

Back Up Process
If you already have DB2 database products installed in the selected installation
path:

Save your current configuration.
1. Saving configuration information:
It is strongly advised that you save your settings for database and
database manager configuration parameters before DB2® server
migration. You can use configuration parameter settings to verify that
migration is complete, and to re-create instances and databases. In
addition, you can collect information from your DB2 servers about the
database system catalogs, DB2 registry variables settings, explain table
data, and diagnostic information that can help in problem determination if
you encounter any post-migration differences in the database manager
behavior or performance.
Prerequisite You must have SYSADM authority in order to execute all of
the following tasks, although some tasks require lesser authority privileges or
none.
Procedure: To save your DB2 server configuration and diagnostic information:
Run the db2support command to collect information from your DB2 servers.
This command allows you to collect information on the database system
catalog, database and database manager configuration parameters settings,
DB2 registry variables settings, explain table data, and diagnostic information
required by DB2 support in case of problems.
db2support output-directory -d database-name -cl 0
Command :

db2support /svsan –d INFADEV9 –cl 0

---Run above command for each database(INFADEV9, CBECMM91,
MET_COG, REP_COG, CBEC_MM, COG84, INFAREPO, MET_COG8,
COG102)
The -cl 0 option collects the database system catalog, database and database
manager configuration parameters settings, DB2 registry variables settings.

The information collected is stored on a compressed zip file in output
directory. A summary report in HTML format is included. You need to run this
command for all your databases.
It is important that you keep this zip file after you complete the migration for
several months. The information in the zip file can help in quickly resolving
any performance issues with the new release.
2. Package Backup
Save the information about all the packages for your applications
associated with each database. Use the following command to list
packages associated with your databases and redirect the command
output to a file:
db2 LIST PACKAGES FOR SCHEMA schema-name SHOW DETAIL >
/migration/sample_pckg.txt
The FOR SCHEMA clause allows you to list all packages for a specific schema,
if your application has several schemas you need to repeat this command for
each schema name or use FOR ALL clause.
Below commands will create the .cfg file in the directory where it will be
executed,so before executing it set the path of prompt.
Commands :
--LIST PACKAGES FOR ALL SHOW DETAIL>/SVSAN/package_info_INFADEV9.txt
--LIST PACKAGES FOR ALL SHOW DETAIL>/SVSAN/package_info_CBECMM91.txt
--LIST PACKAGES FOR ALL SHOW DETAIL>/SVSAN/package_info_MET_COG.txt
--LIST PACKAGES FOR ALL SHOW DETAIL>/SVSAN/package_info_REP_COG.txt
--LIST PACKAGES FOR ALL SHOW DETAIL>/SVSAN/package_info_CBEC_MM.txt
--LIST PACKAGES FOR ALL SHOW DETAIL>/SVSAN/package_info_COG84.txt
--LIST PACKAGES FOR ALL SHOW DETAIL>/SVSAN/package_info_INFAREPO.txt
--LIST PACKAGES FOR ALL SHOW DETAIL>/SVSAN/package_info_MET_COG8.txt
LIST PACKAGES FOR ALL SHOW DETAIL>/SVSAN/package_info_COG102.txt

The following example shows how to backup all external routines created using the default path in UNIX® operating systems: .cfg If you have multiple instances. Back up all your external routines. repeat this command for each instance. back up the audit configuration of your instances by issuing the following command: db2audit describe > audit_instance-name.3. Back up Audit Details: If you enabled the audit facility.

You can use the GET DATABASE MANAGER CONFIGURATION command to save your settings for database manager configuration parameters and redirect the command output to a file to save these settings for each instance: db2 GET DBM CFG > dbm_instname. Backup Routines Below commands will create the . If you have specified a full path that is not under the default routines path when you created your external routines in the database.so before executing it set the path of prompt.cfg file in the directory where it will be executed.cfg 4.cfg where instname is the instance name. 5. Backup Database manager configuration: The db2support command HTML report includes the database manager configuration parameter settings for the instance that owns the specified database.cfg 6. Backup database configuration parameter . Command: db2audit describe>audit_db2inst1. cp -R $INSTHOME/sqllib/function $INSTHOME/routine_backup Where INSTHOME is set to the home directory of the instance owner. you must ensure the existing libraries remain on the current location. db2 GET DBM CFG > dbm_db2inst1.so before executing it set the path of prompt.Below commands will create the .so before executing it set the path of prompt.cfg file in the directory where it will be executed.cfg file in the directory where it will be executed. Below commands will create the .

cfg db2 GET DB CFG FOR CBEC_MM db2 SHOW DETAIL > CBEC_MM. save the database configuration parameter settings for each database partition.The db2support command HTML report includes the database configuration parameter settings for the specified database.cfg db2 GET DB CFG FOR MET_COG db2 SHOW DETAIL > MET_COG. Database configuration parameters should be the same on each database partition in a partitioned database environment.cfg db2 GET DB CFG FOR CBECMM91 db2 SHOW DETAIL > CBECMM91. db2 GET DB CFG FOR INFADEV9 db2 SHOW DETAIL > INFADEV9. If they are not the same.cfg db2 GET DB CFG FOR COG84 . You can use the GET DATABASE CONFIGURATION command to save your settings for database configuration parameters and redirect the command output to a file to save these settings for each database: db2 GET DB CFG FOR database_alias SHOW DETAIL > db_database_alias.cfg db2 GET DB CFG FOR REP_COG db2 SHOW DETAIL > REP_COG.cfg where database_alias is the database alias and the SHOW DETAIL clause displays the values calculated by the database manager when configuration parameters are set to AUTOMATIC.

cfg 7.cfg db2 GET DB CFG FOR INFAREPO db2 SHOW DETAIL > INFAREPO.db2 SHOW DETAIL > COG84.db2 .db2 Command : db2look -d INFADEV9 -l -o INFADEV9_tbs.cfg db2 GET DB CFG FOR COG102 db2 SHOW DETAIL > COG102. you can use this command to save the DDL information for your databases and the statements to re-create your database objects: db2look -d sample -l -o sample_tbs.cfg db2 GET DB CFG FOR MET_COG8 db2 SHOW DETAIL > MET_COG8. However if you need additional information not present in the generated DDL file. Backup DDL information The db2support command generates a file with the output of the db2look command for the specified database.

txt 9.db2 db2look -d REP_COG -l -o REP_COG _tbs. You can use the db2set command to save your DB2 profile registry variables settings and redirect the command output to a file to save these settings: db2set -all > reg_instname. Backup: DB2 profile registry variables settings Optional: The db2support command HTML report includes the environment and registry variable settings for the instance that owns the specified database.db2 db2look -d CBEC_MM -l -o CBEC_MM _tbs. Backup: DB2 environment variables .db2 8.db2 db2look -d MET_COG8 -l -o MET_COG8_tbs.db2 db2look -d COG102 -l -o COG102_tbs. db2set -all > reg_db2inst1.db2 db2look -d INFAREPO -l -o INFAREPO _tbs.db2 db2look -d COG84 -l -o COG84_tbs.db2 db2look -d MET_COG -l -o MET_COG _tbs.txt When possible. use the output from the set command and run the db2set command to set these environment variables as registry variables in the DB2 profile registry.db2look -d CBECMM91 -l -o CBECMM91_tbs.

use the appropriate system command to list environment variables and their values.com/support/docview. on AIX® you can issue the following command: set |grep DB2 > env_instname.wss? rs=71&uid=swg21255607 To install the FP Procedure: 1. 4.One of the following browsers is required to view online help and to run First Steps (db2fs): a. Apply the appropriate DB2 database product license. Depending on the values of your kernel configuration parameters. you might need to modify some of them before you install the DB2 Version 9 client or server products. Check fix pack prerequisites. Kernel configuration considerations: A system restart is required if you update the kernel configuration parameters.4 and up b. 2.0 and up .txt Download FP7 at http://www-01.0 and up c. For example. Software considerations 12. Firefox 1. 3. The kernel configuration parameters are set in /etc/system.If you set DB2 environment variables. Fix Pack Pre – Requisite SYSTEM REQUIREMENTS: 10. If the kernel configuration parameters are modified. a reboot is necessary to make the changes to /etc/system effective. 5. Perform the necessary tasks prior to installing a fix pack. 11.ibm.txt set |grep DB2 > env_db2inst1. Choose a fix pack installation method and install the fix pack. Netscape 7. Perform the necessary tasks after installing the fix pack. Mozilla 1.

For a system running just DB2 and the DB2 GUI tools.gz file and the uncompressed installation image. However. a DB2 database system requires 256 MB of RAM. If you also plan to install a national language fix pack. To determine the space used by the existing DB2 database products. On UNIX.  For DB2 client support. Memory requirements At a minimum. On Windows®. be aware of the following:  DB2 products that run on HP-UX Version 11i for Itanium-based systems require 512 MB of RAM at a minimum. 1 GB of RAM is recommended for improved performance. Ensure that you have sufficient file system free space to download and extract the fix pack. compact. these memory requirements are for a base of five concurrent client connections.Disk requirements The disk space required for your product depends on the type of installation you choose and the type of file system you have. Remember to include disk space for required software and communication products. you might require significantly more space on FAT (File Allocation Table) drives with large cluster sizes than with NTFS (New Technology File System) drives. The DB2 ® Setup wizard provides dynamic size estimates based on the components selected during a typical. or custom installation. When determining memory requirements. 14. perform the command: du -k -s DB2DIR . you need to have a file system with one gigabyte of free space to contain the . a minimum of 512 MB of RAM is required. You will need an additional 16 MB of RAM per five client connections.tar. These requirements do not include any additional memory requirements for other software that is running on your system.13. you need up to two gigabytes of free space.

these memory requirements are for a base of five concurrent client connections. When determining memory requirements. However. you must also stop various DB2 processes. If you already have DB2® database products installed in the selected path.Get the Fi x pack: There must not be any spaces in the directory path where you plan to download and uncompress the fix pack. For a system running just DB2 and the DB2 GUI tools. For example. you must first download and uncompress the fix pack.  For DB2 client support. To uncompress a fix pack installation image. the installation will fail. make sure your directory path resembles the following: /home/DB2FixPack/FP1/. Follow the Steps” At a minimum.tar.Prior Installing a Fix pack: In order to install a fix pack. Ensure that you have sufficient file system free space to download and extract the fix pack. Before you can install a fix pack. perform the following steps: . be aware of the following:  DB2 products that run on HP-UX Version 11i for Itanium-based systems require 512 MB of RAM at a minimum.gz file and the uncompressed installation image. a DB2 database system requires 256 MB of RAM.Uncompressing the fix pack: All fix pack installation images on the FTP site are compressed using gzip. you must copy the image to a temporary directory and use gunzip and tar to extract the fix pack installation image. You will need an additional 16 MB of RAM per five client connections. a minimum of 512 MB of RAM is required. It should not resemble the following: /home/DB2 FixPack/FP1/ 16. These requirements do not include any additional memory requirements for other software that is running on your system. you need to have a file system with one gigabyte of free space to contain the . 1 GB of RAM is recommended for improved performance. you need up to two gigabytes of free space. If you also plan to install a national language fix pack. On UNIX. If there are spaces in the directory path. To determine the space used by the existing DB2 database products. perform the command: 15.

Enter the following command to uncompress the file: gunzip -c filename.gz | tar -xvf – 17.To stop all DB2 processes. 3. Stopping all DB2 processes (UNIX®) Before installing a fix pack. gunzip -c v9_7fp7_hpipf64_universal_fixpack.tar. 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.gz | tar -xvf where filename is the fix pack you are installing. Command: sudo su 2. 18. Copy the gun zipped image to a temporary location. cd universal cd /sv/install/IBM/db2/V9. if there are DB2 ® database products installed in the selected installation path. If you have multiple DB2 copies. 2. you must stop all of the DB2 processes.7/instance/db2ilist Run below commands before moving ahead. Change to the directory where you copied the image. Log on as root. you need to stop only the DB2 processes that are associated with the copy that you are updating. Command: /sv/install/IBM/db2/V9.7/instance/db2ilist Run the following commands for each instance in the DB2 copy: su db2inst1 /home/db2inst1/sqllib/db2profile db2 force applications all . perform the following steps: 1.tar.1.

stop the DAS: su . $HOME/das/dasprofile db2admin stop exit where aname represents the DAS owner name. Disable the Fault Monitor Coordinator (FMC) by issuing the command: cd /var/data/universal db2fmcu -d Note: Since there` is only one Fault Monitor Coordinator. this step affects all DB2 copies on the system. Disable the fault monitor processes:      Log on as root. the Fault Monitor Coordinator is reset so that the system's inittab file is again configured to include the FMC. If the DB2 Administration Server (DAS) belongs to the DB2 copy that you are updating. issue the command: db2fm -i db2inst1 –D where iname represents the instance owner name.db2 terminate db2stop db2licd -end 3. where DB2DIR is the location where the DB2 copy is installed. 4. sudo su Locate where the db2fmcu command runs from by issuing the command: ps -ef | grep db2fmcu For example. After you apply the fix pack. If you do not want to use the FMC. on AIX the db2fmcu command is run from DB2DIR/bin directory. The command must be performed once for each instance.aname . Switch to the directory indicated by the ps command. Note: Since there can only be one DAS on the system. this step affects all other DB2 copies on the system. . you must reissue the above command after you have applied the fix pack. To stop the Fault Monitor Daemon.

Change to the directory that contains the fix pack image. 3. To install a fix pack: 1. sudo su 2. Log on as root. For example./installFixPack -b DB2DIR . . Launch the installation by issuing the installFixPack command. ./installFixPack -b /sv/install/IBM/db2/V9.Choose a fix pack installation method and install the fix pack 19.7 where DB2DIR is the location of the DB2 products that you want to update.

.

.

.

**********************After Installation ********************************************** Perform the necessary tasks after installing the fix pack .

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. If you installed the fix pack to create a new installation. restart the DB2 Administration Server. migrate the XSR objects and launch the djxlink command. Perform the following steps: a. you might also need to update the DB2 instances. you must bind the database utilities and the DB2® CLI bind files. update the system catalog objects. Perform the following actions: 1. cd /sv/install/IBM/db2/V9. sudo su b.7/instance/db2ilist exit db2start db2 terminate . Update instances to use the new level of DB2.After installing a fix pack. If you have multiple DB2 copies. restart the DB2 instances. Log on as root. This task is mandatory if you installed a fix pack to update an existing installation. Depending on your database products and the fix pack installation method used. 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. this task is not required.

Restart db2 using both instances db2inst1 & db2inst2 .

It does not overwrite the userprofile and usercshrc scripts. issue the command: DB2DIR/instance/db2iupdt iname . This action is required because the db2iupdt command overwrites the db2profile and db2cshrc scripts. For each instance. d. respectively. 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.c.

Restart the instances and the DAS. perform the following actions: a. run the db2xdbmig command for each of those databases. For each database. e. since there are no existing databases. this step is not required. Optional: Update the system catalog objects in your databases to support the fix pack. If this DB2 copy is now running at a more recent fix pack level than all of the other DB2 copies.1 GA or Fix Pack 1 copy and you have decomposition-enabled XML schemas in any of the databases. This task is not necessary if you installed the fix pack to create a new installation. b.1 Fix Pack 2 or later on a DB2 Version 9. If you installed the fix pack to create a new installation. 2. issue the command: DB2DIR/instance/dasupdt where DB2DIR is the location where the DB2 copy is installed. --Not required in our case.1 Fix Pack 2 or later. issue the command: db2updv9 -d dbname where dbname represents the name of the database. this task is strongly recommended if you want to use capabilities specific to the fix pack. 3. For DB2 Version 9. For each instance in the DB2 copy. --Not applied 4. consider updating the DAS to belong to this DB2 copy. --Not required in our case. . If you are installing DB2 Version 9.where iname represents the instance name and DB2DIR represents the location where the DB2 copy is installed. If the DB2 Administration Server (DAS) belongs to the DB2 copy where you installed the fix pack. This step is required if you installed a fix pack to update an existing installation. Log in as the instance owner.

Perform the BIND commands from a DB2 Client (or other DB2 database product) that is running on the same operating system and the same DB2 version and fix pack level as the Runtime Client. log in as the DAS owner and run the db2admin start command.7/bnd/@db2cli. such as INSTHOME\sqllib\bnd where INSTHOME represents the home directory of the DB2 instance. b. 5. Log in as the instance owner. Ensure that you have the necessary authority to perform the BIND command. REORG. Issue the command db2start. Note: The Runtime Client cannot be used to bind the database utilities and DB2 CLI bind files.7/bnd/db2schema. Bind the bind files: After a fix pack is installed. the Command Line Processor) and the DB2® CLI bind files. UNIX.To restart an instance: a. perform the following commands once for each database: db2 CONNECT TO INFADEV9 user db2inst1 using Admin#123 db2 BIND /sv/install/IBM/db2/V9. EXPORT.lst BLOCKING ALL GRANT PUBLIC ACTION ADD db2 terminate where dbname represents the name of a database to which the files should be bound. db2ubind. Different subsets of bind files need to be bound for DB2 Database for Linux. To restart the administration server.7/bnd/@db2ubind.lst and . To bind the bind files: If you installed the fix pack on DB2 database products that have existing databases. and Windows and host or iSeries® database servers.bnd BLOCKING ALL GRANT PUBLIC SQLERROR CONTINUE db2 BIND /sv/install/IBM/db2/V9. you must bind the database utilities (IMPORT. and where path is the full path name of the directory where the bind files are located.lst BLOCKING ALL GRANT PUBLIC ACTION ADD db2 BIND /sv/install/IBM/db2/V9. Repeat for each instance.

7/bnd/db2schema. This is expected. Packages that are already bound will return an SQL0719N error. db2 terminate db2 CONNECT TO CBECMM91 user db2inst1 using Admin#123 db2 BIND /sv/install/IBM/db2/V9.db2cli.bnd BLOCKING ALL GRANT PUBLIC SQLERROR CONTINUE .lst contain lists of required bind files used by DB2 database products.

lst BLOCKING ALL GRANT PUBLIC ACTION ADD db2 BIND /sv/install/IBM/db2/V9.lst BLOCKING ALL GRANT PUBLIC ACTION ADD db2 terminate db2 terminate db2 CONNECT TO REP_COG user db2inst1 using Admin#123 db2 BIND /sv/install/IBM/db2/V9.7/bnd/db2schema.7/bnd/@db2cli.lst BLOCKING ALL GRANT PUBLIC ACTION ADD db2 terminate db2 terminate db2 CONNECT TO MET_COG user db2inst1 using Admin#123 db2 BIND /sv/install/IBM/db2/V9.7/bnd/@db2ubind.db2 BIND /sv/install/IBM/db2/V9.7/bnd/db2schema.lst BLOCKING ALL GRANT PUBLIC ACTION ADD db2 BIND /sv/install/IBM/db2/V9.7/bnd/@db2ubind.7/bnd/@db2cli.bnd BLOCKING ALL GRANT PUBLIC SQLERROR CONTINUE db2 BIND /sv/install/IBM/db2/V9.7/bnd/@db2ubind.lst BLOCKING ALL GRANT PUBLIC ACTION ADD db2 terminate .bnd BLOCKING ALL GRANT PUBLIC SQLERROR CONTINUE db2 BIND /sv/install/IBM/db2/V9.lst BLOCKING ALL GRANT PUBLIC ACTION ADD db2 BIND /sv/install/IBM/db2/V9.7/bnd/@db2cli.

lst BLOCKING ALL GRANT PUBLIC ACTION ADD db2 terminate db2 terminate db2 CONNECT TO COG84 user db2inst1 using Admin#123 db2 BIND /sv/install/IBM/db2/V9.db2 terminate db2 CONNECT TO CBEC_MM user db2inst1 using Admin#123 db2 BIND /sv/install/IBM/db2/V9.7/bnd/@db2ubind.7/bnd/db2schema.bnd BLOCKING ALL GRANT PUBLIC SQLERROR CONTINUE db2 BIND /sv/install/IBM/db2/V9.7/bnd/@db2cli.lst BLOCKING ALL GRANT PUBLIC ACTION ADD db2 BIND /sv/install/IBM/db2/V9.7/bnd/@db2cli.lst BLOCKING ALL GRANT PUBLIC ACTION ADD db2 BIND /sv/install/IBM/db2/V9.lst BLOCKING ALL GRANT PUBLIC ACTION ADD db2 terminate db2 terminate db2 CONNECT TO INFAREPO user db2inst1 using Admin#123 .7/bnd/db2schema.bnd BLOCKING ALL GRANT PUBLIC SQLERROR CONTINUE db2 BIND /sv/install/IBM/db2/V9.7/bnd/@db2ubind.

lst BLOCKING ALL GRANT PUBLIC ACTION ADD db2 BIND /sv/install/IBM/db2/V9.bnd BLOCKING ALL GRANT PUBLIC SQLERROR CONTINUE db2 BIND /sv/install/IBM/db2/V9.7/bnd/db2schema.7/bnd/@db2cli.7/bnd/@db2cli.7/bnd/db2schema.bnd BLOCKING ALL GRANT PUBLIC SQLERROR CONTINUE db2 BIND /sv/install/IBM/db2/V9.db2 BIND /sv/install/IBM/db2/V9.bnd BLOCKING ALL GRANT PUBLIC SQLERROR CONTINUE db2 BIND /sv/install/IBM/db2/V9.lst BLOCKING ALL GRANT PUBLIC ACTION ADD db2 BIND /sv/install/IBM/db2/V9.lst BLOCKING ALL GRANT PUBLIC ACTION ADD .lst BLOCKING ALL GRANT PUBLIC ACTION ADD db2 terminate db2 terminate db2 CONNECT TO MET_COG8 user db2inst1 using Admin#123 db2 BIND /sv/install/IBM/db2/V9.7/bnd/db2schema.7/bnd/@db2ubind.7/bnd/@db2ubind.7/bnd/@db2ubind.lst BLOCKING ALL GRANT PUBLIC ACTION ADD db2 terminate db2 terminate db2 CONNECT TO COG102 user db2inst1 using Admin#123 db2 BIND /sv/install/IBM/db2/V9.

manually rebind all packages. rebind the packages by running the REBIND or db2rbind command. issue the db2rbind command: db2rbind dbname -l logfile all where dbname represents the name of a database whose packages are to be revalidated. After you install a fix pack. db2rbind INFADEV9 -l INFADEV9_rebindlog all db2rbind CBECMM91 -l CBECMM91_rebindlog all db2rbind MET_COG -l MET_COG_rebindlog all db2rbind REP_COG -l REP_COG_rebindlog all db2rbind CBEC_MM -l CBEC_MM_rebindlog all db2rbind COG84 -l COG84_rebindlog all db2rbind INFAREPO -l INFAREPO_rebindlog all db2rbind MET_COG8 -l MET_COG8_rebindlog all db2rbind COG102 -l COG102_rebindlog all . Packages marked as invalid are implicitly rebound the first time an application uses them. some packages are marked as invalid. For example.Rebind : Optional: If you installed the fix pack on DB2 database products that have existing databases. To eliminate this overhead and to ensure that the rebind is successful.7/bnd/@db2cli. and where logfile is the name of the file to be used for recording errors during the package revalidation procedure.lst BLOCKING ALL GRANT PUBLIC ACTION ADD db2 terminate 20.db2 BIND /sv/install/IBM/db2/V9.

Screenshot of Updated version of DB2 .