DB2 V9.1 on AIX: tips on drop instance, de_install, re_install, re-create instance

June 14, 2007 – 10:56 pm

Like the Nissan Pathfinder’s ad: “not that you would, but you could”. In certain performance test conditions, you may have to drop the current DB2 V8 instance, install V9.1, and re-create a instance. Here is a short list of helpful commands - run as root unless specifically sudo’ed:

1. Drop DB2 instance

/opt/IBM/db2/V9.1/instance/db2idrop -f db2inst1
OR version 8
/usr/opt/db2_08_01/instance/db2idrop -f db2inst1

2. Uninstall previous db2

Stop and drop the DB2 Admin server first.

bash-3.00# su dasusr
bash-3.00$ pwd
/home/dasusr/das/bin
bash-3.00$ ./db2admin stop
SQL4407W The DB2 Administration Server was stopped successfully.

Drop the DAS server as root:

bash-3.00# pwd
/opt/IBM/db2/V9.1/instance
bash-3.00# ./dasdrop
SQL4410W The DB2 Administration Server is not active.
DBI1070I Program dasdrop completed successfully.

Then db2_deinstall UDB:

bash-3.00# pwd
/opt/IBM/db2/V9.1/install
bash-3.00# ./db2_deinstall -a
DBI1016I Program db2_deinstall is performing uninstallation.
Please wait.
The execution completed successfully.

3. Run db2 V9.1 install, db2_install will install at console (non-GUI).

4. After install, create an instance

Make sure db2fence1 and db2inst1 directories created under /home and with correct
permissions:
drwxr-xr-x 2 db2fenc1 db2admi 256 May 04 15:19 db2fenc1
drwxr-xr-x 2 db2inst1 db2admi 256 May 04 15:19 db2inst1
then

/opt/IBM/db2/V9.1/instance/db2icrt -u db2fenc1 db2inst1

bash-3.00# ./db2icrt -u db2fenc1 db2inst1
DBI1070I Program db2icrt completed successfully.

.END pw

You must be logged in to post a comment.