Solved

Querying a database in another server from within sql server 2005

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

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
In this article I will describe the Copy Database Wizard 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 video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

830 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