In Db2 v11.5.8.0 on Linux x86-64 I see there are duplicate rows in sysibmadm.privileges for tables. Investigating in detail I see duplicates are from syscat.tabauth table, because the same privilege was granted by two grantors:
SELECT
grantor, grantortype, grantee, granteetype, tabschema, tabname, deleteauth
FROM
syscat.tabauth
WHERE
tabschema = 'MYSCHEMA' and
tabname = 'MYTABLE'
Outputs:
GRANTOR GRANTORTYPE GRANTEE GRANTEETYPE TABSCHEMA TABNAME DELETEAUTH
------- ----------- ------- ----------- --------- ------- ----------
SYSIBM S USER1 U MYSCHEMA MYTABLE G
MXEP U USER1 U MYSCHEMA MYTABLE G
I don't want to remove DELETE privilege from user. I just don't like to see two rows in this table. How to remove second row and leave first row intact?
After second row remove, I want to have:
GRANTOR GRANTORTYPE GRANTEE GRANTEETYPE TABSCHEMA TABNAME DELETEAUTH
------- ----------- ------- ----------- --------- ------- ----------
SYSIBM S USER1 U MYSCHEMA MYTABLE G
Regards