i am trying to run a select count(*) from dim_order and its giving me reason code 3 error can u plz advise why and aht should i do to rectify it?
SQL0668N Operation not allowed for reason code "3" on table
"DB2ADMIN.DIM_ORDER". SQLSTATE=57016
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.
2 The table is in No Data Movement state. When in this state,
operations that cause data movement are disallowed. Data movement
operations include REDISTRIBUTE, update of partitioning key,
update of multi-dimensional clustering key and REORG TABLE.
3 The table is in Load Pending state. A previous LOAD attempt on
this table resulted in failure. No access to the table is allowed
until the LOAD operation is restarted or terminated.
4 The table is Read Only state. This state can occur during
on-line LOAD processing (LOAD INSERT with the READ ACCESS option),
or after an on-line LOAD operation, but before all constraints
have been validated in the newly appended portion of the table
using the SET INTEGRITY statement. No update activity is allowed
on this table.
5 The table is in Load In Progress state. The LOAD utility is
currently operating on this table, no access is allowed until the
LOAD is finished.
6 Materialized query tables that reference a nickname cannot be
refreshed in ESE.
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.
2 Execute REFRESH TABLE statement on the dependent immediate
materialized query tables and staging tables of table
"<table-name>". The contents of these dependent immediate
materialized query tables and staging tables can be incrementally
maintained from the appended data of "<table-name>" through
previous LOAD INSERT operations.
3 Restart or terminate the previously failed LOAD operation on
this table by issuing LOAD with the RESTART or TERMINATE option
respectively.
4 Issue the LOAD QUERY command to check whether the table is in
the process of being loaded. If yes, wait until the LOAD utility
has completed, or if necessary, restart or terminate previously
failed LOAD operation. If LOAD is currently not in progress,
issue the SET INTEGRITY command with the IMMEDIATE CHECKED option,
to validate constraints in the newly loaded portion of the
table.
5 Wait until the current LOAD operation has finished. You can
use the LOAD QUERY command to monitor the progress of load.
6 Define a materialized query table using the MAINTAIN BY USER
option. Then, use an INSERT statement with a subquery to populate
the materialized query table.
sqlcode : -668
sqlstate : 57016
thanks
bobby