Data Compare fails with DateTime msg when comparing bak file
dschaeff
Posts: 12
When attempting to use SQL Data Compare t to compare a live database with a recent backup file of the same database, the following message is produced:
"The DateTime represented by the string is not supported in calendar System.Globalization.GregorianCalendar."
No comparison is performed.
This message is produced when I click the "Tables & Views". No table list is produced. This message is also produced if I skip "Tables & Views" and go directly to "Compare Databases". There is an "X" in front of "Registering Databases". The line below indicates that it is "reading users" from the live database.
If I restore the bak file to a database with another name I can successfully compare the databases.
"The DateTime represented by the string is not supported in calendar System.Globalization.GregorianCalendar."
No comparison is performed.
This message is produced when I click the "Tables & Views". No table list is produced. This message is also produced if I skip "Tables & Views" and go directly to "Compare Databases". There is an "X" in front of "Registering Databases". The line below indicates that it is "reading users" from the live database.
If I restore the bak file to a database with another name I can successfully compare the databases.
Comments
Whether you're able to send the backup file or not, could you tell us about the language / date / time format settings for the server / database that the backup was taken on, for the computer that was running Data Compare, and for the server(s) the live database that you were comparing to and the live database that you created from the backup file and successfully compared? It sounds like it's some kind of date / time format problem.
Redgate Software
I remember a similar problem in SQL Backup which was caused by corrupted regional settings on the computer. Can you try going into the client (the computer running SQL Data Compare), and then Control Panel->regional and language options, click Customize and make sure everything is filled in, particularly on the Time and Date tabs.
The whole issue may be that .NET cannot cast a datetime value retrieved from SQL Server to a datetime value in the .NET runtime.
I hope this helps!