Results 1 to 4 of 4
  1. #1
    Join Date
    May 2005
    Location
    Bangalore, India
    Posts
    35

    Unanswered: Sql3603n set integrity

    DB2 9.7 FP6 / AIX 6

    I had a table with records to which I added a 'Generated Always' column.
    the table has lot of RI Constraints defined on it.

    Steps below:

    At Step 3, i forced db2 to SET INTEGRITY 'without' checking.

    Now when I want DB2 to SET INTEGRITY while checking all data, it returns an error.
    Any suggestions to fix this.

    Series of statements run:

    Step 1
    -------
    db2 => SET INTEGRITY FOR DM.DIM_SITE OFF
    DB20000I The SQL command completed successfully.

    Step 2
    ------
    db2 => ALTER TABLE DM.DIM_SITE ADD COLUMN SITE_NO_TRIM VARCHAR(10) GENERATED ALWAYS AS (SUBSTR(TRIM(SITE_NO),1,1))
    DB20000I The SQL command completed successfully.

    Step 3
    ------
    db2 => SET INTEGRITY FOR DM.DIM_SITE ALL IMMEDIATE UNCHECKED
    DB20000I The SQL command completed successfully.

    Step 4
    ------

    db2 => SET INTEGRITY FOR DM.DIM_SITE OFF
    DB20000I The SQL command completed successfully.

    Step 5
    ------

    db2 => SET INTEGRITY FOR DM.DIM_SITE IMMEDIATE CHECKED NOT INCREMENTAL
    DB21034E The command was processed as an SQL statement because it was not a
    valid Command Line Processor command. During SQL processing it returned:
    SQL3603N Integrity processing through the SET INTEGRITY statement has found
    an integrity violation involving a constraint, a unique index, a generated
    column, or an index over an XML column. The associated object is identified by
    "DM.DIM_SITE.SITE_NO_TRIM". SQLSTATE=23514

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Did you try the FORCE GENERATED option of SET INTEGRITY?
    ---
    "It does not work" is not a valid problem statement.

  3. #3
    Join Date
    May 2005
    Location
    Bangalore, India
    Posts
    35
    funny, i simply ignored this option.
    following works fine:

    db2 => SET INTEGRITY FOR DM.DIM_SITE IMMEDIATE CHECKED FORCE GENERATED NOT INCREMENTAL
    DB20000I The SQL command completed successfully.

    Thanks n_i

  4. #4
    Join Date
    Jan 2016
    Posts
    2

    Question

    -bash-4.1$ db2 "SET INTEGRITY FOR DIFOT.DIFOT_MISS_CHANGES IMMEDIATE CHECKED FORCE GENERATED NOT INCREMENTAL"
    DB21034E The command was processed as an SQL statement because it was not a
    valid Command Line Processor command. During SQL processing it returned:
    SQL3603N Integrity processing through the SET INTEGRITY statement has found
    an integrity violation involving a constraint, a unique index, a generated
    column, or an index over an XML column. The associated object is identified by
    "DIFOT.DIFOT_MISS_CHANGES.DFT_MS_CHG_FK1". SQLSTATE=23514


Posting Permissions

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