June 14, 2011 at 3:43 pm
Well.. typical problem I guess.. dateformats...
We upgraded our server from an old SQL 2000 cluster to a new SQL 2008 cluster 2 days ago. Unfortunately one of the applications running synchronisation of data between a SQL 2000 server database and the new cluster, is now failing every time it tries to synchronise data.
with: The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.
I used Profiler to find out what query was attempted. It is a normal INSERT INTO ------ VALUES ('01-01-1754 09:04:08','13-06-2011 00:00:00','450201564','','5069916','0')
The only thing that has changed, is the new SQL 2008 Cluster, so this must be the reason... I checked the collation... It is the same as the old cluster... And tonight we checked the regional settings on the new cluster.. (we changed it, since it was set to United states (and we are in Denmark))... But the error still occures..
Any good ideas... Notice that i cannot change any sql code, since it is controlled by the application.. 🙁
June 14, 2011 at 9:57 pm
Many errors of type conversion data can be manipulated using the command:
Set DateFormat DMY - (day, month, year).
But if it was working fine, then just check the user running the code. The default language of the user (the user running the query) can be set to other than the default language of the database, or cluster.
June 15, 2011 at 1:46 am
Great... It worked... The default language was english... When I changed it to Danish, it worked.. Thanks a lot...
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply