Click here to Skip to main content
15,915,509 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi all,

I am new into SQL Server. I would like to know how to update two database server at once.
Scenario is- I have two servers at different location. I need to update both these servers. What is update in Server A should also be in Server B. By this way when a loss of connection occurs the users can do there work without interruption.

I am going to few stuffs known as Log Shipping, Mirroring, Replications, I don't know which method to implement.

Please help me out.
Posted

1 solution

I am not sure what you want to do, but this sounds like a bad idea. The performance cost that comes with updating two databases simultaneously compared to the benefit you have from it when once in who knows how often the server goes out.
Consider this, you constantly need to connect to two servers to insert or update data. If one is down the attempt will take a few seconds and then fail, at which point your two databases will be out of sync. To fetch data you could look at one database, but if the server it is running on is down an attempt will still take several seconds before trying the other database. If the problem is client sided (and if you have a stable server it usually is) then you could have a gazillion databases, but you wouldn't be able to connect anyhow!

What you need is a backup plan for whenever your main server crashes or someone deletes the database. You can schedule backups in SQL server. How often it needs to backup is up to you.
I am not very familiar with this, but you could take a look at this[^].
It should also be possible to backup only that which has changed since your last backup. This way backups will stack and together you will have your complete database backed up without having the performace hit of a full database backup.
This is all pretty advanced though, and if you are new to SQL server I suggest you Google around, read a book and draw your own conclusions.
Hope that helps :)
 
Share this answer
 
Comments
Mehdi Gholam 16-Oct-11 13:14pm    
My 5!
Sander Rossel 16-Oct-11 13:23pm    
Thanks! :)

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