Results 1 to 6 of 6
  1. #1
    Join Date
    Dec 2007
    Posts
    8

    Unanswered: Updating dbm cfg parameters from Application Program

    Hi,
    I want to update dbm cfg parameters DFT_MON_BUFPOOL and
    DFT_MON_STMT from C program. I am using db2 version 9.1.2 on Linux
    platform

    When I use
    "db2 update dbm cfg using DFT_MON_BUFPOOL ON DFT_MON_STMT ON"
    command for this purpose "db2 get dbm cfg show detail" command
    reflects changes in both current and delayed values of DFT_MON_BUFPOOL
    and DFT_MON_STMT immediately.

    I want to do same thing from C application programming

    my code for this is given below..

    ==============================================
    sqleatin(node, userid, passwd, &sqlca);
    DB2_API_CHECK("Attach to instance");

    EXEC SQL CONNECT TO :dbalias USER :userid USING asswd;
    EMB_SQL_CHECK("Connecting to database");

    EXEC SQL CALL SYSPROC.ADMIN_CMD('UPDATE DBM CFG USING
    DFT_MON_BUFPOOL ON DFT_MON_STMT ON IMMEDIATE');
    EMB_SQL_CHECK("update dbm cfg");
    sqledtin (&sqlca);
    DB2_API_CHECK("Detach from instance");
    EXEC SQL CONNECT RESET;
    ==============================================

    but "db2 get dbm cfg show detail" command reflects changes only in
    delayed values of both parameters not in current values.

    I tried to update it by using API "sqlfusys" instead of " EXEC SQL
    CALL SYSPROC.ADMIN_CMD('UPDATE DBM CFG USING DFT_MON_BUFPOOL ON
    DFT_MON_STMT ON IMMEDIATE')" , but I got same results.

    Can someone help me with this?

    Regards
    Lekh Raj

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Whether or not a change to db or dbm cfg takes effect immediate has nothing to do with the syntax.

    Some changes to db cfg require that all connections to the database be gone (database is de-activated state) to take effect immediately.

    In the case of the dbm cfg, some changes require that db2 instance be restarted.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  3. #3
    Join Date
    Dec 2007
    Posts
    8
    thanks Marcus_A for quick reply..
    all dbm cfg switches are configurable online configuration parameters and all online parameters should take effect immediately.

    http://publib.boulder.ibm.com/infoce...n/t0005243.htm

  4. #4
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Quote Originally Posted by lekhrajm
    thanks Marcus_A for quick reply..
    all dbm cfg switches are configurable online configuration parameters and all online parameters should take effect immediately.

    http://publib.boulder.ibm.com/infoce...n/t0005243.htm
    I don't know what exact text you are reading, but some db and dbm parameters do not take effect immediately, even though you can change them on-line. One way you will know whether they take effect immediately is to run the "get db/dbm cfg" command with "show detail" option.

    There is sometimes more specific information in the "Administration - Performance" reference manual for each parameter as to whether it takes effect immediately without a deactivation of the database (for db parms) or instance restart (dbm parms).
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  5. #5
    Join Date
    Dec 2007
    Posts
    8
    hi,
    If I update dbm cfg parameters DFT_MON_STMT and DFT_MON_BUFPOOL through command line processor, they takes effect immediately without de-activating database or restarting instance. But if I update these params through C program (code is given in my first post) they don't take effect immediately, only delayed values changes.

    My doubt is that, Do I really need to restart instance or I am doing something wrong?

  6. #6
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    You might want to look at the MONITOR SWITCHES, which are designed to be turned on and off with immediate effect.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •