7

I have a Linked Server which was made using SQL Server Management Studio 2008.

If the linked server destination changes, I will have to change the properties of it to direct to the right place.

But I cannot - there is no edit option!

Am i missing something, or can Linked Servers not be altered?

Brian
  • 112
  • 3
  • 13
user48642
  • 269
  • 1
  • 4
  • 10

4 Answers4

2

Yes, you are right. Linked server name cannot be modified. It needs to be dropped and recreated in case the server name changes.

Nomad
  • 471
  • 2
  • 3
1

You can't modify a Linked Server

But if you right click the server in Management Studio and then:

Script Linked Server As > DROP and CREATE to > New Query Editor Window

You can make changes to the script and it's almost the same workflow as using ALTER

Brian
  • 112
  • 3
  • 13
0

The ability to edit them left around SQL 2000 or SQL 2005, now they have to be dropped and re-created.

mrdenny
  • 27,074
  • 4
  • 40
  • 68
0

Check out sp_setnetname. You can use it to change the data_source of the linked server (destination), e.g.:

DECLARE @name sysname = 'SRVRNAME';
DECLARE @datasource sysname = 'srvr.name.com';

EXECute sp_setnetname @server = @name, @netname = @datasource;