Solved

How to retrieve recordsets from tables on two diffrent servers in classic asp

Posted on 2014-11-25
5
108 Views
Last Modified: 2014-11-26
All,

How can I retrieve recordsets from tables on two diffrent servers using classic asp OR a view in MS SQL Management Stuido?
0
Comment
Question by:Upperdecker
[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
5 Comments
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 40465771
Since the server (and the login) are part of the connection string, you would have to make two separate queries.
0
 
LVL 53

Expert Comment

by:Scott Fell, EE MVE
ID: 40465801
+1 for Dave.  It is as easy as 2 connection strings and call it twice.

Do you need to search both db's at the same time?  for what type of data and results?
0
 
LVL 50

Assisted Solution

by:Vitor Montalvão
Vitor Montalvão earned 150 total points
ID: 40466507
view in MS SQL Management Studio
You need to create a Linked Server from one server to the other one, so you can write a View referring a table in another database.
0
 
LVL 33

Accepted Solution

by:
Big Monty earned 350 total points
ID: 40466937
the linked server is the best route to go, and just to expand on Vitor's post, you can easily create a linked server in Management Studio or by using the sp_addlinkedserver stored procedure.

references:
http://msdn.microsoft.com/en-us/library/ms188279.aspx
http://msdn.microsoft.com/en-us/library/ms190479.aspx
0
 

Author Closing Comment

by:Upperdecker
ID: 40467612
Thank you.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Viewers will learn how the fundamental information of how to create a table.
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

691 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