on 2021 Mar 25 6:20 AM
Hello All,
We have SAP CAP application which deploys the SAP HDI artifacts. We have problem when trying to drop a table, view and procedure directly from the table.
I have referred the Thomas Jung suggestion to create role (HDI_ADMIN, HDI_GROUP_ADMIN, etc.,) in SAP Hana cloud cockpit and using that I can access (select, update, alter, etc.,) the table, schema, view from the container with grand option for the different role. But when i try to drop a table from the schema I'm getting the error message saying that Insufficient Privilege to drop a table (tried with all the role like HDI_ADMIN, etc.,).
I have created a .hdbrole file also in my CAP app. but still i couldn't delete or drop the table. Even if we are removing the table from the CAP app cds file during the development also it is not deleting the table from the HDI schema.
I have also referred existing SAP question and created a undeploy.json file and configured package.json file in my CAP Project. but still I couldn't delete the table or view from my HDI schema. I'm not sure whether i did something wrong in the undeploy.json configuration.
As of now to delete the table we are suppose to undeploy the entire hdi-container or hdi-container service from the cloud foundry using cf delete-services command.
Questions:
1. Is it possible to delete or drop a table or schema in the container directly from the Hana cloud cockpit by executing some SQL query. As mentioned i tried the same but getting insufficient privilege.
2. Is it possible to delete or drop a table by doing some configuration (ex : undeploy.json) from the SAP CAP app.
Or please help me to drop a table, view or a procedure using standard way. I have also attached my CAP app folder configuration and undeploy.json , package.json, .hdb role file contents.
undeploy.json :
[
"src/my.bookshop.author.hdbtable"
]
Package.json :
{
"name": "deploy",
"dependencies": {
"@sap/hdi-deploy": "^4"
},
"scripts": {
"start": "node node_modules/@sap/hdi-deploy/deploy.js --auto-undeploy"
}
}
Note : I tried to add the "drop" privilege in hdbrole file. but i got a error saying that drop value is not accepted during the deployment.
I did manage to do it, but it was a long process (many steps). I had done it over a year ago, and do have documentation around it. I also used the below link.
If you want the full details of what was done, attach your email address and i'll send u the document i created.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
70 | |
10 | |
10 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.