Search This Blog

Wednesday, November 4, 2009

Configuration Management and DB2 parameters

Configuration Management is one of the most important thing in problem and incident management. Even in a simple situation when our db server with important db's will totally demanded we will need some "secured", high tuned parameters for db, application or for the operating system.

To be able to collect this db parameters we can write some simple script which will do this for us. The most important thing in this script that we need to thing about are: looking and deadlock situation in the db.

For IBM db2 we can use following peace of code in Perl, which will use "uncommitted lock" during the connection with db to get the db parameters:
446: $id= getpwnam("$user_name");
447: @tmp=getpwuid($id);
448: $home_dir=$tmp[7];
449: $cmd="db2 change isolation to ur ; " .
"
db2 connect to $db_name ; " .
"db2 list tables for all show detail; db2 connect reset"
;
450:
451: @tmp=`sudo su - $user_name -c "$cmd" 2>&1`;
The complete script can be found there db2-cfg-info.pl

1 comment:

  1. Did you know that you can generate cash by locking special sections of your blog or website?
    To start just join AdscendMedia and implement their Content Locking tool.

    ReplyDelete