Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2013

    Unanswered: DDL in Transaction and rollback Failed

    Hello i'm new to this forum and i hope i do it right.
    I didn't find any solution via the web search or google.
    I have a problem with DDL-Statements in a transaction. The documentation says that ddl in transaction is supported. It's not the final doc, but i hope it did not change.
    DB2 Database for Linux, UNIX, and Windows

    I am using db2 express in the version 10.1.2 and the following test does not succeed. I am using the EMS SQL Manager to execute the following statements:

    CREATE TABLE auto_trans (
      id int NOT NULL,
      Modell varchar(45),
      Preis decimal(18,2),
      PRIMARY KEY (id)
    CREATE TABLE kunde_trans (
      id int NOT NULL,
      kid2 decimal(18,2) NOT NULL,
      Name varchar(45),
      Vorname varchar(45),
      Auto int,
      PRIMARY KEY (id,kid2)
    This "fails", because the tables will be created, but this code:
    insert into auto_trans values (4, 'Golf IV', 15499);
    insert into auto_trans values (5, 'Golf II', 1499);
    insert into auto_trans values (6, 'Golf III', 8499);
    this code works fine. There are not any new rows in the table.

    So did i miss something or can anyone point me to the right direction?


  2. #2
    Join Date
    Apr 2006
    Provided Answers: 11
    new to the forum but I hope not new to DB2 ....
    the autocommit is probably on in the tool
    in the command-window this can be controlled with -c or +c
    this can be set
    or db2 +c -f commandfile
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5-V11 Fundamentals- DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified

Tags for this Thread

Posting Permissions

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