通过以下DB2查询,我可以查看“ CREATESECUREAUTH”特权:
select grantee, granteetype, createsecureauth from syscat.dbauth
以上查询结果:
GRANTEE GRANTEETYPE CREATESECUREAUTH
--------------------------------------------
DB2INST U N
现在,我想将被授予者“ DB2INST”的createsecureauth特权从“ N”更新为“ Y” 但是我不能用“ GRANT”或“ UPDATE”来做到这一点。 怎么做?
答案 0 :(得分:0)
该特权的调用方式有所不同,请检查GRANT syntax:
GRANT CREATE_SECURE_OBJECT ON DATABASE TO USER HENRIK
该特权允许创建安全对象,即安全触发器和安全功能。
答案 1 :(得分:0)
以下SQL将SYSCAT.DBAUTH
的列映射到GRANT(或REVOKE)语句中使用的特权的名称
SELECT A.GRANTEE AS AUTHID
, A.GRANTEETYPE AS AUTHIDTYPE
, B.PRIVILEGE
, CASE WHEN B.AUTH = 'G' THEN 'Y' ELSE 'N' END AS GRANTABLE
, CURRENT SERVER AS OBJECTNAME
, '' AS OBJECTSCHEMA
, CAST ('DATABASE' AS VARCHAR (11)) AS OBJECTTYPE
FROM SYSCAT.DBAUTH A
, LATERAL(VALUES
(BINDADDAUTH ,'BINDADD')
, (CONNECTAUTH ,'CONNECT')
, (CREATETABAUTH ,'CREATETAB')
, (DBADMAUTH ,'DBADM')
, (EXTERNALROUTINEAUTH ,'CREATE_EXTERNAL_ROUTINE')
, (IMPLSCHEMAAUTH ,'IMPLICIT_SCHEMA')
, (LOADAUTH ,'LOAD')
, (NOFENCEAUTH ,'CREATE_NOT_FENCED_ROUTINE')
, (QUIESCECONNECTAUTH ,'QUIESCE_CONNECT')
, (LIBRARYADMAUTH ,'LIBRARYADMAUTH')
, (SECURITYADMAUTH ,'SECADM')
, (SQLADMAUTH ,'SQLADM')
, (WLMADMAUTH ,'WLMADM')
, (EXPLAINAUTH ,'EXPLAIN')
, (DATAACCESSAUTH ,'DATAACCESS')
, (ACCESSCTRLAUTH ,'ACCESSCTRL')
) B ( AUTH, PRIVILEGE )
WHERE B.AUTH IN ('Y','G')