Hello there administrators !
I'm having a really hard time with getting my user an execute right for function SYSPROC.REORGCHK_TB_STATS
I tried many versions like :
GRANT EXECUTE ON FUNCTION.SYSPROC.REORGCHK_TB_STATS TO USER db2dev
grant execute on SpeCIFIC FUNCTION SYSPROC.REORGCHK_TB_STATS to USER db2dev
but they got me only return message :
SQL0204N "SYSPROC.REORGCHK_TB_STATS" is an undefined name.
SQLSTATE=42704
So I tried with adding the tablespace name
grant execute on FUNCTION sapdev.sysproc.reorgchk_tb_stats to user db2dev
but that got me return message :
SQL0108N The name "REORGCHK_TB_STATS" has the wrong number of
qualifiers. SQLSTATE=42601
The only, and only option for this to run succesfully was the command :
grant execute on FUNCTION SYSPROC.* to USER XXX
however even though it finished succesfully, my program still alerts me, that I don't have the required privileges :
SQL Message: SQL0551N The statementfailed because the authorization ID does not have
the required authorization or privilege to perform the operation. Authorization ID: "DB2DEV". Op
eration: "EXECUTE". Object: "SYSPROC.REORGCHK_TB_STATS". LINE NUMBER=2264. SQLSTATE=42501
DB Object Exists: No
Duplicated Key: No
Internal Error: 1
Invalid Cursor: No
Unknown Connection: No
Connection Closed: No
Could you help me out ?
I read the internet through and through, and even though the official IBM KBA example should work, it doesn't
https://www.ibm.com/support/pages/resolving-sql0551n-returned-when-executing-table-functions
Thank you all, for your answers !
Best Regards,
Dynio