I am trying to export the data form one server to another server. I have used custom SQL to fetch data and created a table at destination:
SELECT [Vantive OrgID]= end_user_vantive_id, [City]= end_user_city,
[State]= end_user_state, [Postal]= end_user_postal_code, [Country] = end_user_country,
[Area]= st_area, [Region]= st_region, [Territory]= st_territory,
[Geo]= st_geo, [Sales Order Number]= sales_order_number,
[Date]= order_date, [Year]= year_num, [Month]= month_num,
[Quarter]= datepart(q,order_date),
FROM scaall.vf_bookings WITH (NOLOCK)
WHERE ISNUMERIC(sales_order_number) = 1 and order_date >= '1/1/15';
Very few data got copied and thrown below error message.
Copying to [dbo].[SCASalesOrderExport_20180907] (Error) Messages Error 0xc0202009: Data Flow Task 1: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "Protocol error in TDS stream". An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "Protocol error in TDS stream". An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "Protocol error in TDS stream". An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "Communication link failure". An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "TCP Provider: An existing connection was forcibly closed by the remote host. ". (SQL Server Import and Export Wizard)
Error 0xc0047038: Data Flow Task 1: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on Source - Query returned error code 0xC0202009. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure. (SQL Server Import and Export Wizard)
,
before theFROM
valid in SQL Server? – halfer