cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to access function in hdblibrary using anonymous block

Bruhn
Explorer
0 Kudos

Hi All,

I have some issues with a small library - it contains one table function getVariables and it is defined using the hdblibrary artefact. It deployed just fine and I can execute it from HANA Studio where the necessary rights is assigned (execute on library) - like this :

do begin using "HDI_DB_1"."session" as lib1;
  select * from lib1:"getVariables"(null);
end;

However when trying to execute it from webIDE(removed the HDI schema prefix in the using part) using the dataexplorer (SQL Console/SQL Console(Admin) I am not able to do so - and I receive a DBerror #258

Could not execute 'do begin using "session" as lib1;   select * from lib1:"getVariables"(null); end'
Error: (dberror) [258]: insufficient privilege: Detailed info for this error can be found with guid '....' 

I looked up the guid and have the following,

SESSION_USER_NAME_____________ : HDI_DB_1....DT
CHECKED_USER_NAME_____________ : HDI_DB_1....DT
PRIVILEGE_____________________ : EXECUTE
IS_MISSING_ANALYTIC_PRIVILEGE_ : FALSE
IS_MISSING_GRANT_OPTION_______ : FALSE
DATABASE______________________ :
SCHEMA_NAME___________________ : HDI_DB_1
OBJECT_NAME___________________ : session
OBJECT_TYPE___________________ : LIBRARY

So it looks to me that the HDI user doesn't have access to execute the object? Any suggestions on what could be the issue (Running this on an HXE, SPS 04)

/MiB

Accepted Solutions (0)

Answers (1)

Answers (1)

Bruhn
Explorer
0 Kudos

After adding a function that uses the library - problem was solved. I can call the new function and also call the library function underneath it in an anonymous block from the DB Explorer

Not knowing if that was the root cause - I don't know - problem solved...