Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

What is the major difference between Replication and database mirroring in Sql server?And which technique is better economically?

user-image
Question added by Deepika Kumari , Software Engineer , Wipro Technologies
Date Posted: 2014/08/08

Replication will work at object level and mirroring will work at database level.with the help of replication we will take the backup of particular tables and stored procedures instead of taking entair database backup.

Deleted user
by Deleted user

I would say economically replication is better option, this way you can have distributed system and fully utilioze the HW resource. Where DB mirrioring you can only have Active passive situation. 

Currently Always-on is the replacement of DB mirrioring - so I would encourge you to use this - yes it is dependent on Windows clustering but it will at least load balance and make use of all resources.

Mohamdshoaib Momin
by Mohamdshoaib Momin , Database Administrator (DBA) , Bombay Stock Exchange

Replication and Mirroring are two different feature of MS SQL  used for replicating data.

Replication is object level (tables having primary key can be replicated) and Mirroring is Database level replication.

Replication has 4 different types in it

- Snapshot Replication

- Transactional Replication

- Merge Replication

- Peer to Peer replication

all of these have their own advantages and disadvantages.

In Mirroring we have automatic and manual failover. Mirroring is used as High Availability.

 

Saqib Ehsan
by Saqib Ehsan , Asstt. System Admin , national center for physics

Replication VS Mirroring, and what to use for a Disaster Recovery setup One question I seem to get asked a lot is what is the difference between Replication and Mirroring when it comes to SQL, and especially for the Sys Admin stuck in the middle, what is the best one to use for a Disaster Recovery scenario.Firstly, for people who haven't heard of either, both replication and mirroring are methods of transferring data from a primary database, to a secondary database or databases. Two common scenarios for this are to have a separate copy of the database for reporting purposes, or to have a copy of the database safely off site in the event of disaster on the primary database. In theory both Replication and Mirroring have the same purpose, to shift data from your database to other locations, but each method has a very different application and way of going about things. Obviously nothing in these guides are black and white, completely right or wrong, but as a general rule this is the way you would apply these methods.Replication - Reporting and database synchronization
  • Secondary database is online and searchable. Basically you can run queries against your secondary database and treat it like a normal database while protecting the performance of your primary database.
  • There are different forms of replication
    • Transactional - Reads transactions to your secondary DB(s) as they occur on your Primary with a slight delay
    • Snapshot - Takes dumps at scheduled times of the changes recorded in your logs since the last synch, and inserts them at a scheduled time
    • Merge - This does what it says on the tin. It will merge content between databases so you can update data in both DB's. You might use this if you have two identical databases from day 1, and you have App 1 talking to DB 1, and App 2 talking to DB 2 for load balancing purposes or something. At the end of the day you might want to merge the transactions that occurred during the day to make sure you have two full lists of transactions in each DB.
Mirroring - Disaster Recovery 
  • Secondary database is in an offline mode while mirroring is in place. This is to ensure integrity in the secondary database in the event of a failover being required. Nothing can write to the secondary database, so you know it will exactly match your primary.
  • Can replicate schema changes. What this means is if you add a new index, or a new table, it will automatically be mirrored over. This is not the case with replication, it will only transfer across data level changes.
There are many configurations you can put together for replication, or mirroring, and you'd have to identify exactly what setup would suit your needs, but the above is a good baseline as to the best practices. 

Ashraf Fahmi Abdelhamid Mahmoud
by Ashraf Fahmi Abdelhamid Mahmoud , Senior Software Engineer , DataServe - National DataServe & Turnkey Solutions Co

visit the following url may be answer your question

http://stackoverflow.com/questions//sql-server-replication-or-mirroring

http://simplesql.blogspot.com/2011/01/replication-vs-mirroring-and-what-to.htm

lhttp://sqlmag.com/blog/san-replication-vs-clustering-vs-mirroring

https://social.msdn.microsoft.com/Forums/sqlserver/en-US/bba2dd02-bb64-4f8c-9b92-fdf4a23f5fd2/differences-between-clusters-mirroring-replication-and-alwayson-at-a-very-high-level?forum=sqldisasterrecovery

More Questions Like This