How do I similate SQL Server 2005s "EXECUTE AS" clause in SQL Server 2000

  • 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.

  • 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


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • 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.

  • 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