Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Creating a query for another server?

Author  Topic 

Jacques
Starting Member

5 Posts

Posted - 2007-05-30 : 14:36:05
Hey guys, I have two servers on my site. If I am sitting on one server and want to run a select query on another server than what should I do?

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-05-30 : 16:45:21
Create a linked server to remote one then query via linked server.
Go to Top of Page

Jacques
Starting Member

5 Posts

Posted - 2007-05-30 : 17:02:27
I've heard that it can also be done by creating a DSN object of the remote server. Anybody knows this method?
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-05-30 : 17:08:27
OPENQUERY is easier than linked servers, IMO.

Here's an example:

SELECT *
FROM OPENQUERY([Server1\Instance1], 'select * from sometable')

Tara Kizer
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

funketekun
Constraint Violating Yak Guru

491 Posts

Posted - 2007-05-31 : 09:37:54
use remote desktop

-----------------------------------------
http://www.sqlserverstudy.com
-----------------------------------------
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-05-31 : 12:18:32
quote:
Originally posted by funketekun

use remote desktop

-----------------------------------------
http://www.sqlserverstudy.com
-----------------------------------------



That is not a solution for this.

Tara Kizer
http://weblogs.sqlteam.com/tarad/
Go to Top of Page
   

- Advertisement -