IBM Support

"sqlri_ddl_common: unexpected sqlcode for DDL!" when revoking role from a user

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":"BU029","label":"Data and AI"}, "Product":{"code":"SSEPGG","label":"DB2 for Linux, UNIX and Windows"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":""}]

UID

ibm13286281