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
 General SQL Server Forums
 New to SQL Server Programming
 Data from another SQL server

Author  Topic 

petebob796
Starting Member

35 Posts

Posted - 2008-02-09 : 20:42:29
Can someone point me to a good tutorial on how to query data from another SQL 2000 server onto the sql 2000 server I am using. I have read a little bit on it but can't find anything that detailed about it. I would want the query to be processed on the remote server as most of the data is that side. I have seen this option somewhere.

There is no alternative e.g. running them on the same server as it is a locked down system.

dataguru1971
Master Smack Fu Yak Hacker

1464 Posts

Posted - 2008-02-09 : 21:51:04
First thing you want is to add the "other" server as a linked server to the one you are using.

Next, you just have to query using the full naming convention

Select * from [ServerName].[DatabaseName].dbo.[TableName]





Poor planning on your part does not constitute an emergency on my part.

Go to Top of Page

petebob796
Starting Member

35 Posts

Posted - 2008-02-10 : 10:40:19
OK I get that bit straight forward what exactly would I put for the variables in sp_addlinkedserver. It seems to require @server, @srvproduct, @provider, @datasrc, @provstr. Or is there a way through the gui to do it.

I would want to connect to an sql2000 server called DOMINO to database qlsdat. I would also want to provide it an sql username and password that I have set up for select access. Also how do I tell it to process queries on remote server.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-02-10 : 11:43:33
This article gives detailed explanation of adding a linked server and accessing objects from it.

http://www.databasejournal.com/features/mssql/article.php/3691721
Go to Top of Page
   

- Advertisement -