Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
Windows Server

Microsoft SQL Server 2008 R2 : Using Replication and Database Mirroring Together, Using Database Snapshots from a Mirror for Reporting

- How To Install Windows Server 2012 On VirtualBox
- How To Bypass Torrent Connection Blocking By Your ISP
- How To Install Actual Facebook App On Kindle Fire
6/28/2012 5:26:29 PM

Using Replication and Database Mirroring Together

SQL Server 2008 allows you to use combinations of options to achieve higher availability levels. A prime example would be to combine data replication with database mirroring to provide maximum availability of data, scalability to users, and fault tolerance via failover, potentially at each node in a replication topology. By starting with the publisher and perhaps the distributor, you make them both database mirror failover configurations. Figure 1 shows a possible data replication and database mirroring configuration (database mirroring of the publisher and database mirroring of the distributor).

Figure 1. Rolling out database mirroring failover within data replication for scalability, availability, and fault tolerance.

Using database mirroring and replication together is essentially the best of both worlds: you get the super-low latency of database mirroring for fault tolerance, and you get high availability (and scalability) of data through replication. The downside of this type of combined capability is that it requires additional servers (for mirroring of the databases). The upside is the increased scalability and resilience of your applications.

Using Database Snapshots from a Mirror for Reporting

A powerful configuration to help offload reporting workload is to use database snapshots with database mirroring. A database snapshot is a highly efficient feature of SQL Server 2008 that allows for the generation and use of a read-only, stable view of a database at a moment in time (hence, it’s called a snapshot). The database snapshot is also created without the overhead of creating a complete copy of the database or having completely redundant storage. A database snapshot is simply a reference point of the pages used in the database (that is defined in the system catalog). When pages are updated, a new page chain is started that contains the data pages changed since the database snapshot was taken, as illustrated in Figure 2.

Figure 2. Database snapshots and the original database share pages and are managed within the system catalog of SQL Server 2008.

As the original database diverges from a snapshot, the snapshot gets its own copy of original pages when they are modified. The copy-on-write technology used for database mirroring also enables a database snapshot. When a database snapshot is created on a database (a mirror database, in this case), all writes check the system catalog of changed pages first; if the snapshot is not there, the original page is copied (using copy-on-write) and is put in a place for reference by the database snapshot (because the snapshot must be kept intact). In this way, a database snapshot and the original database share the data pages that have not changed.

Unlike a mirror database, a database snapshot can be accessed by a reporting client in read-only mode, as shown in Figure 3. As long as the mirror server is communicating to the principal, reporting clients can access the snapshot database.

Figure 3. A database snapshot defined from a mirror server for reporting use.

If the principal fails over to the mirror server, the connections to the snapshot database are disconnected during the database restart process (which makes the mirror server the new principal server). It is possible to reconnect the reporting clients to the database snapshot after a failover is completed, but you must remember that now both the transactional clients and reporting clients are connected to a single SQL Server instance. This may not be acceptable from a performance point of view. Also, it is always a good idea to keep the number of snapshots to a minimum when creating them against a database mirror.

Other -----------------
- Microsoft SQL Server 2008 R2 : Migrate to Database Mirroring 2008 as Fast as You Can
- System Center Configuration Manager 2007 : Site Maintenance (part 3) - Obsolete Records
- System Center Configuration Manager 2007 : Site Maintenance (part 2) - Data Discovery Record (DDR) Retention
- System Center Configuration Manager 2007 : Site Maintenance (part 1) - Site Maintenance Tasks
- Backing Up the Exchange Server 2007 Environment : Using and Understanding the Windows Backup Utility
- Backing Up the Exchange Server 2007 Environment : Leveraging Local Continuous Replication
- Windows Server 2008 Server Core : Monitoring the File System with the FSUtil Command (part 4) - Transaction, USN & Volume
- Windows Server 2008 Server Core : Monitoring the File System with the FSUtil Command (part 3) - Reparse-Point, Resource & Sparse
- Windows Server 2008 Server Core : Monitoring the File System with the FSUtil Command (part 2) - FSInfo, Hardlink, ObjectID, Quota & Repair
- Windows Server 2008 Server Core : Monitoring the File System with the FSUtil Command (part 1) - Behavior, Dirty & File
 
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
- First look: Apple Watch

- 3 Tips for Maintaining Your Cell Phone Battery (part 1)

- 3 Tips for Maintaining Your Cell Phone Battery (part 2)
programming4us programming4us
Popular tags
Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 windows Phone 7 windows Phone 8
programming4us programming4us
 
programming4us
Natural Miscarriage
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Game Trailer