Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2009

    Unanswered: Pending state of a user maintained MQT

    Hi all,

    I have an issue here, which I cant solve right now.

    I have created an MQT like:

    create table myschema.t_mqt as
    (select * from myschema.t_table1 union select * from myschema.t_table2)

    data initially deferred refresh deferred maintained by user IN TBS_myTBS INDEX IN TBS_IX@

    set integrity for myschema.t_mqt materialized query immediate unchecked@

    grant control on myschema.t_mqt to myuser@


    Now I wanted to update it with:

    declare c1 cursor for select * from myschema.t_table1 union select * from myschema.t_table2@

    load from c1 of cursor replace into myschema.t_mqt@

    This worked so far but now the MQT seems to be in a pending state and I cannot do anything else on it, not even a SELECT.

    SQL0668N Operation not allowed for reason code "1" on table

    What do I have to do here?


  2. #2
    Join Date
    Dec 2008
    SQL0668N Operation not allowed for reason code reason-code on table table-name .
    Access to table table-name is restricted. The cause is based on the following reason codes reason-code :
    The table is in Check Pending state. The integrity of the table is not enforced and the content of the table may be invalid. An operation on a parent table or an underlying table that is not in a check pending state may also receive this error if a dependent table is in a check pending state.
    User Response:
    Execute the SET INTEGRITY statement with the IMMEDIATE CHECKED option on table table-name to bring the table out of the Check Pending state. For a user maintained materialized query table, execute the statement with the IMMEDIATE UNCHECKED option instead of the IMMEDIATE CHECKED option.

  3. #3
    Join Date
    Sep 2009
    Why do so many users tend to paste the manual into answers, when I can (and have) read it before posting anyways??

    For some reason my table space is in the backup pending mode which I do not understand, as I wouldnt expect the query above to trigger that mode.

    I might have missed that part in the manual as well - if you can paste it please


Posting Permissions

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