cancel
Showing results for 
Search instead for 
Did you mean: 

Insufficient privilege to grant service user

axitycesarfelce
Participant

Hi all, Help please!

I have a container has has a schema name, I also have my grantor service that can access my remote sources and classic.

resources: - name: myDB-hdi type: com.sap.xs.hdi-container properties: service-name: '${service-name}' parameters: config: schema: MYSCHEMA - name: grantor-service type: org.cloudfoundry.existing-service parameters: service-name: grantor-service

How can I add the `GRANT SELECT, INSERT, UPDATE, DELETE, EXECUTE ON SCHEMA "MYSCHEMA" TO "MYGRANTORUSER" WITH GRANT OPTION;` if i can't do it from the console using DBADMIN or neither SharedKey in the BAS?

I'm getting always Error: (dberror) [258]: insufficient privilege: Detailed info for this error can be found with guid '887E3CF0BE599E4AAB722BBE2DA4E5CC'

View Entire Topic
axitycesarfelce
Participant

Hi,
Thanks to denys.kempen, mickael.cocquerel, and gregorw

Your Video Series HANA Cloud Smart Data Integration, link "Grant SAP HDI Container Administrator Privileges to a User", and mickael.cocquerel with opening the admin console helped me to solve my issue.

I finally did this to the user and also the user in the HANA ERP system used form replication we had to add
TRIGGER and SELECT to the schema "SAPPRO"

set schema "MYSCHEMA#DI";
CREATE LOCAL TEMPORARY COLUMN TABLE #PRIVILEGES LIKE _SYS_DI.TT_SCHEMA_PRIVILEGES;
INSERT INTO #PRIVILEGES ( PRIVILEGE_NAME, PRINCIPAL_SCHEMA_NAME, PRINCIPAL_NAME ) 
    VALUES ( 'EXECUTE', '', 'USER_SDI_AGENT' );
CALL MYSCHEMA#DI.GRANT_CONTAINER_SCHEMA_PRIVILEGES( #PRIVILEGES, _SYS_DI.T_NO_PARAMETERS, ?, ?, ?);
DROP TABLE #PRIVILEGES;

Thanks

RAP1705
Explorer
0 Kudos

set schema "DBADMIN";

CREATE LOCAL TEMPORARY COLUMN TABLE #PRIVILEGES LIKE _SYS_DI.TT_API_PRIVILEGES;

INSERT INTO #PRIVILEGES (PRINCIPAL_NAME, PRIVILEGE_NAME, OBJECT_NAME) SELECT 'UPS_ABAP_REMOTE', PRIVILEGE_NAME, OBJECT_NAME FROM _SYS_DI.TT_DEFAULT_CONTAINER_ADMIN_PRIVILEGES;

CALL "DBADMIN".GRANT_CONTAINER_API_PRIVILEGES(#PRIVILEGES, _SYS_DI.T_NO_PARAMETERS, ?, ?, ?);

DROP TABLE #PRIVILEGES;

I had the same error message and followed the help and videos mentioned above. I paste the code in SAP BTP/Database Explorer and received the following error message:

Semantic error: unresolve table or view _SYS_DI.TT_API_PRIVILEGES

Semantic error: unresolve column PRIVILEGE_NAME, OBJECT_NAME

Semantic error: unresolve procedure GRANT_CONTAINER_API_PRIVILEGES

Any idea as to how to resolve these new error messages?

RAP

axitycesarfelce
Participant
0 Kudos

Hi RAP,

That script was executed on HANA ERP, not in the Database Explorer for HANA Cloud.

Sorry! I saw the comment late!

Cesar