The scenario is that developers used a linked server object on ServerM
to reach ServerST
. This linked server was setup as a "SQL Server" type using a domain login that exists as a login on ServerST
.
Now the developers require this linked server object (named ServerST
) to be reconfigured to point at ServerAR
(even though confusingly the object would still be named ServerST
). This allows them to save time rewriting a lot of code, time they do not have.
Now I can create a new linked server on ServerM
of the type "Other data source" and provide a connection string that works. However a query on the original linked server that took 5s took 46s using the new linked server.
So my question is how do I provide a linked server named ServerST
, that points to ServerAR
and operates at the same speed.
All servers are on SQL Server 2008 R2 SP2.
The code I currently use to create the slow linked server is:
sp_addlinkedserver 'ServerST', ' ', 'MSDASQL', '', '',
'Driver={SQL Server};Server=ServerST;Database=theDB;Uid=link_ServerM;Pwd={P@ssw0rd};'