?
Solved

How do I link 2 sql server databases?

Posted on 2006-10-30
3
Medium Priority
?
654 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 2000 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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…
Suggested Courses

770 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