Click here to Skip to main content
14,640,670 members
Rate this:
Please Sign up or sign in to vote.
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

Rate this:
Please Sign up or sign in to vote.

Solution 1

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[^]
   

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




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100