Saturday, February 26, 2011

Creating the Instance using db2icrt

Only one instance can be created under a user name. db2icrt command is not available for a non-root installation of DB2 database products on Linux and UNIX operating systems.

1) Login in as root. If you are using the su command to become the root user ensure to issue the su command with the '-' option. This sets the environment as if you had logged in to the system using the "login" command.

2) Creating an instance for the user ID db2v97 on a client machine.

DB2DIR/instance/db2icrt db2v97 (where DB2DIR is the install location)

Install path in this example is "/opt/ibm/db2/V9.7". Now ran the following command "instance" directory under the install path.

./db2icrt db2v97
DBI1070I  Program db2icrt completed successfully.

3) Creating an instance for the user ID db2v97 and db2fenc on a server machine.

 ./db2icrt -u db2fenc db2v97
DBI1070I  Program db2icrt completed successfully.

The -u option specifies the fenced user ID. It is mandatory to create a fence ID while creating the instance on a server machine. You can also use the same user for the fence ID as well. Here is an example:

 ./db2icrt -u db2v97 db2v97
DBI1070I  Program db2icrt completed successfully.

Note that it is not supported to run db2icrt command when you source the DB2 instance environment.

Good Luck everyone!!

Thanks
Samyn

DB2 Installation with db2_install script

Hi,

Lets get started with the installation of DB2 using "db2_install" script on LINUX and UNIX platforms. You can also install DB2 using "db2setup" which launches the GUI wizard.

1) Firstly download the image and this can be done in 2 ways:
-- From the passport advantage site where you login in with your customer ID and password. Normally this image will be GA which comes with a license.

-- From the fixpack central site 
https://www-304.ibm.com/support/docview.wss?rs=71uid=swg27007053 
You have to apply the license once you install the product since this comes with 90 day trial period. Note that you can install the complete product from a fixpack image starting V9.1

2) Use the wget command for faster download to your server.
Here is an example:  
wget http://delivery04.dhe.ibm.com/sar/CMA/IMA/02bnh/0/v9.5fp7_linuxx64_server.tar.gz

3) Unzip and Untar the downloaded image as below:
-- gunzip v9.5fp7_linuxx64_server.tar.gz
-- tar -xvf v9.5fp7_linuxx64_server.tar

4) Move to the directory where the install scripts are located by running "cd server". Now run a "ls -l" command and you will notice the following scripts:

ls -l 
total 76
drwxr-xr-x  6 db2v95 db2v95 4096 Dec  4 01:10 db2
-r-xr-xr-x  1 db2v95 db2v95 5293 Dec  4 01:09 db2_deinstall
-r-xr-xr-x  1 db2v95 db2v95 5163 Dec  4 01:08 db2_install
-r-xr-xr-x  1 db2v95 db2v95 5145 Dec  4 01:08 db2prereqcheck
-r-xr-xr-x  1 db2v95 db2v95 5145 Dec  4 01:08 db2setup
drwxr-xr-x 15 db2v95 db2v95 4096 Dec  4 01:09 doc
-r-xr-xr-x  1 db2v95 db2v95 5181 Dec  4 01:10 installFixPack

5) Root installations require root user authority. For non-root installations, you must log on with the user ID that owns the non-root installation. In my example, I did the ESE product install as root.

./db2_install -p ese

It will prompt you for Install path whether you want to keep it to the default or change it as below:

Default directory for installation of products - /opt/ibm/db2/V9.5

***********************************************************
Do you want to choose a different directory to install [yes/no] ?

Enter yes to change the path. In my case I did to the default path.

6) Once done with the install you can run the db2ls to list installed DB2 products.

Install Path        Level   Fix Pack  Special Install Number Install Date              Installer UID
------------------------------------------------------------------------------------------
/opt/ibm/db2/V9.5  9.5.0.7     7                          Fri Feb 25 19:05:05 2011 CST     0


Good Luck Everyone!!!!

Thanks

Friday, February 25, 2011

Kick Start

Hello DB2 lovers and users :)

This blog provides solutions/guidance/new updates for all DB2 users on various platforms(i.e LINUX/UNIX/WINDOWS). If you see flaws in any documentation, please feel free to post your comments/suggestions so that we can make this a better blog and make our DB2 users HAPPY!!.

Thanks
Samyn