What permission do I need to use SqlBulkCopy in SQL Server 2008?(在 SQL Server 2008 中使用 SqlBulkCopy 需要什么权限?)
问题描述
使用 .NET 的 SqlBulkCopy,我需要在 SQL Server 2008 中向用户授予什么权限?
Using .NET's SqlBulkCopy, what permission do I need to give to the user in SQL Server 2008?
推荐答案
http://msdn.microsoft.com/en-us/library/ms162802.aspx
bcp out 操作需要源表的 SELECT 权限.
A bcp out operation requires SELECT permission on the source table.
bcp in 操作至少需要目标表的 SELECT/INSERT 权限.此外,如果满足以下任一条件,则需要 ALTER TABLE 权限:
A bcp in operation minimally requires SELECT/INSERT permissions on the target table. In addition, ALTER TABLE permission is required if any of the following is true:
存在约束且未指定 CHECK_CONSTRAINTS 提示.ms162802.note(zh-cn,SQL.100).gif注意:禁用约束是默认行为.要显式启用约束,请使用带有 CHECK_CONSTRAINTS 提示的 -h 选项.
Constraints exist and the CHECK_CONSTRAINTS hint is not specified. ms162802.note(en-us,SQL.100).gifNote: Disabling constraints is the default behavior. To enable constraints explicitly, use the -h option with the CHECK_CONSTRAINTS hint.
存在触发器且未指定 FIRE_TRIGGER 提示.ms162802.note(zh-cn,SQL.100).gif注意:默认情况下,不会触发触发器.要显式触发触发器,请使用带有 FIRE_TRIGGERS 提示的 -h 选项.
Triggers exist and the FIRE_TRIGGER hint is not specified. ms162802.note(en-us,SQL.100).gifNote: By default, triggers are not fired. To fire triggers explicitly, use the -h option with the FIRE_TRIGGERS hint.
您使用 -E 选项从数据文件中导入标识值.
You use the -E option to import identity values from a data file.
注意:要求目标表的 ALTER TABLE 权限是 SQL Server 2005 中的新要求.如果用户帐户缺少目标表的 ALTER 表权限,这一新要求可能会导致不强制执行触发器和约束检查的 bcp 脚本失败.
Note: Requiring ALTER TABLE permission on the target table was new in SQL Server 2005. This new requirement might cause bcp scripts that do not enforce triggers and constraint checks to fail if the user account lacks ALTER table permissions for the target table.
这篇关于在 SQL Server 2008 中使用 SqlBulkCopy 需要什么权限?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在 SQL Server 2008 中使用 SqlBulkCopy 需要什么权限?
基础教程推荐
- 禁止输入少量字符,例如'<'、'&a 2022-01-01
- 当值可以是对象或空数组时反序列化 JSON 2022-01-01
- 如何使用 .Net 检查 Active Directory 服务器是否已启动并正在运行? 2022-01-01
- WPF 模态进度窗口 2022-01-01
- Moq It.Is<>不匹配 2022-01-01
- 我应该在后面的代码中直接使用 Linq To SQL 还是使 2022-01-01
- 如果有人提交恶意软件Nuget包怎么办? 2022-01-01
- Azure Functions:CosmosDBTrigger 未在 Visual Studio 中触发 2022-01-01
- .NET SerialPort DataReceived 事件未触发 2022-01-01
- C# 从 List<List<int>> 中删除重 2022-01-01
