How can we help you today? How can we help you today?

DATETIME2(7) not deploying correctly (11.4.0.1)

I have two databases, both are running SQL Server 2008 (10.0.6241.0). I have columns that are storing data as DATETIME2 with a precision of 7, when comparing the two databases I get every so often a time that is off by a very small fraction of a second. If I deploy the exact time form DB1 to DB2, the time in DB2 is sometimes also off by a fraction of a second. and the values are not consistanly shown in SQL Data compare 11.4.0.1

For an example, I just synced DB1 to DB2 the same table and SQL Data compare is telling me there is 491 differences in the table... every single one of them is a DATETIME2(7) column...

DB1 according to SQL database compare the value is 2015-03-05 15:33:50.3469999
DB2 according to SQL database compare the value is 2015-03-05 15:33:50.3469998

almost the same but not quite.... that was even after a deployment script made this statement to update that exact row

PRINT(N'Update rows in [Journaling].[JournalEvents]')
UPDATE [Journaling].[JournalEvents] SET [EventDate]='2015-03-05 15:33:50.3469999' WHERE [EventID] = 279254
PRINT(N'Operation applied to 1 rows out of 491')

now the GUI is showing it's different but when I go into the databases and check the values it is showing even more different values...

DB1 in the actual DB: 2015-03-05 15:33:50.3470000
DB2 in the actual DB: 2015-03-05 15:33:50.3469999
BlueBSH
0

Comments

3 comments

  • Anu D
    Hi,

    Thanks for your post and sorry you are running into a known issue SDC-1837 "DATETIME2(7) precision off by -.0000001" .

    Our development team is investigating this issue and I will update you on any progress we make with this bug.

    Only workaround I can suggest is using a less precise DATETIME2 (which is not ideal).

    I will keep you posted!
    Anu D
    0
  • Anu D
    Hi,

    Thanks for your patience.

    I am very pleased to tell you that we have fixed the issue you were having in our latest release.

    Link to release notes: https://documentation.red-gate.com/disp ... ease+notes

    Link to installer: ftp://support.red-gate.com/patches/SQLD ... .0.397.exe

    Let me know if this solves the issue for you.
    Anu D
    0
  • BlueBSH
    appears to be working correctly now
    BlueBSH
    0

Add comment

Please sign in to leave a comment.