gpt4 book ai didi

ssis - 由于目标表的架构更改,批量插入失败

转载 作者:行者123 更新时间:2023-12-04 14:52:29 25 4
gpt4 key购买 nike

select
FiscalMonthID = (select FiscalMonthID from CurrentFiscalMonth (nolock)),
T.OrgKey,
DataSourceKey = 26,
OrganizationTypeKey = 2,
SourceSystemID = MAX(T.MbsId),
WEGFlag = convert(bit,0),
D.CreateDT,
D.CreateBy,
D.UpdateDT,
D.UpdateBy

from WorkDB.dbo.TempMbsOrgMap (nolock) as T
join WorkDB.dbo.MBSOrganization_Denorm2 (nolock) as D
on T.MbsId = D.OrganizationID
--where OrgKey not in (select OrgKey from OrgMap where FiscalMonthID=258 and DataSourceKey=26 and OrganizationTypeKey=2)
group by
T.OrgKey,
D.CreateDT,
D.CreateBy,
D.UpdateDT,
D.UpdateBy

最佳答案

我不知道这个人是否解决了问题。如果其他人遇到此错误,到目前为止我发现的最有用的文章是: https://learn.microsoft.com/en-us/archive/blogs/sqlserverfaq/executing-bcp-fails-with-sqlstate-37000-nativeerror-4891-error-microsoftodbc-sql-server-driversql-serverinsert-bulk-failed-due-to-a-schema-change-of-the-target-table

文章中的建议(尽管整篇文章都值得一读)如下:

Below is some of the action plan you can try, this helped in my casethough.

  1. Drop the Constraints before the BCP run and recreate them after therun

  2. Disable the Auto update stats (To isolate the issue)

  3. Check if any parallel index rebuilds happening.

If still the issue persists after implementing the above change,collect the Profiler trace to capture the activity when bcp is failingto further investigation.

关于ssis - 由于目标表的架构更改,批量插入失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4907070/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com