SSIS 2005:“将行追加到目标表”是灰色的。为什么?
在 SQL Server 2005 导入数据 (SSIS) 中,我的愿望是导入一个文本文件并将其附加到现有表中。第一次通过向导的“列映射”步骤时,我发誓已启用将行附加到目标表单选按钮。但是,现在它已被禁用(灰色),甚至重新启动向导也不会导致它重新启用。
难道有什么我不知道的秘密/魔法吗?如何重新启用该选项以便我可以追加(而不是创建目标表)?
In SQL Server 2005, Import Data (SSIS), my desire is to import a text file and have it append to an existing table. The first time through the wizard on the Column Mappings step I swear the Append rows to the destination table radio button was enabled. But, now, it's disabled (grey) and even re-starting the wizard won't cause it to re-enable.
Is there some secret/magic I don't know about? How do I get that option to re-enable so that I can append (rather than Create destination table)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我知道你错过了什么……因为我也曾经错过过!
从屏幕上,“选择源表和视图”,
右侧有一个“目的地”下拉菜单。
从此下拉列表中选择您的表格,
然后单击“编辑映射”按钮。
现在追加选项将被启用!
I know what you're missing... because I once missed it too!
From the screen, "Select Source Tables and Views",
there is a "destination" drop-down menu on the right side.
Select your table from this drop-down,
then click on the "Edit Mappings" button.
Now the append option will be enabled!
根据我的经验,如果您要导入的表在您执行“SSIS 导入和导出向导”时不存在,则您将无法选择“追加”;如果在您执行向导时该表确实存在,则该选项可用。
如果您选择“创建表”选项,则向导仅使用执行 SQL 任务构建 SSIS 包,该任务在加载数据的数据流之前构建表。因此,您始终可以删除生成的包中的任务,并且默认情况下您将获得“追加”。
In my experience, if the table you're importing into doesn't exist at the time you're going through the "SSIS Import and Export Wizard", you won't have the option to Append; if the table does exist at the time you're going through the wizard, the option is available.
If you do choose the "Create table" option, the wizard just builds the SSIS package with an Execute SQL task that builds the table prior to the data flow that loads the data. So, you can always just remove the task in the resulting package and you'll get "Append" by default.
表的名称前面必须带有架构名称(“dbo.”)。否则向导在我的情况下找不到它。
The name of the table must be preceded with schema name ("dbo."). Otherwise the wizard didn't find it in my case.
拥有该选项的技巧是从 SSMS 打开它,右键单击数据库,然后选择导出数据。当我这样打开它时,它并没有变灰。
The trick to have that option is to open it from SSMS, right click on the database then choose export data. It was not grayed out when I opened it that way.