Blog on software engineering
How to prevent data to be changed, when copying over linked server connection in SQL Server

How to prevent data to be changed, when copying over linked server connection in SQL Server

 

When I was inserting and updating data over a SQL Server linked server connection, special characters in “strings” were altered.

 

A character “ë” was changed to the character “Ù”.

 

Now the first thing I checked was the collation on both databases and columns.

They were exactly the same, so I expected the data NOT to be altered.

I think this is a bug in SQL Server, but I have a workaround: set the collation of the linked server connection:

 

use master

go

exec sp_serveroption ’93_WGD’, ‘collation compatible’, ‘false’

go

exec sp_serveroption ’93_WGD’, ‘use remote collation’, ‘false’

go

exec sp_serveroption ’93_WGD’, ‘collation name’, ‘Latin1_General_BIN2’

go

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.