EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

How to solve error to run 'REORG' command in DB2 during Metadata Upgrade


Ling Jing

Product Owner, Principal • MicroStrategy


[Description]

When upgrading DB2 Metadata from M2020 to M2021, it will run the following SQLs to change the data type of column PROP_VAL in table DSSMDACCPROP.
ALTER TABLE DSSMDACCPROP ADD (PROP_VAL2 CLOB NOT NULL);
UPDATE DSSMDACCPROP SET PROP_VAL2 = PROP_VAL;
ALTER TABLE DSSMDACCPROP DROP COLUMN PROP_VAL;
ALTER TABLE DSSMDACCPROP RENAME COLUMN PROP_VAL2 to PROP_VAL;
CALL SYSPROC.ADMIN_CMD('REORG TABLE DSSMDACCPROP');
 
The last SQL statement is used to reorganize the Tablespace and index, otherwise, new data cannot be inserted into the Table. The user needs some authority to execute the ‘REORG’ command. If the following error message is returned during the updating, please ask the DB administrator to grant the user one of the following authorities.
One of the following authorities is needed to run the ‘REORG’ command on the table(from DB2 documentation):

  • SYSADM
  • SYSCTRL
  • SYSMAINT
  • DBADM
  • SQLADM
  • CONTROL privilege on the table

Error Message:
The user does not have the authority to run the REORG utility on table "DSSMDACCPROP".
 

[Solutions]

Make sure you backup your Metadata before doing the Metadata Upgrade.
 

If you are upgrading from M2020 to M2021:

  1. Grant the user one of the above authorities. For example:


db2 "connect to <DB_NAME>"
db2 "grant DBADM on database to user <USER_NAME>"
 
   2. Redo the MD upgrade(either the partial failed MD or backup MD should work).
 

If you are upgrading from pre-M2020 to M2021:

  1. Grant the user one of the above authorities like above.
  2. Redo the MD upgrade with the backup MD.

Comment

0 comments

Details

Knowledge Article

Published:

January 26, 2022

Last Updated:

January 26, 2022