IBM Support

"DB2ADMIN" does not have the privilege to perform operation "GRANT"

Troubleshooting


Problem

User is trying to run a script to create the required permissions on a Controller database. - For example, they are trying to run this script: GRANT DBADM, CREATETAB, BINDADD, CONNECT, CREATE_NOT_FENCED_ROUTINE, IMPLICIT_SCHEMA, LOAD, CREATE_EXTERNAL_ROUTINE, QUIESCE_CONNECT ON DATABASE TO USER fastnet User receives an error.

Symptom

The message will vary depending on what user you are trying to connect with, for example:

"ADMINISTRATOR" does not have the privilege to perform operation "GRANT".. SQLCODE=-552, SQLSTATE=42502, DRIVER=3.72.24

"DB2ADMIN" does not have the privilege to perform operation "GRANT".. SQLCODE=-552, SQLSTATE=42502, DRIVER=3.72.24

Cause

The relevant operating system (Windows) user (for example 'administrator' or 'db2admin') does not have SECADM authority on the database.

Resolving The Problem

Grant the relevant user (for example 'administrator' or 'db2admin') SECADM permission on the database.

Steps:

1. Connect to the database (for example via Data Studio) using any user

2. Run the following script:

    select grantee, securityadmauth from syscat.dbauth

3. Make a note of the user who has 'SECURITYADMAUTH' permission

  • For example the user 'Richard':

4. Logon to the DB2 server using the same Windows user ID (for example 'Richard') who you previously identified as having the the SECURITYADMAUTH rights

5. Launch "DB2 Command Window - Administrator"

6. Connect to the relevant database, for example by running the script:


    db2 connect to CCR

7. Run command(s) to add the relevant user(s) to have the SECADM right. For example:

    db2 GRANT DBADM ON DATABASE TO USER administrator
    db2 GRANT DBADM ON DATABASE TO USER db2admin

[{"Product":{"code":"SS9S6B","label":"IBM Cognos Controller"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Controller","Platform":[{"code":"PF033","label":"Windows"}],"Version":"10.3","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
15 June 2018

UID

swg22005935