Solved

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

Posted on 2014-11-25
5
102 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
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 52

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 48

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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Suggested Solutions

This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

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