如何在Sql中检索两个服务器之间的比较数据 [英] How Can I Retrieve The Compared Data Among Two Servers In Sql

查看:80
本文介绍了如何在Sql中检索两个服务器之间的比较数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个服务器,比方说10.2.15.3和102.15.2。我这个服务器我有两个数据库(两个数据库具有相同的结构和表(一个是存档数据库,另一个是源数据库)。现在我需要比较每个表的行数。我听说过链接服务器和openquery,但我不知道正确的方法和步骤来实现这一点?有任何使用链接服务器的缺点。请建议我一个方便的方式



在此先感谢

Sibeesh

解决方案

你是对的,可以通过链接服务器来完成。

这里是一些例子 -

如何在一分钟内配置链接服务器 [ ^ ]

在SQL Server 2008中着墨服务器 [ ^ ]

I have two server , lets say 10.2.15.3 and 102.15.2 . i this servers i have two DB (both DB having the same structures and tables(One is archived DB and another is Source DB). Now i need to compare the row count of each tables. I have heard about the linked servers and openquery , but i dont know the correct way and steps to achieve this? is there any cons of using linked server. Please suggest me an apt way

Thanks In Advance
Sibeesh

解决方案

You are correct and can do this via linked servers.
Here are some examples -
How to Config Linked Servers in a Minute[^]
inked Servers in SQL Server 2008[^]


这篇关于如何在Sql中检索两个服务器之间的比较数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆