cancel
Showing results for 
Search instead for 
Did you mean: 

How can I add a role to my user

Former Member
0 Kudos

Hello.

I am doing the tutorial Creating an SAP HANA XS Application. In step 8 it says:

Productive SAP HANA instance

    1. In the Systems view, expand Start of the navigation path Security Next navigation step Users End of the navigation path and then double-click your user ID.
    2. On the Granted Roles tab, choose the + (Add)  button.
    3. Select the model_access role in the list and choose OK. The role is now listed on the  Granted Roles tab.

I have done so, but everything in my user is greyed out:

There is also no such role in the list, especially not a model_access role.

How do I get the rights to add a role to my own user?

Thank you in advance,

Robin

Accepted Solutions (1)

Accepted Solutions (1)

former_member185231
Active Participant
0 Kudos

Hi Robin,

see here, for trial landscape it says following:


  • Trial SAP HANA instance
    1. In the Systems view, select your system and from the context menu choose SQL Console.
    2. In the SQL console, enter the following, replacing <SAP HANA Cloud user> with your user:

      call "HCP"."HCP_GRANT_ROLE_TO_USER"('i12345trial.myhanaxs.hello::model_access', '<SAP HANA Cloud user>')

    3. Execute the procedure. You should see a confirmation that the statement was successfully executed.

I hope this will help you,

Dobri

Former Member
0 Kudos

Hi Dobri,

Thank you very much for your reply. I did this. Let's assume, <d-user> is my d-username. I have executed:

"HCP"."HCP_GRANT_ROLE_TO_USER"('<d-user>trial.myhanaxs.hello::model_access', '<d-user>TRIAL')

I have also tried writing the latter <d-user> with big letters or completely (including th Trial) with small letters.

I could also see the confirmation that the Statement was successfully executed:

Statement 'call "HCP"."HCP_GRANT_ROLE_TO_USER"('<d-user>trial.myhanaxs.hello::model_access', '<d-user>TRIAL')'

successfully executed in 8.897 seconds  (server processing time: 8.891 seconds) - Rows Affected: 0

So far I have followed each step of the tutorial. But it seems that I have not the rights to modify my user from the Studio in the Cloud.

Regards,

Robin

former_member185231
Active Participant
0 Kudos

Ops, you did a mistake to add the role not to the user, but to the account:


"HCP"."HCP_GRANT_ROLE_TO_USER"('<d-user>trial.myhanaxs.hello::model_access', '<d-user>TRIAL')

You should change this to your user instead - something like:

"HCP"."HCP_GRANT_ROLE_TO_USER"('<d-user>trial.myhanaxs.hello::model_access', '<d-user>')

Best regards,

Dobri

Former Member
0 Kudos

Hi Dobri,

thank you very much. I was wondering anyway, which user to add here. But the result is the same, even with my real username. I cannot modify that one, also.

Do you have any further idea?

Regards,

Robin

former_member185231
Active Participant
0 Kudos

Are you sure you grant permissions to the right package?

Check the package - in above example it is:

<d-user>trial.myhanaxs.hello

probably in your case it is different.

Look inside which package is located file model_access.hdbrole

And use the package in the HCP_GRANT_ROLE_TO_USER function call.

Former Member
0 Kudos

Hi Dobri,

Thank you for the hint. The model_acces.hdbrole file is definitely located at <d-user>Trial.myhanaxs.hello.

Regards,

Robin

former_member185231
Active Participant
0 Kudos

Robin,

did you test your application (step 10)?

As you did everything as it should be done, then my expectations are that your application is working now.

Best regards,

Dobri

Small remark - "trial" should be always in small letters - in package name and in account name.

Former Member
0 Kudos

Hi Dobri,

my application is working, yes. Does that mean that step 8 succeeded?

Regards,

Robin

former_member185231
Active Participant
0 Kudos

Yes, congrats 🙂

Former Member
0 Kudos

A cool, thank you very much

Answers (0)