Groups | Blog | Home
all groups > sql server replication > february 2007 >

sql server replication : Replication vs mirroring


PromisedOyster
2/6/2007 4:29:19 AM
Our clients would like an automated fallover database server as well
as a database for reporting purposes.

At face value, mirroring would seem the better option. However, it
would appear that the users aren't able to run queries against the
mirrored database. See statement below from the MSDN article on
mirroring.

"Because the mirror database is in a recovering state, it cannot be
accessed directly. You can create database snapshots on the mirror to
indirectly read the mirror database at a point in time. (See 'Database
Mirroring and Database Snapshots' later in this paper.)"

Snapshots have the following drawbacks:

(1) The information help in the accessible database may be old.
(2) The additional resources to create the snapshot.
(3) Require enterprise edition (or developer edition) of SQL Server

In addition, I though I read somewhere about database mirroring not
being supported by Microsoft.

Therefore, an I correct in saying that a mirrored database is not
really an appropriate technology to use for near real-time reporting
and replication is a better option.
PromisedOyster
2/6/2007 5:12:10 AM
Thanks Hilary

According to Table 2: Database Mirroring and SQL Server 2005 Editions
in the article http://www.microsoft.com/technet/prodtechnol/sql/2005/
dbmirror.mspx, database snapshots are not available in the Standard
edition.

However, you have indicated that database snapshots are available in
the Standard Edition.


Which is correct?


[quoted text, click to view]

Hilary Cotter
2/6/2007 7:52:52 AM
Answers inline.

--
Hilary Cotter

Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com



[quoted text, click to view]

Mirroring isn't as scalable as replication. With high safety on all dml on
the principal is slower. With high performance there is no performance hit,
but in both modes it is only scalable up to 10 or so databases per instance.

[quoted text, click to view]

Plus it eats up disk space even when there are no transactions going to the
snapshot. It is also available in Standard and Enterprise editions.

[quoted text, click to view]

It is supported since SP1. There was a trace flag which enabled it in the
RTM version.

[quoted text, click to view]

Yes, replication is ideal for near real-time reporting. I should point out
that replication does not do automatic failover. Clustering and data base
mirroring do, but you aren't really able to offload reporting with these
technologies.

Hilary Cotter
2/6/2007 8:33:04 AM
Sorry PromisedOyster, I meant database mirroring is available in standard
and enterprise editions.

http://msdn2.microsoft.com/en-us/library/ms143761.aspx

My mistake.

--
Hilary Cotter

Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com



[quoted text, click to view]

Paul Ibison
2/6/2007 1:16:25 PM
You're correct that you can't run queries against the mirror, but you can
against the database snapshot of the mirror. Admittedly this has high
latency, so you could perhaps really compare replication and log shipping as
a better set of competing technologies:
http://www.replicationanswers.com/Standby.asp
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com

AddThis Social Bookmark Button