Transactional Publication With Article Using DATE Datatype Causes Snapshot Agent to Fail with Error 241 - by mcdrewski

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


9
0
Sign in
to vote
ID 752850 Comments
Status Closed Workarounds
Type Bug Repros 5
Opened 7/8/2012 7:31:48 PM
Access Restriction Public

Description

On systems where SQL Server is set to a 'mdy' language (the default) but the local machine is set to a locale where default date format is 'd/MM/yyyy' (ie: en-gb, en-au etc.), transactional replication snapshots generate invalid where clauses for "date" type columns.

This causes replication to fail with "Query for data failed" and error 241 (Conversion failed when converting date and/or time from character string.)

The bug appears to be in:

Microsoft.SqlServer.Replication.Snapshot.SqlServer.ArticleBcpPartitioningResolver.FormatPartitioningKatmaiDateTimeValue()

Which relies on .NET ToString() to generate text values for the where clause.
Sign in to post a comment.
Posted by Tolyandre on 12/28/2016 at 5:41 AM
The issue still exists in SQL Server 2008 R2 (SP3)
Posted by Robert Varga on 1/14/2016 at 12:50 AM
Once again, why is this issue closed? This is still and issue with no workaround and I can't see a duplicate on connect...
Posted by joeyfallon on 11/13/2013 at 3:55 AM
Why is the status on this "Closed as Fixed" ?
Posted by Richard Theo on 7/23/2013 at 10:48 PM
This bug still exists in SQL 2012 SP1 and its a real pain. We are unable to replicate and have had to redesign our entire schema and application to replace date columns with datetime columns.

Microsoft - can you please fix this.
Posted by Microsoft on 10/30/2012 at 10:32 AM
Hi mcdrewski,

given my previous message, I'm archiving this work item for now.

Best regards
Jean-Yves Devant 
Program Manager Servicing and Lifecycle Experience of High Availability Technologies in SQL Server
Program Manager SQL Server Replication, Change Data Capture, Change Tracking
Posted by Microsoft on 10/8/2012 at 5:15 PM
Hi mcdrewski ,
    
thanks for taking the time to share your feedback, this is really important to us. We are planning to fix this in the next Service Pack of SQL Server 2008 R2.

Best regards
Jean-Yves Devant 
Program Manager Servicing and Lifecycle Experience of High Availability Technologies in SQL Server
Program Manager SQL Server Replication, Change Data Capture, Change Tracking
Posted by Microsoft on 7/9/2012 at 1:52 PM
Hi mcdrewski ,
    
thanks for taking the time to share your feedback, this is really important to us.
We will investigate the issue and get back to you.

Best regards
Jean-Yves Devant
Program Manager (Replication/CDC/CT)

SQL Server Engine Team