A talk I gave for SharePoint Saturday about doing warm disaster recovery using SQL AlwaysOn and how to use the secondary replica as read-only browse-able SharePoint site.
7. Log Shipping, Database Mirroring,
SQL AlwaysOn (new)
Log-shipping:
requires good understanding of LSN (Log Sequence Number).
if logs are shipped hourly, there is a window of 1-hour data loss if primary
server fails.
Database-mirroring:
1 DB can only be mirrored to 1 mirror server.
mirrored DB is not readable.
SQL AlwaysOn:
simply right-click Failover, no need to debug LSN why Restore failed.
real-time delta replication to replicas.
max 4 replicas.
secondary DB is readable.
9. Create Multi-Subnet Windows Server FailOver Cluster (WSFC)
SQL1 : 172.16.1.10 in Datacenter1 (Abu Dhabi)
SQL2 : 192.168.1.10 in Datacenter2 (Singapore)
13. Enable ALWAYS ON from SQL Server Properties
Do for both SQL1 and SQL2
14. High Availability vs
Disaster Recovery
http://technet.microsoft.com/en-us/library/jj841106.aspx
When you transfer data over WAN:
Choose Asynchronous-Commit in AlwaysOn Config.
Only Content Database, Secure Store, UserProfile, Managed Metadata
and other non-farm-specific databases can be replicated.
When you transfer data locally with less than 10ms latency:
Choose Synchronous-Commit in AlwaysOn Config.
All SharePoint databases (including Config_DB) can be replicated.
15. Warm-Standby
Disaster Recovery
2 separate SharePoint Farms:
SP1 uses SQL1 in Datacenter1 network (172.16.x.x)
SP1 has a site-collection http://intranet.zed.com
SP2 uses SQL2 in Datacenter2 network (192.168.x.x)
SP2 has a site-collection http://intranet-DR.zed.com
Content Database of SP1 http://intranet will be replicated to SQL2 via
Asynchronous AlwaysOn.
SQL2 will have this as read-only replica.
This will be mounted to http://intranet-DR2 and browse-able as read-only
data (to verify replication + maintain warmness).
17. Full Backup is required before replicating
After Full Backup is performed…
18. Add Replica SQL2 from Datacenter2
Click Add Replica and connect to SQL2
19. Make Replica #2 Readable
This allows us to mount replicated database
to Portal http://intranet-DR in Datacenter2 as
read-only site-collection for DR verification.
20. Make Replica #2 Readable
This allows us to mount replicated database
to Portal http://intranet-DR in Datacenter2 as
read-only site-collection for DR verification.
21. Data Initialization: pull via FileShare
For real-world usage, we may copy backups
to portable drive, ship it, and re-mount it.
Apply daily incremental until SQL1 and SQL2
are in the same state. Then choose Join-only.
25. Create new Web Application in DR Farm
1. Create new
WebApp, giving a
temporary database
name
2. After site-collection is
created, go to “Manage
Content Databases” and
remove the “_Init” DB from
Content Database
26. Mounting Read-Only Content_Intranet to DR Farm
3. Click Add content
database and type the
name of the replicated
database in AlwaysOn
Availability Group
4. Content_Intranet is now the
only Content DB for
http://intranet-DR
32. ROUTER1 running Routing & Remote Access Role
This allows the VMs to get Internet via the Host Internet, the
Host browser to access SharePoint inside VM, and
communication between Datacenter1 and Datacenter2.
33. Check WSFC before Failing Over Database
Make sure Windows Server FailOver Cluster is running
on DR Farm with IP 192.168.x.x , otherwise run
Move-ClusterGroup “Cluster Group”
34. Failover AlwaysOn Availability Group
1. On SQL2, we right-
click the SPIntranetAG
and Failover…
2. Confirm because of
asynchronous-commit,
data loss needs to be
acknowledged…
38. Failback Strategy
(back to SQL1 + SP1)
Upload something on current http://intranet (SP2).
Check if the file appears on current http://intranet-DR (SP1).
Once confirmed, do a SQL Failover from SQL2 back to SQL1.
Verify in WSFC that SQL1 is now the owner of SPIntranetAG
Availability Group.
Finally switch DNS back for intranet (to SP1) and intranet-DR (to SP2).