Solved

Querying a database in another server from within sql server 2005

Posted on 2007-04-10
2
173 Views
Last Modified: 2010-03-19
Greetings,

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.
0
Comment
Question by:JDEE8297
2 Comments
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 250 total points
ID: 18882135
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
0
 

Author Comment

by:JDEE8297
ID: 18886498
Greetings,

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.

JD
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction: When running hybrid database environments, you often need to query some data from a remote db of any type, while being connected to your MS SQL Server database. Problems start when you try to combine that with some "user input" pass…
Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
This video discusses moving either the default database or any database to a new volume.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

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

23 Experts available now in Live!

Get 1:1 Help Now