.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> .NET Framework >> Post New QuestionBookmark and Share Subscribe to Forum

how to synchronize database in .net

Posted By: jyothi     Posted Date: October 21, 2010    Points:2   Category :.NET Framework
i developed one windows application in c#.net. and one webapplication in asp.net(c#.net). web application is admin. windows application will be given to each user. there is one synchronize button in windows application. when user clicks that button he connects to the web application.
when he connects to the web application his database should be updated bases on web server databse. this is my requirement

how to do this.

i hope i will find solution for this.


Responses
Author: Sajid P K             
Posted Date: October 21, 2010     Points: 5   

jyothi ,

A)Scripts for Database Backup/Restore between servers using C#

Step

1) scripts the backup on SystemA
2) copies the file to SystemB and calls the restore script on SystemB

b) SSIS to Export/Import data between SystemA & SystemB

Regards,
Sajid P K

Author: jyothi             
Posted Date: October 21, 2010     Points: 5   

hi

i don't want to copy entire table. i want to update some tables (records) .

thanks

jyothi

Author: Sajid P K             
Posted Date: October 21, 2010     Points: 5   

Jyothi..

Do like this


-Form SystemA.

insert into TableX
from ( Select * from SystemB.DatabaseName.dbo.TableX where ..... )


-Form SystemB.

insert into TableX
from ( Select * from SystemA.DatabaseName.dbo.TableX where ..... )



Note that , Here we need to add link to SystemB in SystemA and reverse also. Code for linking is given below.

EXEC sp_addlinkedserver @server = N'SystemB', @srvproduct=N'SQL Server'




http://www.dotnetspark.com/kb/2800-explain-linked-sever-and-how-add-linked.aspx





Regards,
Sajid P K



Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend