• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 232
  • Last Modified:

Querying a database in another server from within sql server 2005


I have a sql server 2005 and a sql server 2000 database, and they are on separate serves. On the 2005 database I have added a connection to my 2000 database, and would like to make a query from within the 2005 database to the sql server 2000 database.

The reason for doing this is that I am moving data from one database to another, and ratherthan cluttering up my 2005 database with temp tables, i thought it would be possible to query the 2000 from the 2005 database. What I am not sure on is how to do this, I know how to access another database within the same server, but not across servers.

And I do know that there is tools out there that will do some of this for me, but I do not have a budget for that right now, so any help on this would be appreciated. Thanks.
1 Solution
Guy Hengel [angelIII / a3]Billing EngineerCommented:
you have to add the linked server name to your sql 2000 server in the query, ie:

select t.* from your2000linkedserver.databasename.username.tablename t
JDEE8297Author Commented:

Thanks for the quick reply, as soon as I had put the question up there I ended up figuring it out, but you deserve the points because you did answer my question. So thanks again.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now