Improve company productivity with a Business Account.Sign Up

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1671
  • Last Modified:

DB2 LOAD operation failed

Hi all,

One of the tables got in an inaccessible state after I tried to change a column datatype.
The LOAD failed during that change, and I can't do anything now.

If I try to open the table, I get A database manager error occurred. : [IBM][CLI Driver][DB2/NT64] SQL0668N  Operation not allowed for reason code "3" on table "DBO.POSITION".  SQLSTATE=57016

goes with no errors, but doesn't change anything

REORG results in
SQL2216N  SQL error "-668" occurred while reorganizing a database
table or its indexes.

I am not proficient in DB2, especially in administration, so my research lead me nowhere.

Please tell me what I try - specifically,
because "try to cancel the LOAD job" tells me nothing.

Thank toy,

Any help is appreciated.
  • 3
  • 3
1 Solution
Kent OlsenData Warehouse Architect / DBACommented:
Hi darrgyas,

I doubt that you have a load hung up, but there may be a load status messing you up.

A "LOAD TERMINATE" or "LOAD RESTART" may clear the status.

Repeat the load statement that you issued (it must be the same statement) and include the keyword TERMINATE

If the original statement is:

  LOAD FROM myfile of del INTO table1 ...

then issue:

  LOAD FROM myfile of del TERMINATE INTO table1 ...

What was the original data type of the changed column and what is the new type?

darrgyasAuthor Commented:
Hi Kent,

I change SMALLint to INTEGER.

The table has appr 250 million records.

Unfortunately, I do not have the original LOAD statement, as it was done automatically by DB2 Control Center.

Is there anything else I can do?
Kent OlsenData Warehouse Architect / DBACommented:
I seldom use Control Center, and never for running backups, so I'm guessing here.  If another expert is more familiar, maybe they'll jump in.

It sounds like there are two issues.  

1)  The ALTER TABLE {table} ALTER COLUMN encountered an error in the data conversion.  If simply copying a small integer to a normal integer caused a conversion error, there's a DB2 error that IBM needs to know about.  (I really don't think that that is what happened.)

What may have happened is that DB2 ran out of space during the conversion and aborted the ALTER statement.  I do not remember if the ALTER logs the change so that it can be rolled back.  If it does, it's probable that the rollback space isn't large enough.  But I would expect that transaction to roll back without a problem.

This ALTER would affect every single row so the rollback space would need to be at least as large as this table.  Depending on row size and blocking it's also possible that growing each row caused the blocks to split, growing the table significantly.

2)  The backup process hung up due to the error above.  The process needs to be cleared.

Can you do anything on the table?  A simple query?

  SELECT COUNT(*) FROM mytable;

I suspect not.  What error message do you get?
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

darrgyasAuthor Commented:
Here's what I get: A database manager error occurred. : [IBM][CLI Driver][DB2/NT64] SQL0668N  Operation not allowed for reason code "3" on table "DBO.TRACTION".  SQLSTATE=57016
Kent OlsenData Warehouse Architect / DBACommented:
Ok.  It looks like we can skip right past item 1 above and deal with the load pending error.

Have you tried doing a LOAD TERMINATE from the Control Center or the Command Line Processor?
darrgyasAuthor Commented:
Thanks for your time, Kent, but I think I dug a hole for myself here. I'll survive.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now