如何同时连接两台不同的服务器? [英] How to connect two different servers simultaneously ?

查看:135
本文介绍了如何同时连接两台不同的服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我想使用两个不同的服务器连接在我的Windows C#应用程序中的同一网络中,比如插入,将相同的数据删除到两个服务器中同时。



例如,我们有两台服务器服务器A和服务器B

i想在服务器A和服务器B中插入相同的数据。



服务器A和服务器B有相同的数据库。



可以知道这个概念吗?< br $> b $ b



谢谢

Hi,

I want to use two different servers which are connected in a same network in my windows C# application like Inserting,deleting same data into the two servers simultaneously.

For Example, We have two servers server A and Server B
i want to insert same data in both server A and server B.

server A and server B have same database.

Can any know about this concept ?


Thanks

推荐答案

你可以声明2个连接串并使用相同的sql查询执行操作(ecexute使用不同的连接字符串两次相同的查询)
you can declare 2 connectionstrings and use the same sql query to perform the operation(ecexute same query twice using different connectionstring)


我使用两个连接;我一整天都这么做。



或者你可以使用触发器...但我不推荐它。
I'd use two connections; I do so all day long.

Or you could use a trigger... but I don't recommend it.






首先你需要决定你想要更新数据的时间间隔,因为你可以创建将运行的ssis ETL包该时间间隔并在machine2上更新您的数据。



您也可以选择复制选项。



我们可以根据需要选择多种方式。



如果您需要,请告诉我任何进一步的帮助。



问候,

Mubin
Hi,

First of all you need to decide within how much time gap you want to update data, as per that you can create ssis ETL package which will run on that time interval and update your data on machine2.

You can also go for Replication option.

There are many ways we can choose as per the requirement.

let me know if you need any further assistance.

Regards,
Mubin


这篇关于如何同时连接两台不同的服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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