cancel
Showing results for 
Search instead for 
Did you mean: 

Reposritory Schema access to _sys_repo

rakeshkumar_bhure
Participant
0 Kudos

Hi Experts,

We have created a schema(.hdbschema file) in repository. We have created few table(.hdbtable) and stored procedure(.hdbprocedure) pointing to same schema. When we are trying to execute any procedure we are getting below error.

   Could not execute 'call <schema_Name>.<Procedure_Name> ( )' in 7 ms 97 µs .

SAP DBTech JDBC: [258]: insufficient privilege: [258] <schema_Name>.<Procedure_Name>: line 8 col 2 (at pos 127): [258] (range 3) insufficient privilege exception: insufficient privilege: Not authorized

We are trying to assign select on schema to _SYS_REPO with grant option using SYSTEM user, but it is not able to assign, giving insufficient privilege error.

As suggested in below thread, we cannot login with schema name into HANA as this is only a schema. There is no user with the schema name.

Please help provide your valuable inputs how to resolve this issue.

Thanks

-Rakesh

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

You don't need to grant anything to _SYS_REPO.  _SYS_REPO is already the owner of the schema if you created via HDBSCHEMA. The problem is your user doesn't have access. You need to create a role via hdbrole which contains the access rights to these objects. You then assign this role to the users who need it.

rakeshkumar_bhure
Participant
0 Kudos

Hi Thomas,

I have created the schema via hdbschema so _sys_repo should have access to it but I cannot see it under Object Privileges tab for this user. I tried activating the hdbschema file many time but still the same issue.

When I created hdbrole, it got assigned to _sys_repo automatically. I tried executing procedure but got same authorisation error.

Issue here is that schema is not getting assigned automatically to _sys_repo.

I had tried to create an another new schema via hdbschema still this new schema did not get assigned to _sys_repo.

Message was edited by: Rakesh Kumar Bhure

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

You don't have to assign anything to _SYS_REPO.  That use owns all objects created via the repository.  Your not authorized error has nothing to do with _SYS_REPO.  The user you are logged in as needs the role you created assigned to it before it can access these objects.

rakeshkumar_bhure
Participant
0 Kudos

Hi Thomas,

We are missing the delete and insert access to this schema which we are doing in procedure. So this issue has been resolved.

But still if _SYS_REPO is owner of this schema, we should be able to see it Object Privileges tab for this user, but we was not. We was on SAP HANA 1.00.074.

We just upgraded our HANA to 1.00.097 few hours back and now we can this schema in Object Privileges tab for this user.

Should we conclude that in SAP HANA 1.00.074, it is not visible?

Thanks a lot for your input.

-Rakesh

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Rakesh,

Like Thomas mentioned, you have to create a .hdbrole file which which gives the access ( Development type of role, giving select, execute, insert etc access) on this schema.

And then assign this role to developers using

call “_SYS_REPO”.“GRANT_ACTIVATED_ROLE”(rolename,developer_id) .

Please refer developer guide on how to create the role and assign it to users .

~Tarun

Former Member
0 Kudos

are you the owner of schema? and have USER_ADMIN privileges to run the grant  option...