Search code examples
db2mainframe

How to check which tablespaces is user granted in DB2 v9 z/os?


On DB2 for linux platform I can check it in the SYSIBM.SYSTBSPACEAUTH table. For example:

SELECT * FROM SYSIBM.SYSTBSPACEAUTH WHERE GRANTEE=....

How can this be done on z/os since there is no SYSIBM.SYSTBSPACEAUTH table?

Thanks in advance, GO


Solution

  • That would be SYSIBM.SYSRESAUTH table I think.

    select 
      name 
    from 
      sysibm.sysresauth
    where
      grantee = ? and 
      obtype  = 'R'                   -- tablespace