Groups | Blog | Home
all groups > sql server replication > june 2006 >

sql server replication : Replication SQL 2000 -> 2005 Float Error


MADNESS
6/26/2006 12:43:02 PM
Hi there, We are currently reviewing upgrading our Transactional Replication
from SQL 2000 to SQL 2005.

Out test environment consists on SQL 2000 Publisher, SQL2005 Distributor,
SQL 2000 Subscriber, and a SQL 2005 Subscriber across 4 different servers. We
successfully configured a transactional publication and subscription to the
SQL2000 subscriber. However the same publication errors when the snapshot is
being applied to the SQL2005 subscriber as below:

OLE DB provider 'STREAM' for linked server '(null)' returned invalid data
for column '[!BulkInsert].price'. (Source: MSSQLServer, Error number: 7339)

To troubleshoot this we bcp'd out the table manually and tried to insert it
to the subscriber using bcp with the exact same error msg appearing. We
managed to drill this down to one particular row, and one particular column
which was a float. The value of this float is 2.8128137561472325E-312. We
then created a table on the SQL2005 server with only float column, and tried
to insert this record, with the resulting msg

Warning: the floating point value '2.8128137561472325E-312' is too small. It
will be interpreted as 0

This appears to be a valid float on SQL2000, so why is it not valid on
SQL2005. Any suggestion would be most welcome!! This is a nightmare for
replication!!!

Hilary Cotter
6/26/2006 4:15:40 PM
What happens when you try to bcp the data in manually for this table?

--
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.

This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.

Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com



[quoted text, click to view]

Paul Ibison
6/26/2006 10:07:17 PM
According to MSDN, the original value should also be too small for SQl
Server 2000
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_fa-fz_6r3g.asp).
As a matter of interest, can you try BCPing it into a staging table on SQL
Server 2000 also to confirm that you don't get the same message there.

Cheers,

Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

MADNESS
6/27/2006 12:31:01 PM
I can BCP the table into SQL200 with no issues, which is why I guess the
SQL2000 subscriber is fine. Interesting if I try to insert the float into the
table again using INSERT INTO x SELECT 2.8128137561472325E-312 into SQL2000 I
get an error and it inserts it as 0, so I can only assume the data got in
there via BCP or some other MDAC provider that didn' handle the data
correctly. It looks like the SQL2005 BCP process does extra data validation
checks.

So I've identified all of the floats which are out of range using the
ISNUMERIC function and the BETWEEN upper and lower limits of a float, and
modified these values and replication now works a treat. Yey!!!

Thanks to Paul and Hilary for their prompt replies and guidance.

Miles

[quoted text, click to view]
AddThis Social Bookmark Button