Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2003
    Posts
    58

    Unanswered: changing db2cli.ini parameters from a program

    hi, i want to change db2cli.ini parameter (CurrentSQLId) from a java program (so the value will stay in the file...)
    Is there a way to do that ?
    is there an API for such things ?

    Thanks...

  2. #2
    Join Date
    Jan 2003
    Posts
    1,605
    Hi,

    Parameters in db2cli.ini can be changed with db2 command. You must define the section tag (this tag is in square bracket) and the parameter.

    Sample:
    db2 update cli cfg for section common using cursorhold 0

    Hope this helps,
    Grofaty

  3. #3
    Join Date
    Jun 2003
    Posts
    58
    yes, but can i do it from a java program ?

  4. #4
    Join Date
    Aug 2004
    Posts
    7

    Smile remove cli configuration parameter

    hi, i want to delete db2cli.ini CLI Configuration Parameters

    When I run the command :- db2 "get cli configuration"

    it is showing me following output

    Section: tstcli1x
    -------------------------------------------------
    uid=userid
    pwd=*****
    autocommit=0
    TableType='TABLE','VIEW','SYSTEM TABLE'

    Section: tstcli2x
    -------------------------------------------------
    SchemaList='OWNER1','OWNER2',CURRENT SQLID

    Section: MyVeryLongDBALIASName
    -------------------------------------------------
    dbalias=dbalias3
    SysSchema=MYSCHEMA

    Section: ss_bill
    -------------------------------------------------
    statement=0
    sysschema=0
    clischema=0
    db2optimization=2

    Section: sample
    -------------------------------------------------
    TRANSACTION_READ_UNCOMMITTED=4
    TXNISOLATION=4

    Now I want to delete section ss_bill, how do i remove this section.
    Even I have not found this section in db2cli.ini file

    I have add this parameters using command :-
    db2 "update cli cfg for section ss_bill using clischema 0"

    Now My Product Printing is not working it is gave me error of IBM DB2 CLI 0.procedure.undefined name from clischema line.

    Is there a way to do that ?
    How do I remove ss_bill section from above output.

    Uday

  5. #5
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    You can do from a Java program by calling this command as a Operating system command

    HTH

    Sathyaram
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  6. #6
    Join Date
    Aug 2004
    Posts
    7
    Sathyaram

    Which Java Program I can use to calling this command. I'm working on linux server and installed IBM UDB DB2 V7.1.

    I tried using "db2 reset cli cfg for section ss_bill using clischema"
    but this command is not working.

    Pls. guide me. Last 2 days my product printing is not working due to this error.

    Thanks in Advance.
    uday

Posting Permissions

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