Solved

Querying a database in another server from within sql server 2005

Posted on 2007-04-10
2
185 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

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

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

In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

920 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

14 Experts available now in Live!

Get 1:1 Help Now