截断表格的权限 [英] Permissions for truncating a table

查看:79
本文介绍了截断表格的权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在MSSQL中,我需要授予用户什么权限才能截断表?

What permission do I need to GRANT a user, in MSSQL, in order to be able to truncate a table?

我正在尝试授予最小集合权限,但我不能使用DELETE,因为表非常大,并且我希望操作能很快。

I'm trying to grant the minimal set of permissions, but I can't use DELETE, because the table is very large, and I want the operation to be quick.

推荐答案

您需要ALTER权限:请参见权限部分这里

You need the ALTER permission: see the Permissions section here.

请注意,您还可以将存储过程与EXECUTE AS一起使用,因此甚至不需要授予运行该存储过程的用户以更改权限。

Note that you can also use a stored procedure with EXECUTE AS, so that the user running the stored procedure does not need to even be granted the ALTER permission.

这篇关于截断表格的权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆