If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Pending state of a user maintained MQT

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-17-09, 07:27
xtomx xtomx is offline
Registered User
 
Join Date: Sep 2009
Posts: 7
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
"myschema.t_mqt".

What do I have to do here?

Thanks,
Thomas
Reply With Quote
  #2 (permalink)  
Old 09-17-09, 09:30
rdutton rdutton is offline
Registered User
 
Join Date: Dec 2008
Posts: 76
SQL0668N Operation not allowed for reason code reason-code on table table-name .
Explanation:
Access to table table-name is restricted. The cause is based on the following reason codes reason-code :
1
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:
1
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.
__________________
RD
Reply With Quote
  #3 (permalink)  
Old 09-17-09, 09:53
xtomx xtomx is offline
Registered User
 
Join Date: Sep 2009
Posts: 7
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

Tom
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On