Perdida de milisegundos al migrar datos de sql server a postgresql
Publicado por fredy (1 intervención) el 02/10/2017 20:13:05
Al migrar los datos de SQL Server (datetime2(4)) a PostgreSQL (timestamp(4) with timezone) hay perdida de milisegundos.
Ejemplo:
DateTime2(4): SQL Server
----------------------------------------------------------
2017-03-30 15:10:15.1234
----------------------------------------------------------
Timestamp(4) With Time Zone: PostgreSQL
----------------------------------------------------------
2017-03-30 15:10:15.123
----------------------------------------------------------
Estoy usando el Componente TFDDataMove de Delphi XE7:
La configuración del componente es la siguiente:
FDTable1.Active:= False;
FDDataMove1.CommitCount:=100;
FDDataMove1.StatictsInterval:=100;
FDDataMove1.TextDataDef.StrEmpty2Null:=False;
FDDataMove1.Mode:=dmAlwaysInsert;
FDDataMove1.Options:= [poOptimiseDest,poOptimiseSrc,poClearDest,poAbortOnExc,poIdentityInsert];
FDDataMove1.Source:=FDQuery2;
FDDataMove1.Destination:=FDTable2;
Version SQL SERVER: 2014
Version PostgreSQL: 9.6.3
Version Firedac: 11.0.1(Build 73709)
Version Rad Studio: RAD Studio XE7
=================================================
Client info:
=================================================
Loading Driver PG...
Client brand = PostgreSQL regular
Client version = 906040000
Client DLL name: C\...\Proyect_Migration\bin\libpg.dll
=================================================
Session info
=================================================
Current catalog =
Current schema = public
Server version = 9.6.3
Server Encoding = UTF8
Client Encoding = UTF8
Is Superuser = on
Session Authorization = postgres
date Style = ISO,DMY
Integer date/time = on
Time zone = America/Mexico_City
Standard conforming string = on
Ejemplo:
DateTime2(4): SQL Server
----------------------------------------------------------
2017-03-30 15:10:15.1234
----------------------------------------------------------
Timestamp(4) With Time Zone: PostgreSQL
----------------------------------------------------------
2017-03-30 15:10:15.123
----------------------------------------------------------
Estoy usando el Componente TFDDataMove de Delphi XE7:
La configuración del componente es la siguiente:
FDTable1.Active:= False;
FDDataMove1.CommitCount:=100;
FDDataMove1.StatictsInterval:=100;
FDDataMove1.TextDataDef.StrEmpty2Null:=False;
FDDataMove1.Mode:=dmAlwaysInsert;
FDDataMove1.Options:= [poOptimiseDest,poOptimiseSrc,poClearDest,poAbortOnExc,poIdentityInsert];
FDDataMove1.Source:=FDQuery2;
FDDataMove1.Destination:=FDTable2;
Version SQL SERVER: 2014
Version PostgreSQL: 9.6.3
Version Firedac: 11.0.1(Build 73709)
Version Rad Studio: RAD Studio XE7
=================================================
Client info:
=================================================
Loading Driver PG...
Client brand = PostgreSQL regular
Client version = 906040000
Client DLL name: C\...\Proyect_Migration\bin\libpg.dll
=================================================
Session info
=================================================
Current catalog =
Current schema = public
Server version = 9.6.3
Server Encoding = UTF8
Client Encoding = UTF8
Is Superuser = on
Session Authorization = postgres
date Style = ISO,DMY
Integer date/time = on
Time zone = America/Mexico_City
Standard conforming string = on
Valora esta pregunta
0