How to query a table in a remote DB server?

Posted on 2011-10-06
Last Modified: 2012-05-12
I want to query a table in the remote DB server.

Server A:   (2005)
        DB: MyAdmin
        Table:  MyProcessType

Server B: DEVSQL  (2008)
        DB: MyAnotherAdmin

I have connected to Server B (SQL Management Studio). Now I want to query (Server A).MyAdmin.dbo.MyProcessType from Server B in a T-SQL statement.

How do I do this?

Question by:chuang4630
    LVL 15

    Accepted Solution

    Create a linked server.

    After that you can query it by: ServerA.MyAdmin.dbo.MyProcessType
    LVL 5

    Assisted Solution

    There are Many ways to do  Hope following post  helps you
    LVL 5

    Expert Comment


    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    Long way back, we had to take help from third party tools in order to encrypt and decrypt data.  Gradually Microsoft understood the need for this feature and started to implement it by building functionality into SQL Server. Finally, with SQL 2008, …
    Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    746 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

    15 Experts available now in Live!

    Get 1:1 Help Now