on 10-08-2015 8:48 AM
Hi
I created a view "USERSEARCHWITHNODE" which I can access through the following code:
var conn = $.hdb.getConnection();
var result;
var query;
query = 'SELECT * FROM "API"."USERSEARCHWITHNODE" ';
result=conn.executeQuery(query);
return result;
Everything runs quite fine until a colleague of mine tried to call the url to the service.
He got the following error:
Failed to execute action: Error: $.hdb.Connection.executeQuery: SQL error. NR: 258, ERROR: insufficient privilege: Not authorized
Is there a way to use a view even if you didn't create it yourself?
Hi Marc,
Either you give each account the corresponding privilege, or if you don't want to create an account for each user, you might use an "anonymous database user".
This enables you to route all service calls for your project via this anonymous user.
What is described here: worked for me..
Best regards,
Daniel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Daniel,
I tried to get it running with an xssqlcc but the same error occurred. Maybe i didn't get the privileges right. Which privileges does my role need exactly?
Kind regards,
Marc
//EDIT
Nevermind I gave the sqlcc the Username SYSTEM. Now I switched it to to my own User Account. Is there any reason why that is even necessary? Why is it impossible to use the view as SYSTEM user?
Hm, if you created the view via SQL, it might happen that the SYSTEM User does not get the proper privleges (not sure on this fact, but I had this issue once). But it surely will work, if you create your view using the modeler.
Did you create it using SQL or did you use the View Modeler?
Best regards,
Daniel
Hello,
Please look at the SAP HANA Developer Guide For SAP HANA Studio.
Tutorial: Use the XSJS Outbound API
The application package you put together in this tutorial includes all the artifacts you need to enable your server-side JavaScript application to use the Outbound Connectivity API to request and obtain data via HTTP from a service running on a remote host.Prerequisites
Since the artifacts required to get the JavaScript application up and running are stored in the repository, it is assumed that you have already performed the following tasks:
●Create a development workspace in the SAP HANA repository
●Create a project in the workspace
●Share the new project
●The HTTPDestViewer SAP HANA user role
Best Regards,
Erick Ilarraza
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Whait is your HANA revision?
Best Regards,
Erick Ilarraza
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.