Skip to Content
author's profile photo Former Member
Former Member

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

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?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on May 06, 2014 at 05:28 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 06, 2014 at 08:53 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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)

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.