December 1, 2009 at 10:52 pm
Hi,
I have a stored procedure on a sever where i have only execute permission of the proc. I am using a dynamic query which i execute using EXEC command. The dyanmic query will either be an insert or an update based on condition.
When i execute the proce, i get an error stating Insert Permisson not avaiable. Due to some constraints i may not be able to obtain the Insert permission on the table. Is there an alternate method to avoid this but still using the dynamic insert\update.
December 2, 2009 at 6:15 am
There are a couple of different ways to handle this. You can use an Execute As statement to impersonate a user or you can sign a procedure with a certificate. See this article by Erland Sommarskog that explains the differences and how to use them
http://www.sommarskog.se/grantperm.html#Certificates
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply