A few questions about SET INTEGRITY.
1) Docs: The SET INTEGRITY statement is under transaction control.
Using two sessions (different user, even) i tried the following.
Session 1: UPDATE COMMAND OPTIONS USING C OFF
Session 1: LOAD a TABLE
Session 2: SysCat.Tables.Status = 'C'
Session 1: SET INTEGRITY FOR table IMMEDIATE CHECKED
Session 2: SysCat.Tables.Status = ''
Shouldn't Session 1 require a COMMIT for SESSION 2 to see it?
2) DECLARE GLOBAL TEMPORARY TABLE A LIKE table.
SET INTEGRITY FOR table FOR EXCEPTION IN table USE SESSION.A
I had some exceptions, and this resulted in an error telling be i
didn't have INSERT permissions on SESSION.A.
I had to ask to DBA to create another (real) TABLE, and GRANT me
INSERT, and then the same statement worked.
Are GLOBAL TEMPORARY TABLEs not supported as EXCEPTION TABLEs?
3) SET INTEGRITY accepts more than one TABLE in its list of TABLEs.
(i) If all of the TABLEs are SysCat.Tables.Status = 'C' , the statement
work regardless of order.
(ii) If any of the TABLEs are SysCat.Tables.Status = '', the entire
statement fails.
(iii) If a TABLE is SysCat.Tables.Status = '' but will become
SysCat.Tables.Status = 'C' as a result of another TABLE in the
statement, the statement worksincluding this TABLE.
Why is (ii) like that? I can understand a warning message, but
complete failure of all TABLEs listed? And especially with (iii) it
doesn't seem correct.
B.