Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2003
    Posts
    1,605

    Question Unanswered: Disabling auto-commit in Command Window

    Hi,

    The default commit option in DB2 Command Windows is auto-commit: on.
    I can check the default setting with command: db2 ? options

    I thied to disable auto-commit in DB2 Command Window with command
    db2 update command options using c off

    I got message:
    DB20000I The UPDATE COMMAND OPTIONS command completed successfully.

    But it seems not to work. Am I doing something wrong?

    Grofaty

  2. #2
    Join Date
    Oct 2001
    Location
    Bangalore
    Posts
    186
    Hi,
    If the application requires it then you go like this:

    Make an entry in the db2cli.ini to turn off autocommit for all connections using the alias

    and if you need it temporarily then use:
    db2 +c "update .....query"

    cheers,
    Prashant

  3. #3
    Join Date
    Sep 2002
    Posts
    456

    Re: Disabling auto-commit in Command Window

    db2set db2options=+c

    dollar

    Originally posted by grofaty
    Hi,

    The default commit option in DB2 Command Windows is auto-commit: on.
    I can check the default setting with command: db2 ? options

    I thied to disable auto-commit in DB2 Command Window with command
    db2 update command options using c off

    I got message:
    DB20000I The UPDATE COMMAND OPTIONS command completed successfully.

    But it seems not to work. Am I doing something wrong?

    Grofaty

  4. #4
    Join Date
    Jan 2003
    Posts
    1,605

    Thumbs up Re: Disabling auto-commit in Command Window

    Hi,

    I need both temporaly and permanent. Thank you dahalkar_p for temporaly solution and thank you dollar489 for permanent solution. Both solutions works fine.

    One sub question:
    With "db2 ? options" I can check the default settings.

    How can I check current parameter settings? So, how can I check in wich mode (on or off) is "auto-commit" parameter?

    Grofaty

  5. #5
    Join Date
    Oct 2001
    Location
    Bangalore
    Posts
    186
    Hi,

    Try this:

    db2 list command options

    Cheers,
    Prashant

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

    It works fine.

    Thanks,
    Grofaty

    Originally posted by dahalkar_p
    Hi,

    Try this:

    db2 list command options

    Cheers,

Posting Permissions

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