需要哪些数据库用户权限?
仅供参考:SQL Server 2005
我有一个数据库用户帐户 (user_web),它能够连接到我的数据库并在其中运行查询和存储过程。具体来说,我为用户授予了 db_datareader 和 db_datawriter 角色,并授予他们对其需要能够运行的特定存储过程的执行权限。
在其中一个存储过程中,我需要禁用触发器,然后在完成一些特定编辑后重新启用它。当我尝试与用户一起运行该存储过程时,出现以下错误:
Cannot find the object "TableName" because it does not exist or you do not have permissions.
TableName
是我尝试禁用和启用触发器的表。我的问题是我可以授予我的用户帐户以允许其成功运行存储过程的最少权限是多少。
FYI: SQL Server 2005
I have a database user account (user_web) that has the ability to connect to and run queries and stored procedures in my database. Specifically, I have given the user the db_datareader
and db_datawriter
roles as well as granted them execute permission on the specific stored procedures it needs to be able to run.
In one of the stored procedures, I need to disable a trigger then re-enable it after some specific edits are done. When I attempt to run that stored procedure with the user I get the following error:
Cannot find the object "TableName" because it does not exist or you do not have permissions.
TableName
is the table where I am attempting to disable and enable the trigger. My question is what is the least amount of permissions I can give to my user account that will allow it to successfully run the stored procedure.
用户“至少”需要对相关表的
ALTER
权限。请参阅:http://technet.microsoft.com/en-us/library/ ms182706.aspxThe user will "at a minimum" require
ALTER
permissions on the table in question. See: http://technet.microsoft.com/en-us/library/ms182706.aspx