Issue/Error:
SQL0668N Operation not allowed for reason code "3" on table "schema.tablename"(or)
Table is in Load pending state.
When will table go into Load pending state:
If a DB2 Load command/job under execution on table encounters a problem and doesn't complete successfully, then that table will be put into a Load pending state.
Checking for the status of table:
db2 -v "load query table schema.tablename"
If the database is partitioned, above command might not give the required status of the table for all other partitions. Hence, I believe below command is the best fit to get the status of tables which are impacted by Load. (select command will take sometime to return the records. Please be patient or alternatively run in nohup mode and redirect output to a file)
Alternatively, we can use below command as well to get the status of a single table.
db2_all "db2 -v connect to <databasename>; db2 -v load query table <schema.tablename>"
To bring the table into normal state.
As a DBA execute below command.
db2 -v "load from /dev/null of del terminate into schema.tablename nonrecoverable"
(or)
Ask the Developer, to execute the same command with terminate option
No comments:
Post a Comment