Db2

Db2

Connect with Db2, Informix, Netezza, open source, and other data experts to gain value from your data, share insights, and solve problems.

 View Only
Expand all | Collapse all

Database user does not have the required privileges to perform the specified operation.

  • 1.  Database user does not have the required privileges to perform the specified operation.

    Posted Mon February 13, 2023 05:17 AM
    Edited by meghana m Mon February 13, 2023 11:04 AM

    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
    ------------------------------



  • 2.  RE: Database user does not have the required privileges to perform the specified operation.

    Posted Sat March 04, 2023 06:55 AM

    Hi,

    What is the exact command being run to get the error?


    Regards,
    David.



    ------------------------------
    David Williams
    ------------------------------



  • 3.  RE: Database user does not have the required privileges to perform the specified operation.

    Posted Mon March 06, 2023 05:07 AM

    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
    ------------------------------