Re: SQL 2000 Granting rights to truncate a table through stored procedure to a database user Not in any other system role



From the SQL Server 2000 Books Online:

<Excerpt href="\tsqlref.chm::/ts_ta-tz_2hk5.htm">

TRUNCATE TABLE permissions default to the table owner, members of the
sysadmin fixed server role, and the db_owner and db_ddladmin fixed database
roles, and are not transferable.

</Excerpt>

Consequently, non-privileged users cannot use TRUNCATE in SQL 2000 - you'll
need to use DELETE instead. You have more options in SQL 2005 (e.g. EXECUTE
AS).

--
Hope this helps.

Dan Guzman
SQL Server MVP

"Randy Cohn" <rcohn@xxxxxxxxxxxxxxx> wrote in message
news:uGwt29LlGHA.4888@xxxxxxxxxxxxxxxxxxxxxxx
I have the need to allow a user to truncate table through the execution of
a stored procedure.
Since this requires special rights/permissions typically dbo or another
system role how can this be accomplished with SQL 2000





.



Relevant Pages