cancel
Showing results for 
Search instead for 
Did you mean: 

OData problem: ERROR [SQL-258] insufficient privilege: Not authorized

Former Member
0 Kudos

Hi,

I want to simply access a sap hana table via a website and I use the OData service for this. My table is located in a custom NEO schema.

When I run my .xsodata file this page opens:

But when I want to access the table, I get an authorization error:

I already checked this Thread, but i couldnt find a solution there. Maybe you can help me .

Here you can see my project:

Those are the files:

xsaccess:

{

     "exposed" : true, 

                 

     "authentication" :                                           

            {

               "method": "Form"  

            },

 

     "cache_control" : "must-revalidate",

     "cors" :                     

            {

             "enabled" : false

            },

                    

     "enable_etags" : false,

     "force_ssl" : false,

    

     "prevent_xsrf" : true

}

xsodata:

service {

"NEO_85J1WXTGGKNE5N9SVH1UNPDYI"."PRODUCT" as "Adressen"; }

model_access.hdbrole:

role s0015309874trial.xstestin.Gpack.geotabelle::model_access {

  catalog schema "NEO_85J1WXTGGKNE5N9SVH1UNPDYI": SELECT, UPDATE, INSERT, DELETE;

}

Thank you in advance,

Leon

Accepted Solutions (1)

Accepted Solutions (1)

pfefferf
Active Contributor
0 Kudos

Hello Leon,

was the grant of the role to your S-User using the grant procedure successful?

Regards,

Florian

PS: As you are using the shared HANA instance on the HCP trial, you should consider the latest release notes () which recommend to switch to the MDC approach because of the shared instance retirement (otherwise potentially your work is lost at a specfic point of time).

Former Member
0 Kudos

Hi Florian,

I executed the HCP succesfully and now it works!

I assume that I can still work with the XS engine when using the MDC approach(?)

One more question: How should my xsaccess file look if I want no authentication method?

Very nice support from you, thanks a lot !!!

pfefferf
Active Contributor
0 Kudos

Hello Leon,

yes, the current MDC offering brings you a SPS10 tenant db with a XS Classic.

Regarding the "not authentication method", you have to set the "Public (No Authorization Required)" option in the XS Admin Tool for project/package you wanna allow that. The XS Admin Tool can be reached using URL https://<your host>/sap/hana/xs/admin.

Regards,

Florian

Former Member
0 Kudos

Hi Florian,

the problem with the MDC approach is, that the database is stopped after a few hours on trail account and you have to reactivated it manually.

So I would like to stay with the shared instance as long as possible.

When I try to access the xs admin tool, a username and pw is prompted. When I use my HCP user data, it wont work. I assume that I have to login with my DB or the System User. But on the xs shared instance, I never created a DB User. With SELECT CURRENT_USER FROM DUMMY; I can find out my db username, but I have no idea where to find the passwort. Is there a special hint that you can give me?

Thank you again in advance,

Leon

pfefferf
Active Contributor
0 Kudos

On the shared instance you do not have access to the XS Admin tool, because the generated user is not granted to execute the application.

Former Member
0 Kudos

Hello,

first of all, if someone with a trail account wants to access the XS admin tool while using the MDC, his SYSTEM user should add all sap.xs.admin roles to his User.

But then, the settings in the xs admin tools are not enough to use no authentication for your OData.

You need to change the xsaccess file and create an xssqlcc file, like in this Thread.

I hope this may help someone else, greetz!

Answers (0)