Saturday 3 February 2007

TSQL : Adding a linked server

Adding a linked server & it's associated login.
EXEC sp_addlinkedserver 'servername'
EXEC sp_addlinkedsrvlogin  'servername', 'false', null, 'username', 'password'

Performance tip :

The local and linked servers should share the same character set and sort order (collation). If this is the case, performance can be boosted by using this command -

EXEC sp_serveroption 'servername', 'collation compatible', 'true'

Sql then assumes local and remote character sets are compatible for all queries.

No comments: