如何查询位于与LAN连接的两个不同服务器上的数据库 [英] How to query database situated on two different servers connected with LAN
问题描述
大家好,
我不知道这是否是问这个问题的正确论坛,但我真的很困惑,请帮帮我
问题是这样的:
我有两台笔记本电脑都与LAN连接,现在我有一个在SQL Server 2008中建立的数据库,现在我只需要在一台笔记本电脑上进行查询,如果我运行该查询,则两个数据库对应的结果即都是笔记本电脑数据库应该会出现.
请向我解释这是怎么可能的?
谢谢&问候,
解答:
AFAIK,除非链接服务器,否则无法在两个SQL Server实例上运行一个查询.在此处有描述 [ http://msdn.microsoft.com/en-us/library/ms188427.aspx [ ^ ]
谢谢
Hello everyone,
I dont know whether this is the correct forum for asking this question or not, but i am really stucked up please help me out
Problem is as such:
I have two laptops both are connected with LAN, now i have one database which is made in SQL server 2008, now i need to make such query on only one laptop that if i run that query then the corresponding result from both the database i.e. both the laptops database should come .
Please explain me how it is possible??
Thanks & Regards,
Krunal Panchal
AFAIK, you cannot run one query across two SQL Server instances, unless you link the servers. There is a description of this here[^] but it gets a bit complex, and is not really intended for laptops that you might just decide to take away with you...
You may find it easier to run two queries: one on each laptop unless you need to replicate the data across both.
Please check the below link...OPENQUERY will resovle ur problem
http://msdn.microsoft.com/en-us/library/ms188427.aspx[^]
Thanks
这篇关于如何查询位于与LAN连接的两个不同服务器上的数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!