Click here to Skip to main content
15,902,938 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have two computers the first one is a local computer has Sql server 2008 and has a database that is accessed by a program that modify it

the another computer is a remote computer that can accessed over network and has also Sql server 2008 and i want to put a copy of the database of the another computer on this one and i want every change in the first database done in the another one and if the connection failed so wait to be succeed and make the changes

i googled it and i found that i can do it using replication

but i do not know if use Merge replication or transaction replication

can any one tell me?
Posted
Updated 30-May-12 22:13pm
v2

1 solution

This really depends on your database load. i.e. how many people are using it and how many crud operations are made against it.

For a database that needs to be effectively mirrored and where transactions (crud operations) are frequent then transactional replication is the one to choose. Merge replication should be used when say, you want to merge the database at the end of the day and where the mirroring does not need to be "real time".

http://beyondrelational.com/quiz/sqlserver/general/2010/questions/sqlserver-quiz-general-2010-vidya-sagar-merge-replication-v/s-transactional-replication-with-update.aspx[^]
 
Share this answer
 
Comments
amir tarek 31-May-12 4:24am    
i will explain to you my problem

i have a program using database

i wanted to run this program in more than 20 computers seperately

so i put the database with sql server 2008 and the program on each computer and it worked well

now i want to have a large server that has one database like the databases on the computers and i want any insertion deletion modification on any computer done in the main database on the main server

so i want a server with database that contain all the data on all the 20 databases and have them modifications

there will not be any modification in the server database wanted to be done on any database on the 20 copmputers

so now i think transaction replication is good right
db7uk 31-May-12 5:15am    
The only sure way of doing this would be to use transactional replication however you will need to be very careful that the data in the application databases is not the same as each other. i.e. Watch out for duplicate primary keys.

I am interested to find out why the applications can communicate with the database on the server?
amir tarek 31-May-12 5:38am    
i am sure the data on the databases will not conflict

and why do this i want to make a large server database as backup for all databases and can work instead of all of these databases

for me now i will create transaction replication with these steps

http://www.sql-server-performance.com/2010/transactional-replication-2008-r2/

it will work right?

i will create the distributer and the publisher on the 20 computers and the subscriber on the server is it right?
db7uk 31-May-12 5:44am    
It should. Here is an excellent link to transactional replication: well worth a read!

http://www.sqlservercentral.com/stairway/72401/
amir tarek 31-May-12 6:05am    
really thank you alot for your help

i did it in local computer make it as the publisher and subscriber using two databases have the same structure

now i will try to make it through a network

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