Solved

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

Posted on 2014-11-25
5
98 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 82

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 45

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 32

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 Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

760 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now