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

SQL Statement GRANT <role> failed

Hi!

We need to create users and assign them a created role.

This is our SQL Statement:

CREATE USER DEV1 PASSWORD My_Password;

GRANT ROLE_READ TO DEV1;

After executing we receive an error:

SAP DBTech JDBC: [334]: invalid user privilege: ROLE_READ

Granting a predefined role, for example MODELING, works. But not our own specified role. We are logged in as the system user. Any ideas?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Jan 07, 2013 at 09:44 AM

    Could you show us the exact DDL statement you used to create your role?

    If you e.g. did something like this:

    CREATE ROLE "role_read";

    Then the role name is stored in lower case and can only be referred to in lower case:

    grant "role_read" to <...>;


    However, for your convenience I'd propose to re-create the role without the quotation marks (" ") around the role name.

    HANA will automatically convert the name to upper case then.

    - Lars

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 07, 2013 at 09:48 AM

    Thank you 😊 Adding quotation marks fixed it.

    Add a comment
    10|10000 characters needed characters exceeded

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.