當使用SSIS從源表中加載數據的時候,我們有一個使用的「表或視圖 - 快速加載」數據訪問模式下一個OLE DB目標(它使用BULK INSERT做這項工作)。當我們試圖執行任務,我們得到了一個非常奇怪的錯誤消息:錯誤在SSIS數據流使用快速加載
Error: 4804, Severity: 17, State: 1 While reading current row from host, a premature end-of-message was encountered--an incoming data stream was interrupted when the server expected to see more data. The host program may have terminated. Ensure that you are using a supported client application programming interface (API).
的錯誤似乎表明有某種在輸入數據損壞的,但我們已經擦洗源數據和一切看起來不錯。如果我們改變了數據訪問模式「表或視圖」(使用光標做填充物),每行沒有任何錯誤增加。
表定義:
CREATE TABLE [dbo].[CUST](
[CUST_FIRST_NM] [varchar](50) NOT NULL,
[CUST_MIDL_INIT] [char](1) NULL,
[CUST_LAST_NM] [varchar](50) NOT NULL,
[CUST_EMAIL_ADDR] [varchar](100) NULL,
[CUST_TELE_PHONE_NBR] [int] NULL,
[CUST_TELE_CNTRY_CD] [smallint] NULL,
[CUST_TELE_AREA_CD] [smallint] NULL,
[LAST_UPD_DTTM] [datetime] NOT NULL,
[CUST_ID] [bigint] IDENTITY(1,1) NOT NULL,
[CUST_CD] AS ('PUB'+right(CONVERT([varchar](max),CONVERT([varbinary],[CUST_ID],0),(1)),(7))),
CONSTRAINT [XPKCUST] PRIMARY KEY CLUSTERED
(
[CUST_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
任何想法可能會導致這個錯誤?