Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Truncate table permissions

What are min permission we need to truncate table ? Apart from DDLAdmin. And what is best pratice to give permission to the user to truncate the user on SQL 2008 R2

like image 222
user171523 Avatar asked Feb 25 '23 03:02

user171523


1 Answers

Truncate table documentation at books online here

Permissions

The minimum permission required is ALTER on table_name. 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. However, you can incorporate the TRUNCATE TABLE statement within a module, such as a stored procedure, and grant appropriate permissions to the module using the EXECUTE AS clause. For more information, see Using EXECUTE AS to Create Custom Permission Sets.

like image 114
Phil Murray Avatar answered Mar 08 '23 10:03

Phil Murray