Hi,
I have created a Odata service on Sys.Users view to expose the User details as a Service. I need to enhance the service to perform CUD (Create, Update and Delete) operations. For this, I'm using the Odata Exit features where I call different stored procedures for respective operations.
In the procedure, I would like to use Access Control Statements - Create User, ALTER User and DROP User. But the system doesn't suggest these keywords inside the Procedure.
Could you please suggest if my approach is correct ? If so, why is it the system not allowing to use these keywords. I tried using ALTER User and the error says - 'Alter is incorrect or misplaced'.
Any suggestions ?
Regards,
Naresh
Show your code. We cannot guess what is wrong with it...
Hi Naresh ,
I think it is related to dynamic sql.
You cannot write plain vanilla create,alter or other DDL statements in sql script.
Please search for dynamic sql in hana you will have n number of threads for these.
have a look at these thread, it might help you.
http://www.hdespot.com/2015/05/01/how-to-perform-mass-user-creation-role-assignment/
-
Pratik
Add a comment