August 16, 2006 at 9:42 am
I have some stored procedures that have TRUNCATE TABLE XXXX before it INSERTS new data into the table. For instance a table to populate a combobox. I want the user to be able to see the items in the combobox based on selecting other criteria, but I don't want standard users to have db_owner or db_ddladmin fixed database roles. I also prefer not to use DELETE because it doesn't need to be logged, etc. Is there a way to let the standard user run this sp that has a TRUNCATE TABLE statement like you can in SQL Server 2005 by using the new EXECUTE AS clause.
August 17, 2006 at 7:29 am
why not just grant permission just to the specific procedure, instead of a role that has too many rights?
grant execute on pr_truncate_table to webdev
Lowell
August 17, 2006 at 1:16 pm
Lowell, I don't think you can grant permission to TRUNCATE TABLE if we're talking SQL 2000 with SP3 or higher, due to security changes.
August 21, 2006 at 5:24 am
Thanks guys. I just finally gave up and used the DELETE statement.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply