Hi Meghana,
you might want to check, if the user who tries to grant dbadm to the other user has SECADM privileges.
Here is a query to display all privileges as a neat table. You should check column SA
SELECT
substr( grantor, 1, 10 ) AS grantor, grantortype AS t1,
substr( grantee, 1, 10 ) AS grantee, granteetype AS t2,
BINDADDAUTH AS BND, CONNECTAUTH AS CON, CREATETABAUTH AS CRT,
DBADMAUTH AS DBA, EXTERNALROUTINEAUTH AS EXT, IMPLSCHEMAAUTH ASIMP,
LOADAUTH AS LD, NOFENCEAUTH AS NF, QUIESCECONNECTAUTH AS QC,
LIBRARYADMAUTH AS LA, SECURITYADMAUTH AS SA, SQLADMAUTH AS SQA,
WLMADMAUTH AS WLA, EXPLAINAUTH AS EXP, DATAACCESSAUTH AS DATA,
ACCESSCTRLAUTH AS ACC, CREATESECUREAUTH AS CRS
FROM
syscat.dbauth WITH ur
More details on this view https://www.ibm.com/docs/en/db2/11.5?topic=views-syscatdbauth
Cheers
------------------------------
Roland Schock
IBM Champion and IBM Gold Consultant
------------------------------
Original Message:
Sent: Mon February 13, 2023 05:17 AM
From: meghana m
Subject: Database user does not have the required privileges to perform the specified operation.
Hi Team
User facing issue while importing data in DB . I provided database level access but still they have permission issue .Could you please check and help on this .
SQL : exporting data
DB2 server : Importing data
Error :
---------
The database user does not have the required privileges to perform the specified operation. Check with your database administrator or your database vendor product documentation and ensure the user account has appropriate authority to read, write, and administer tables.com.ibm.db2.jcc.am.SqlException:
DB2 SQL Error: SQLCODE=-1092, SQLSTATE= , SQLERRMC=CLMAPUSR, DRIVER=4.21.29
db2 connect to <dbname>
db2 grant dbadm on database to user <username >
------------------------------
meghana m
------------------------------