cancel
Showing results for 
Search instead for 
Did you mean: 

How to create analytic privileges from sql command line in hana studio?

Former Member
0 Kudos

I want to create a bunch of analytic privileges, activate them and assign it a roles. I was wondering if there is a method where I can create these analytical privileges directly from sql?

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member182302
Active Contributor
0 Kudos

You can create using CREATE STRUCTURED PRIVILEGE

Wondering what was the use case you are dealing with? Why do you want to use hdbsql to create analytic privileges?

Regards,

Krishna Tangudu

Former Member
0 Kudos

Hi Krishna,

Thanks for the reply.

The use case is to create a bulk analytical privileges on the pre-existing analytical or calculation views and I'm failing to create it using the simple CREATE STRUCTURED PRIVILEGE.

The security guide shows below mentioned as the syntax but I'm failing to create it through that:


CREATE STRUCTURED PRIVILEGE AP_SALES_1 FOR SELECT ON TABLEOWNER.VIEW_SALES WHERE REGION IN ('DE','UK') OR PRODUCT = 'CAR';

It gives me this error -

SAP DBTech JDBC: [257] (at 44): sql syntax error: incorrect syntax near "FOR": line 1 col 44 (at pos 44)

Former Member
0 Kudos

hello,

As per my info, you sure can assign analytic privileges to roles using SQL; however for creating those you still will have to follow the regular way of creating it manually, though GUI.

PFB link which might be of some help:

http://help.sap.com/openSAP/HANA1/openSAP_HANA1_Week_02_Unit_09_Analytic_Privileges_Presentation.pdf

Thanks,

Richa