title: Failing update table in db2 with SQLCODE: -668, SQLSTATE: 57016, SQLERRMC: 7;
body: <p>I am using db2 9.5 i have created a column in table which is created successfully but i am not able to update table column and getting following error</p>
  
  <blockquote>
    <p>[Error] Script lines: 1-1 --------------------------
     DB2 SQL error: SQLCODE: -668, SQLSTATE: 57016, SQLERRMC: 7;DB2ADMIN.XCATENTRYEXT
     Message: Operation not allowed for reason code "7" on table "DB2ADMIN.XCATENTRYEXT".  </p>
  </blockquote>
  
  <p>Following the some blog/sites on google i found the REORG command as solution as mentioned in  following link 
  <a href="http://bytes.com/topic/db2/answers/508869-reorg-tablespace" rel="nofollow noreferrer">http://bytes.com/topic/db2/answers/508869-reorg-tablespace</a></p>
  
  <p>i have tried the following queries to run on database to solve the problem. </p>
  
  <pre><code>Database["DB2"].ExecuteNonQuery("call SYSPROC.ADMIN_CMD ('REORG TABLE DB2ADMIN.XCATENTRYEXT index CATENTRY_ID INPLACE')")
  
  REORG TABLE DB2ADMIN.XCATENTRYEXT index CATENTRY_ID INPLACE
  
  REORG TABLE DB2ADMIN.XCATENTRYEXT 
  REORG INDEXES I0000908 FOR TABLE DB2ADMIN.XCATENTRYEXT
  </code></pre>
  
  <p>but all queries have the same error in result like</p>
  
  <pre><code> DB2 SQL error: SQLCODE: -104, SQLSTATE: 42601, SQLERRMC: Database;BEGIN-OF-STATEMENT;&lt;variable_set&gt;
   Message: An unexpected token "Database" was found following "BEGIN-OF-STATEMENT".  Expected tokens may include:  "&lt;variable_set&gt;".
  </code></pre>
  
  <p>I am stuck on this error, I am not even able to update any column of that particular table.</p>