[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 194
  • Last Modified:

How to query a table in a remote DB server?

I want to query a table in the remote DB server.

Server A: 10.100.10.170   (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?


0
chuang4630
Asked:
chuang4630
  • 2
2 Solutions
 
Faiga DiegelCommented:
Create a linked server.

http://msdn.microsoft.com/en-us/library/aa213778(v=sql.80).aspx

After that you can query it by: ServerA.MyAdmin.dbo.MyProcessType
0
 
AlokJain0412Commented:
Hi
There are Many ways to do  Hope following post  helps you
http://stackoverflow.com/questions/52103/can-i-use-sql-server-management-studio-2005-for-2008-db
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

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