cancel
Showing results for 
Search instead for 
Did you mean: 

Privileges for SQLScript execution

Former Member
0 Kudos

Hi all,

i started with the 30 day trial of SAP HANA from cloudshare.

What i want to do is performing some table operations with the help of SQLscript.

So i created a new user, a new schema and two tables with data.

But when i try to activate my procedure after commiting, i get the following error:

"

Error creating procedure;insufficient privilege: Not authorized at ptime/query/checker/query_check.cc:2225

"

I read all the HANA documentation, but could not find the right way to set all required privileges.

So here is my question:

What i need to do to be able to execute procedures on my tables?

Thanks very much for your help.

Regards

Adam

Accepted Solutions (1)

Accepted Solutions (1)

former_member182302
Active Contributor
0 Kudos

First i hope that you have already executed this statement:

GRANT SELECT ON SCHEMA <YOURSCHEMA> TO _SYS_REPO WITH GRANT OPTION

Then check if you are able to activate the procedure?

Are you creating a procedure from development perspective i.e using .hdbprocedure or from modeler perspective under catalog?

Regards,

Krishna Tangudu

Former Member
0 Kudos

Hi Krishna Tangudu,

thanks for the fast reply. When i try your statement i got the error:

"SAP DBTech JDBC: [258]: insufficient privilege: Not authorized "

I'm logged in as the SYSTEM user.

My procedure was developed in the development perspective of the HANA Studio.

Kind Regards,

Adam

former_member182302
Active Contributor
0 Kudos

You got the error when you are trying to give access to your schema to the _SYS_REPO user like i mentioned?

Former Member
0 Kudos

yes exactly.

patrickbachmann
Active Contributor
0 Kudos

Can you try running the grant option while being connected with the schema owners ID.  ie: you said you created a new user and new schema.  I'm assuming that's the owner.  That owner should be allowed to give access to _SYS_REPO.  But of course this assumes the user has USER_ADMIN privileges.

former_member182302
Active Contributor
0 Kudos

It means the user you are trying to execute this statement doesn't have access on the schema.

This statement should be executed from the user who has created/ has access to this schema.

Please execute the statement from that user.

Former Member
0 Kudos

ok it finally works!

the USER_ADMIN privileges was an important point,

i just needed to understand additionally that you need to grant access on the tables and procedures, too. It was not enough just to grant access on the schema, the execution privilege was missing.

Thanks a lot for your help.

former_member182302
Active Contributor
0 Kudos

Hi Patrick,

Giving the user "USER_ADMIN" privilege, will also give him the access to create new user's isn't it? If so it should be avoided right?

Regards,

Krishna Tangudu

patrickbachmann
Active Contributor
0 Kudos

Excellent, glad to help!

-Patrick

Answers (0)