Solved

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

Posted on 2014-11-25
5
101 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 47

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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

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/…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

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