什么样的权限,我需要使用SqlBulkCopy的SQL Server 2008中? [英] What permission do I need to use SqlBulkCopy in SQL Server 2008?

查看:901
本文介绍了什么样的权限,我需要使用SqlBulkCopy的SQL Server 2008中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用.NET的SqlBulkCopy的,有什么权限,我需要给在SQL Server 2008中的用户?

Using .NET's SqlBulkCopy, what permission do I need to give to the user in SQL Server 2008?

推荐答案

<一个href="http://msdn.microsoft.com/en-us/library/ms162802.aspx">http://msdn.microsoft.com/en-us/library/ms162802.aspx

一个BCP出操作需要源表的SELECT权限。

A bcp out operation requires SELECT permission on the source table.

在操作的BCP至少需要对目标表的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(EN-US,SQL.100).gifNote: 禁用约束是默认行为。要明确地启用约束,使用与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(EN-US,SQL.100).gifNote: 默认情况下,触发器不会被触发。要明确火灾触发器,使用与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.

ms162802.note(EN-US,SQL.100).gifNote: 要求对目标表的ALTER TABLE权限是新的SQL Server 2005中这一新的要求,可能会导致不执行触发器和约束BCP脚本检查,如果用户帐户没有ALTER TABLE权限目标表失败。

ms162802.note(en-us,SQL.100).gifNote: 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.

这篇关于什么样的权限,我需要使用SqlBulkCopy的SQL Server 2008中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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