Technical Blog Post
Abstract
"sqlri_ddl_common: unexpected sqlcode for DDL!" when revoking role from a user
Body
If you upgrade your database from v9.7 to upper level and revoke a role from a user,
you might see the following error message due to orphan rows in system tables.
------------------------------------------------
$ db2 revoke role developer_role from user db2user1
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it
returned:
SQL0901N The SQL statement or command failed because of a database system
error. (Reason "sqlri_ddl_common: unexpected sqlcode for DDL!".) SQLSTATE=58004
------------------------------------------------
If so, please open a PMR to clean the orphan rows in system tables by db2cleancat.
For usage of db2cleancat, please refer to the technote below.
[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]
UID
ibm13286281