Solved

How do I link 2 sql server databases?

Posted on 2006-10-30
3
640 Views
Last Modified: 2012-06-27
Hi

I have two servers both windows 2003 and running sql server 2005. Each server has one database in it and I would like to know how I get a link table (or something similar) on server1 to a table on server2 so that I can run views on server1 which will pull data from server2?

I've seen some info about sp_addlinkedserver but I don't know if that's what I want to use and if it is, how do I use it?

Thanks for any help you can give me.
Heather
0
Comment
Question by:ProfJames
3 Comments
 
LVL 20

Expert Comment

by:Sirees
ID: 17835758
You should set up linked servers for this.

Check this link for more info

http://msdn2.microsoft.com/en-us/library/ms190479.aspx
0
 
LVL 5

Accepted Solution

by:
Netstore earned 500 total points
ID: 17840872
The easiest way is to create the link in Enterprise Manager:

EM -> Security -> Linked Servers -> Right Click New Linked Server

Then just add the server name (ensure this server is visible through the network, e,g, telnet <target server> 1433). You will need a login to the target server.

Now you will be able to run sp's, pull data update the target server at you leisure.

Cheers
Si
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question