문제

I'm trying to run this:

ALTER TABLE AMMLIBT.SAGRPPF ADD UNIQUE (ID) ADD CHECK ( IS_BUDGETABLE IN ( 0 , 1 )) ;

Which gives me this:

SQL State: 55019

Vendor Code: -7008

Message: [SQL7008] SAGRPPF in AMMLIBT not valid for operation. Cause . . . . . : The reason code is 10. Reason codes are:

[...]

10 -- A constraint or trigger is being added to an invalid type of table, or the maximum number of triggers has been reached, or all nodes of the distributed table are not at the same release level.

[...]

Recovery . . . : Do one of the following based on the reason code:

[...] 10 -- Specify tables that are valid for constraints or triggers.

[...]

...And I have no idea why and can't seem to find anything online explaining this.

The table is journalled and I've deleted all dependents.

I'm on IBM DB2 V7R1

How do I fix this?

도움이 되었습니까?

해결책

Thanks to Charles for pointing out this command: DSPFD AMMLIBT/SAGRPPF

Which showed me that:

Maximum members . . . . . . . . . . . . . . : MAXMBRS *NOMAX

To fix this, I needed to change '*NOMAX' to '1'. To do this, I went to my greenscreen and did:

  1. type chgpf ammlibc/sagrppf
  2. F4
  3. F10
  4. Move cursor to 'Maximum members'
  5. Change '*NOMAX' to '1'
  6. Enter
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 dba.stackexchange
scroll top