尽管是 db2 dba 管理员用户,但用户没有 authority/permission

User does not have authority/permission despite being db2 dba admin user

在 Linux/x86-64 的 Db2 v11.1 Enterprise Edition 上,我检查了我当前连接的用户的权限:

select
   granteetype,
   dbadmauth,
   securityadmauth,
   dataaccessauth,
   accessctrlauth
from syscat.dbauth
where grantee = 'ADM1'

从输出中我看到这个用户是数据库的超级用户:

GRANTEETYPE DBADMAUTH SECURITYADMAUTH DATAACCESSAUTH ACCESSCTRLAUTH
----------- --------- --------------- -------------- --------------
U           Y         Y               Y              Y

当我尝试执行以下三个任务之一时,我总是遇到权限错误。

db2 "select * from sysibmadm.snaptab_reorg"

SQL1092N The requested command or operation failed because the user ID does not have the authority to perform the requested command or operation. User ID: "ADM1".

db2 "CREATE REGULAR TABLESPACE tbs1"

SQL0552N "ADM1" does not have the privilege to perform operation "CREATE TABLESPACE". SQLSTATE=42502

db2 "CREATE bufferpool bp1"

SQL0552N "ADM1" does not have the privilege to perform operation "CREATE BUFFERPOOL". SQLSTATE=42502

为什么 'ADM1' 用户出现权限错误?

此致

我查看了文档create tablespace, create bufferpool and snaptab_org table,它们都需要 SYSxxx 权限之一,但用户“ADM1”没有 SYSxxx 权限之一。

select * from table
(sysproc.auth_list_authorities_for_authid ('ADM1', 'U')) as t
where authority like 'SYS%'

AUTHORITY D_USER D_GROUP D_PUBLIC ROLE_USER ROLE_GROUP ROLE_PUBLIC D_ROLE
--------- ------ ------- -------- --------- ---------- ----------- ------
SYSADM    *      N       *        *         *          *           *
SYSCTRL   *      N       *        *         *          *           *
SYSMAINT  *      N       *        *         *          *           *
SYSMON    *      N       *        *         *          *           *

P.S。我错误地认为 DBA 权限足以执行这些操作。