Tuesday, March 18, 2008

How to create a Linked Server to hitseft (Microsfoft Server 2005)

You can find good information here (http://msdn2.microsoft.com/en-us/library/aa259589(SQL.80).aspx)

Under, Object Explorer of (Microsfoft SQL Server Management Studio) go to:
Server Objects - Linked Servers
Right click on Linked Servers and select - New Linked Server...




































My situation is very simple, I have multiple server with 2 databases, some of the database are replicated to the other server. I have a store proc that need to be call the same way on both server, but one of my server host the replicated copy (read only) of my db so the sp need to write to the other one. That need to work the same way on both server

MYLINKSERVERNAME.myDBName.dbo.my_store_prod_name NULL, 'Tester', ' HELLO WORLD '

Server_A and Server_B both contain the link server name: MYLINKSERVERNAME, and both links, point to Server_A.