patternsqlMinor
SQL Server ; working around collation mismatches
Viewed 0 times
aroundsqlworkingmismatchescollationserver
Problem
Imagine the following scenario: I have two servers which are on two separate private networks.
A linked server has been created, and there is a table in server A which has an updated version of the same table on server B. The updates are not extensive, essentially just a reassignment of some Boolean values.
The connection between the two servers is reliable but relatively slow, and there is a collation mismatch between the two tables.
Is there a recommended or standard way of updating information between two servers with a collation mismatch?
A linked server has been created, and there is a table in server A which has an updated version of the same table on server B. The updates are not extensive, essentially just a reassignment of some Boolean values.
The connection between the two servers is reliable but relatively slow, and there is a collation mismatch between the two tables.
Is there a recommended or standard way of updating information between two servers with a collation mismatch?
Solution
You use the
Of course, you can also specify a specific collation, such as:
collate operator in the join. Such as:select
from dbo.firsttable f
join linkedserver.database.dbo.secondtable d
on f.name collate database_default = d.name collate database_defaultOf course, you can also specify a specific collation, such as:
SQL_Latin1_General_CP1_CI_AICode Snippets
select <column list>
from dbo.firsttable f
join linkedserver.database.dbo.secondtable d
on f.name collate database_default = d.name collate database_defaultContext
StackExchange Database Administrators Q#99039, answer score: 5
Revisions (0)
No revisions yet.