Click here to Skip to main content
15,891,607 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted
Comments
Madhu Nair 23-Oct-13 0:24am    
Why don't you use two different connection string in your app.config file?
Mr. Avskmk 23-Oct-13 0:28am    
If we use two different connections, that many times we need to do insert action..
If we need to insert multiple record around 500 then it will take time...
Thanks7872 23-Oct-13 0:41am    
Mr. Avskmk wrote:
many times we need to do insert action


If you want to insert data then you have to. What is wrong with that? Nothing works AUTOMATICALLY.
Sergey Alexandrovich Kryukov 23-Oct-13 0:31am    
First of all, why? And why it can be a problem?
—SA
Herman<T>.Instance 23-Oct-13 7:33am    
why you do not setup a replication between the servers ?

you can declare 2 connectionstrings and use the same sql query to perform the operation(ecexute same query twice using different connectionstring)
 
Share this answer
 
I'd use two connections; I do so all day long.

Or you could use a trigger... but I don't recommend it.
 
Share this answer
 
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
 
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