on 07-10-2017 4:33 PM
Hello everyone,
I am experiencing the most common error but I am not able to understand why I am falling into that.
Maybe I am missing a very simple point, but here's the scenario:
I have a Node.js module running in an HANA 2.0SPS01 application which is connecting to an external - non HANA - OData Service, loads the metadata for specific entities and tries to create table(s) on the fly which reflect the structure of the requested entities.
After that, it loads data from the service and stores fetched data inside table(s) created in step 1.
For that, I am using the "normal" sap-hdbext standard module providing DDL statements to create the tables I need.
Notice that I am using the hdb-ext middleware, to have the hdb module injected and available to each request.
// Setup HDB Client:
app.use(xsHdb.middleware(xsEnv.getServices({
hana: process.env.HANA_SERVICE_NAME || {
tag: "hana"
}
}).hana));
However, everytime I invoke the db.exec() method by providing the DDL statement (which is something like CREATE TABLE "<Context>.<TableName>" (<Columns>)...) I always receive a "Insufficient privileges: Unauthorized" error.
The schema name is not specified, as it's determination is part of the hdb-ext module loading, as well as the connection to the database which is automatically created by the module using the HDI container technical user.
What could be the reason of the authorization issue? The client is perfectly able to execute DML statements, but no DDL ones.
Is there something I am missing/forgetting while working with HDI containers?
Thanks,
Roberto.
Hello Roberto:
I wonder if you need to add a create table privilege to your hdbrole. Step 9 of this tutorial, https://www.sap.com/developer/tutorials/xsa-hdi-module.html, might be of help.
Regards,
Carl
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.