0


Я пытаюсь экспортировать данные с одного SQL-сервера на другой. У меня есть около 12 столов, среди которых 11 успешно экспортируемые однако имеющий проблемы в одной таблице, то есть 2 колонки, как DateTime при экспорте я получаю это исключение:Недействительный формат даты при использовании мастера экспорта SQL-сервера

- Copying to [dbo].[ClaimDetails] (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: "Invalid date format". 
(SQL Server Import and Export Wizard) 

Error 0xc020901c: Data Flow Task 1: There was an error with Destination -  ClaimDetails.Inputs[Destination Input].Columns[Entrydate] on Destination - ClaimDetails.Inputs[Destination Input]. The column status returned was: "Conversion failed because the data value overflowed the specified type.". 
(SQL Server Import and Export Wizard) 

Error 0xc0209029: Data Flow Task 1: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "Destination - ClaimDetails.Inputs[Destination Input]" failed because error code 0xC020907A occurred, and the error row disposition on "Destination - ClaimDetails.Inputs[Destination Input]" specifies failure on error. An error occurred on the specified object of the specified component. There may be error messages posted before this with more information about the failure. 
(SQL Server Import and Export Wizard) 

Error 0xc0047022: Data Flow Task 1: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Destination - ClaimDetails" (124) failed with error code 0xC0209029 while processing input "Destination Input" (137). The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. There may be error messages posted before this with more information about the failure. 
(SQL Server Import and Export Wizard) 

Error 0xc02020c4: Data Flow Task 1: The attempt to add a row to the Data Flow task buffer failed with error code 0xC0047020. 
(SQL Server Import and Export Wizard) 

Error 0xc0047038: Data Flow Task 1: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on Source - ClaimDetails returned error code 0xC02020C4. 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) 

Он успешно копирует около 4025 строк и у меня есть около 21794 строк, поэтому его немного трудно вручную посмотреть на каждой строке, поэтому я попытался запустить

SELECT 
    * 
FROM 
    ClaimDetails 
WHERE 
    ISDATE(ActualDate) = 0 

на обоих полях, но он не показывает строку, поэтому, пожалуйста, дайте мне знать, что я могу сделать.

Поля даты Формат выглядеть так Date fields format look like this

Благодарности

ответ

0

Вы должны установить DateFormat первым. Глядя на ваши записи, это должно быть ymd.

SET DATEFORMAT ymd; 

SELECT * 
FROM ClaimDetails 
WHERE ISDATE(ActualDate) = 0 
+0

Я пробовал это, но то же самое, строки не отображаются – mark

+0

Может быть, вам также необходимо установить формат даты для базы данных назначения. –

+0

Я не обрабатываю данные через этот запрос, однако должен ли я создавать базу данных с одинаковыми столбцами с одинаковыми типами, а затем пытаться экспортировать? – mark