I am attempting to import Postgresql tables into SQL Server via the import wizard. I can get everything to work except timestamp columns for which I'm getting the following overflow error:
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: "The fractional part of the provided time value overflows the scale of the corresponding SQL Server parameter or column. Increase bScale in DBPARAMBINDINFO or column scale to correct this error.". (SQL Server Import and Export Wizard) Error 0xc020901c: Data Flow Task 1: There was an error with Destination - cst_audit_admin.Inputs[Destination Input].Columns[audit_time] on Destination - cst_audit_admin.Inputs[Destination Input]. The column status returned was: "Conversion failed because the data value overflowed the specified type.". (SQL Server Import and Export Wizard)
I've set the destination column to datetime2 with a precision of 7 but I still get the same error. When I preview the data though, the datetime column shows in this format:
10/7/2009 9:54:12 PM
The actual timestamp in Postgres is:
How can I get the import wizard to format this timestamp correctly?