Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Linked server

Author  Topic 

chih
Posting Yak Master

154 Posts

Posted - 2007-03-05 : 17:53:54
Hi All,

I have set linked sever for 2 servers- SA and SB. Some stored procedures in SA have been hard code to get information from SB. For example,
select * from [SA\member].member.dbo.background

The problem is if I want to create a redundant site, I will need to go to each stored procedure and change those hard codings (linked server name) manually. Is there any other way to do it more efficiently?

cheers

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-03-05 : 18:30:08
Use an alias for the linked server name. Then you would need to add the alias to the server where the linked server exists. You can add aliases via SQL Server Configuration Manager if you are using SQL Server 2005.

Then all you would need to do to update the information is modify the alias to point to the other server.

Here's an example of what I mean:

Linked Server name would be Alias1.
Alias1 would point to Server2\Instance1,PortNumber.
Alias1 would exist on Server1.

Tara Kizer
Go to Top of Page
   

- Advertisement -