IBM Support

The steps to clear the "ongoing ADMIN_MOVE_TABLE" status for a table

Question & Answer


Question

Running the operation e.g. REORG, ALTER TABLE, LOAD etc on a table failed with "SQL0668N Reason code 10" error which means the table is in "ongoing ADMIN_MOVE_TABLE" status. But calling SYSPROC.ADMIN_MOVE_TABLE with CANCEL to cancel the move table operation failed with "SQL2104N Reason code 8" error which means no online move table operation is in progress. How can we clear the "ongoing ADMIN_MOVE_TABLE" status for this affected table?

Cause

The "ongoing ADMIN_MOVE_TABLE" status is not cleared, but the corresponding entries for the table in systools.admin_move_table are deleted.

This is mainly caused by APAR IC80632.
http://www-01.ibm.com/support/docview.wss?uid=swg1IC80632

The fix for this APAR can only prevent the problem from happening again but cannot clear the "ongoing ADMIN_MOVE_TABLE" status for the affected table.

Answer

There are two ways to clear the "ongoing ADMIN_MOVE_TABLE" status:

1) rebuild the affected table as suggested by the local fix documented in APAR IC80632
or
2) use the following steps:

a. Create a test table
db2 "create table db2inst1.test (c1 int)"

b. Initialize the moves for the test table, which will create some entries in systools.admin_move_table
db2 "call sysproc.admin_move_table('DB2INST1','TEST','','','','','','','','','INIT')"

c. Update systools.admin_move_table
db2 "update systools.admin_move_table set tabname='affected_table_name', tabschema='affected_table_schema' where tabname='TEST' and TABSCHEMA='DB2INST1'"

d. Run CANCEL against the affected table again
db2 "call admin_move_table('affected_table_schema','affected_table_name','','','','','','','','','CANCEL')"

After this step, the affected table status should be normal now.

e. Drop the test table

[{"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Data Movement - db2move\/db2relocatedb","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"9.7","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 June 2018

UID

swg21667831