快速问题“如何使用窗口服务将表上载到远程服务器” [英] Quick Question "How to use window service to upload table to remote server"
本文介绍了快速问题“如何使用窗口服务将表上载到远程服务器”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨大家好,
我是C#编程的新手,但是我想创建一个窗口服务,它将表本地服务器中的数据记录更新到同一个表的远程服务器。 br $> b $ b
我需要你的帮助,否则我可能会失去工作!谢谢guyz
解决方案
首先你需要创建一个Windows服务然后你可以使用以下任何一个选项来实现你的要求:
选项1 :通过手动工具生成的SQL脚本。
在两个SQL Server数据库之间传输数据或脚本 [ ^ ]
选项2 :通过链接服务器
步骤1:在目标服务器上创建表格。
步骤2:在目标服务器上,您可以执行StoredProcedure:
INSERT INTO dbo.YourTargetTableNameHere
SELECT *
FROM [SourceServer]。[SourceDatabase] .dbo.YourSourceTableNameHere
通过以下链接创建链接服务器:
如何在一分钟内配置链接服务器 [ ^
Hi Guys,
I'm new to C# programming, However I want to create a window service that will update data record in a table local server to a remote server of the same table.
I need your help asap otherwise i might lose my job! thanks guyz
解决方案
Firstly you need to create a windows service then you can use anyone of following option to implement your requirement:
Option 1: SQL script generating through manual tool.
Transfer data or script between two SQL Server databases[^]
Option 2: Through Linked Server
Step1: Create your table on the target serve .
Step2: On the target server, you can execute a StoredProcedure:
INSERT INTO dbo.YourTargetTableNameHere SELECT * FROM [SourceServer].[SourceDatabase].dbo.YourSourceTableNameHere
Go through below link to create Linked server:
How to Config Linked Servers in a Minute[^]
这篇关于快速问题“如何使用窗口服务将表上载到远程服务器”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文