Click here to Skip to main content
15,884,801 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted
Comments
Tomas Takac 4-Oct-15 3:39am    
You may want to look at replication[^] because people will ask you why you got fired in the interviews and if you learned your lesson.

1 solution

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:
SQL
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[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900