Search results matching tag 'Disaster Recovery'http://www2.sqlblog.com/search/SearchResults.aspx?o=DateDescending&tag=Disaster+Recovery&orTags=0Search results matching tag 'Disaster Recovery'en-USCommunityServer 2.1 SP2 (Build: 61129.1)Mission Critical Performance Enhancements in SQL Server 2014 on DBTA.comhttp://www2.sqlblog.com/blogs/kevin_kline/archive/2014/11/28/mission-critical-performance-enhancements-in-sql-server-2014-on-dbta-com.aspxFri, 28 Nov 2014 14:54:00 GMT21093a07-8b3d-42db-8cbf-3350fcbf5496:56758KKline<p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;font-size:13.3333339691162px;line-height:19px;"><img class="aligncenter wp-image-6283 size-full" alt="kekline2" width="300" height="300" style="display:block;margin-left:auto;margin-right:auto;" src="http://kevinekline.com/wp-content/uploads/2014/11/kekline2.jpg"></p><p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;font-size:13.3333339691162px;line-height:19px;">&nbsp;<br></p><p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;font-size:13.3333339691162px;line-height:19px;">Microsoft has three major feature sets that they are advancing with SQL Server 2014 (SQL2014). One is called “Mission Critical Performance.”&nbsp; Microsoft wants to stake out this ground not only as performance enhancements in the relational engine, but also those features which support better data availability, performance, security, and data integration.</p><p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;font-size:13.3333339691162px;line-height:19px;">Read the rest of my article at&nbsp;<a href="http://www.dbta.com/Columns/SQL-Server-Drill-Down/Mission-Critical-Performance-Enhancements-Coming-in-SQL-Server-2014-92530.aspx">http://www.dbta.com/Columns/SQL-Server-Drill-Down/Mission-Critical-Performance-Enhancements-Coming-in-SQL-Server-2014-92530.aspx</a></p><p class="MsoNormal"><span style="font-size:10pt;line-height:107%;font-family:Georgia, serif;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">-Kev<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10pt;line-height:107%;font-family:Georgia, serif;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">P.S. Let’s connect on social
media! I’m active on:<span class="apple-converted-space">&nbsp;</span></span><a href="http://twitter.com/kekline"><span style="font-size:10pt;line-height:107%;font-family:Georgia, serif;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">Twitter</span></a><span class="apple-converted-space"><span style="font-size:10pt;line-height:107%;font-family:Georgia, serif;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">&nbsp;</span><span style="font-size:10pt;line-height:107%;font-family:Georgia, serif;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">|<span class="apple-converted-space">&nbsp;</span></span></span><a href="http://www.facebook.com/kekline"><span style="font-size:10pt;line-height:107%;font-family:Georgia, serif;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">Facebook</span></a><span class="apple-converted-space"><span style="font-size:10pt;line-height:107%;font-family:Georgia, serif;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">&nbsp;</span><span style="font-size:10pt;line-height:107%;font-family:Georgia, serif;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">|<span class="apple-converted-space">&nbsp;</span></span></span><a href="http://www.youtube.com/user/KevinEKline"><span style="font-size:10pt;line-height:107%;font-family:Georgia, serif;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">YouTube</span></a><span class="apple-converted-space"><span style="font-size:10pt;line-height:107%;font-family:Georgia, serif;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">&nbsp;</span><span style="font-size:10pt;line-height:107%;font-family:Georgia, serif;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">|<span class="apple-converted-space">&nbsp;</span></span></span><a href="http://www.linkedin.com/in/kekline"><span style="font-size:10pt;line-height:107%;font-family:Georgia, serif;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">LinkedIn</span></a><span class="apple-converted-space"><span style="font-size:10pt;line-height:107%;font-family:Georgia, serif;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">&nbsp;</span><span style="font-size:10pt;line-height:107%;font-family:Georgia, serif;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">|<span class="apple-converted-space">&nbsp;</span></span></span><a href="http://kevinekline.com/"><span style="font-size:10pt;line-height:107%;font-family:Georgia, serif;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">Blog</span></a><span class="apple-converted-space"><span style="font-size:10pt;line-height:107%;font-family:Georgia, serif;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">&nbsp;</span><span style="font-size:10pt;line-height:107%;font-family:Georgia, serif;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">|<span class="apple-converted-space">&nbsp;</span></span></span><a href="http://www.slideshare.net/kkline84/presentations"><span style="font-size:10pt;line-height:107%;font-family:Georgia, serif;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">SlideShare</span></a><span style="font-size:10pt;line-height:107%;font-family:Georgia, serif;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">.</span><span style="font-size:10.0pt;line-height:107%;mso-ascii-font-family:Calibri;mso-fareast-font-family:Calibri;mso-hansi-font-family:Calibri;mso-bidi-font-family:'Times New Roman';mso-no-proof:yes;"><o:p></o:p></span></p>
<p style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;font-size:13.3333339691162px;line-height:19px;"><a style="font-family:Georgia, serif;font-size:10pt;line-height:107%;" href="https://plus.google.com/u/1/113032055249023350257?rel=author">-Google
Author</a>&nbsp;</p>SSMS 2012 Restore GUI Gotchahttp://www2.sqlblog.com/blogs/merrill_aldrich/archive/2013/03/15/ssms-2012-restore-gui-gotcha.aspxFri, 15 Mar 2013 16:30:07 GMT21093a07-8b3d-42db-8cbf-3350fcbf5496:48261merrillaldrich<p>Today I want to bring to your attention an issue in the SQL Server Management Studio 2012 restore GUI. In many ways the new restore dialog is nicer than the old one, with new features and added convenience – but, as is always the Achilles heel of GUI tools like this, if you don’t know what’s really going on it can bite you. I’m not sure what to call this issue, maybe just a UI design flaw. Technically it works as designed, and there’s nothing really wrong with it, so it’s not a bug. But I can imagine it really causing someone pain who is careless or doesn’t know what’s happening behind the scenes.</p> <blockquote> <p><strong>Restoring a copy of a database make take the original down.</strong></p> </blockquote> <p>Among the new features is some management of “Tail-Log Backups,” which is a wonderful idea. Taking a <a href="http://msdn.microsoft.com/en-us/library/ms179314(v=sql.110).aspx">backup of the tail of the log</a> will take down the database and put the whole end of the log into a backup file, preserving basically all modifications to the DB from the log. This is ideal, for example, at the last step of migrating a database using log shipping, because all the activity is preserved and the source database is locked against further modifications. The log chain is preserved in moving to the new copy of the database, or in a DR scenario, to your other server.</p> <p>The problem is, I know a lot of people don’t know this. Often its people who use the GUI a lot, such as “accidental DBAs.” I think the GUI is really important despite those who rarely use it, or frown on it.</p> <p>Here’s the issue: Suppose I have a production database that has some user-created problem (like a user accidentally updated some rows.) It may be reasonable to restore a copy of the database to a point before the issue and investigate whether it’s possible to merge the data back in. The original database isn’t damaged from a technical point of view – there’s no corruption, for example.</p> <ol> <li>Right-click the original source database and choose <strong>Tasks &gt; Restore &gt; Database …</strong> from the context menu.</li> <li>The resulting dialog will go out and discover the backup files for that database from MSDB, which is very helpful.</li> <li><strong>Change</strong> the name of the target database, in order to restore it as a copy.</li> </ol> <p><a href="http://sqlblog.com/blogs/merrill_aldrich/RestoreGUIIssueCap1_0C53DDEF.png"><img title="RestoreGUIIssueCap1" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;float:none;padding-top:0px;padding-left:0px;margin-left:auto;border-left:0px;display:block;padding-right:0px;margin-right:auto;" border="0" alt="RestoreGUIIssueCap1" src="http://sqlblog.com/blogs/merrill_aldrich/RestoreGUIIssueCap1_thumb_4BB1917F.png" width="644" height="313" /></a></p> <p>There’s a note at the top of the dialog that, while accurate, may not help some in this scenario. It says, “A tail-log backup of the source database will be taken.” Sounds innocuous if you don’t know what that implies. In past versions, restoring a copy of a database would never affect the original – or not by default, anyway – so I cringe as I imagine people merrily clicking past this warning.</p> <p>The script you get with these settings is indeed composed with a tail-log backup of the source database:</p> <p><a href="http://sqlblog.com/blogs/merrill_aldrich/RestoreGUIIssueCap2_0B0F4510.png"><img title="RestoreGUIIssueCap2" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;float:none;padding-top:0px;padding-left:0px;margin-left:auto;border-left:0px;display:block;padding-right:0px;margin-right:auto;" border="0" alt="RestoreGUIIssueCap2" src="http://sqlblog.com/blogs/merrill_aldrich/RestoreGUIIssueCap2_thumb_4EE37967.png" width="698" height="174" /></a></p> <p>That will, as indicated, take a tail-log backup – and thereby take the original database down. Nice if you wanted that, but a mean surprise if you didn’t.</p> <p>If you act on the warning and click the Options tab, and then uncheck the offending setting, you do get the expected behavior (the original database is unaffected because the tail-log backup is not included at the top of the script):</p> <p><a href="http://sqlblog.com/blogs/merrill_aldrich/RestoreGUIIssueCap3_357B762D.png"><img title="RestoreGUIIssueCap3" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;float:none;padding-top:0px;padding-left:0px;margin-left:auto;border-left:0px;display:block;padding-right:0px;margin-right:auto;" border="0" alt="RestoreGUIIssueCap3" src="http://sqlblog.com/blogs/merrill_aldrich/RestoreGUIIssueCap3_thumb_6E26203A.png" width="644" height="315" /></a></p> <p>So, be careful out there!</p>Paul Randal’s Disaster Recovery Step-by-Step Posterhttp://www2.sqlblog.com/blogs/argenis_fernandez/archive/2013/02/07/paul-randal-s-disaster-recovery-step-by-step-poster.aspxThu, 07 Feb 2013 18:09:00 GMT21093a07-8b3d-42db-8cbf-3350fcbf5496:47539Argenis<p>If you were looking for Paul Randal’s [<a href="http://www.sqlskills.com/blogs/paul/">Blog</a>|<a href="http://www.twitter.com/PaulRandal">Twitter</a>] DR poster and couldn’t
find it anywhere on the net, I have good news for you: I saved a copy on my PC
before it was taken down, and (with Paul’s permission) wanted to make it
available here.</p>
<p>So, without further ado, enjoy the poster.</p>Microsoft Windows Azure Disaster Recovery Options for On-Premises SQL Serverhttp://www2.sqlblog.com/blogs/buck_woody/archive/2013/01/08/microsoft-windows-azure-disaster-recovery-options-for-on-premises-sql-server.aspxTue, 08 Jan 2013 14:40:00 GMT21093a07-8b3d-42db-8cbf-3350fcbf5496:47070BuckWoody<p>One of the use-cases for a cloud solution is to serve as a Disaster Recovery option for your on-premises servers. I&rsquo;ll explain one particular use-case in this entry, specifically using Windows Azure &ldquo;IaaS&rdquo; or Virtual Machines as a Recovery Solution for SQL Server (more detail here: <a href="http://www.windowsazure.com/en-us/home/features/virtual-machines/" target="_blank">http://www.windowsazure.com/en-us/home/features/virtual-machines/</a>). In future installments I&rsquo;ll explain options for other workloads such as Linux and Windows Servers, SharePoint and other solutions. Some architectures also allow for using Windows Azure SQL Database (Formerly SQL Azure) in recovery scenarios; I&rsquo;ll cover that separately.</p>
<p>Using Azure as a Disaster Recovery site gives you a range of options, uses world-wide datacenters that you can pick from, and does not require traditional licensing and maintenance paths. You can also integrate the offsite data into other uses, such as reporting (in some cases) or to leverage within other applications.&nbsp; However, the cost-model is different, so make sure you do your homework to ensure that it makes sense to use a cloud provider for safety. You may find that it is cheaper, more expensive, or that you require a mix of technologies and options to get the best solution.</p>
<p style="padding-left:30px;"><span style="color:#339966;"><em>NOTE: The Microsoft Windows Azure platform evolves constantly. That means new features and capabilities, as well as security, optimizations and more improve on a frequent basis. As with any cloud provider, ensure that you check the date of this post to ensure you are within six months or so. If the date is longer than that, then check each of the &ldquo;Details&rdquo; links to ensure you are working with the latest information. </em></span></p>
<p>The options you have range from simple off-site storage for database backups to systems that your users can access when your primary options are offline.&nbsp; To select which options to use, evaluate the databases you want to protect, and then create your Recovery Point Objectives (RPO) and Recovery Time Objectives (RTO) for each workload. Those two vectors will provide the starting point for each choice you make.</p>
<p style="padding-left:30px;"><em>NOTE: If you&rsquo;re not familiar with RPO and RTO on a database system, learn those terms carefully before designing a recovery solution &ndash; on any platform. RPO and RTO are business/technology terms, and are not vendor or platform-specific. <a href="http://wikibon.org/wiki/v/Recovery_point_objective_-_recovery_time_objective_strategy" target="_blank">http://wikibon.org/wiki/v/Recovery_point_objective_-_recovery_time_objective_strategy</a>&nbsp; </em></p>
<p>The range of protection you have is very similar to the on-premises options for SQL Server (on-premises details here: <a href="http://msdn.microsoft.com/en-us/library/ms190202.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/ms190202.aspx</a>), with the primary limitation being bandwidth. While Microsoft has the largest connections we can get into our datacenters, depending on where your systems are and their connection to the Internet, you will need to consider how much data you transfer, and how often.&nbsp; For backup files, a single, larger transfer is acceptable, using Log Shipping or Database Mirroring, smaller, more frequent transfers are preferable.</p>
<p>Another limitation is controlling the hardware on the Windows Azure Virtual Machine. That means hardware-based clustering isn&rsquo;t possible, as of this writing. You&rsquo;re also limited to the size of the Virtual Machines that Windows Azure (or any other cloud provider) offers. It&rsquo;s important to keep in mind that you&rsquo;re building a Disaster Recovery solution, not necessarily a full Highly-Available system. The difference is that in this case DR provides a means to recover and operate at a more limited fashion than a full on-premises HA (with matching hardware and licenses) involves. Storage, however, isn&rsquo;t as affected. You can mount large amounts of storage on a Windows Azure Virtual Machine, so it&rsquo;s more memory and CPU that you need to consider for your solution.</p>
<p>The final consideration is security. There are two aspects in security that you need to consider: data security and authentication and access. For the first consideration, the Windows Azure system does hold multiple certifications and attestations that you can find here:&nbsp; . In some cases those certifications are agreements on the part of security each party will hold liability for; so it&rsquo;s important to carefully read and understand what the agreement states. There are also methods of encrypting data (such as the backups) using your own certificates or hardware devices and then storing them externally. This means no one can easily un-encrypt your data.</p>
<p>For the authentication portion, you can create a secure &ldquo;tunnel&rdquo;&nbsp; between your network and Windows Azure. This involves a certificate that is installed on your hardware firewall at your facility, and an agent that is enabled with the same certificate on Windows Azure. This gives you a &ldquo;point to point&rdquo; connection, encrypted but over a public connection. From there you can use Active Directory to connect the authentication for the systems involved in the DR solution.</p>
<h2><strong>Backups</strong></h2>
<p>The First and most simple DR solution using Windows Azure is to store your backup files (<em>*.bak</em>) in Windows Azure storage. Windows Azure Storage is triple-redundant across multiple fault-domains within a single datacenter, and then all three copies are replicated to a geographically separate (although data-sovereignty same) location. That translates to six copies of data stored remotely. In case of a disaster, you connect to storage, download the images, and restore them to a new server. The server can have the same name or different, and unless you&rsquo;re using contained databases, you&rsquo;ll need to re-create and re-authorize the security accounts needed for the database.</p>
<p><a href="http://sqlblog.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-79-79/6740.HADR1.png"><img src="http://sqlblog.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-79-79/6740.HADR1.png" alt="" width="353" height="89" border="0" /></a></p>
<p>Note that you also have the option of using an &ldquo;appliance&rdquo;, which is a piece of hardware you install at your facility which will act as a backup device or share location (or both). The device handles the encryption, de-duplication and compression for the files, and then stores those files on Windows Azure. More information on that option is here: <a href="http://www.storsimple.com/" target="_blank">http://www.storsimple.com/</a></p>
<p><span style="color:#0000ff;"><em>RPO: As of last backup</em></span></p>
<p><span style="color:#0000ff;"><em>RTO: (Time of transfer from Windows Azure + Time of Restore to New System + Bringing System Online with User Accounts) - Time of Backup</em></span></p>
<p><span style="color:#993300;">References:</span></p>
<p>More detail on storing files on Windows Azure: <a href="http://sqlblog.com/blogs/sqlos_team/archive/2013/01/24/backup-and-restore-to-cloud-simplified-in-sql-server-2012-sp1-cu2.aspx" target="_blank">http://sqlblog.com/blogs/sqlos_team/archive/2013/01/24/backup-and-restore-to-cloud-simplified-in-sql-server-2012-sp1-cu2.aspx</a>&nbsp;</p>
<p>Free Client: <a href="http://azurestorageexplorer.codeplex.com/" target="_blank">http://azurestorageexplorer.codeplex.com/</a></p>
<h2><strong>Database Mirroring</strong></h2>
<p>Database Mirroring is a deprecated feature in SQL Server, which means it will be removed in a future release. It is, however, still supported in SQL Server 2012, and it can be used between on-premises SQL Server Instances and Windows Azure VM&rsquo;s.&nbsp; Using connection strings and .NET languages, clients can actually point to the partner server automatically.</p>
<p>The granularity of this solution is at the individual database level.&nbsp; Machines can retain their individual identities. You can use certificates to connect the systems, or you can use the point-to-point solution and Active Directory.</p>
<p><a href="http://sqlblog.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-79-79/6874.HADR3.png"><img src="http://sqlblog.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-79-79/6874.HADR3.png" alt="" width="354" height="133" border="0" /></a></p>
<p>There are limitations, however. You won&rsquo;t use a Listener in this configuration, and you&rsquo;ll be using Asynchronous mode. If you are not running in the same Active Directory, you&rsquo;ll also need to factor in the time to re-create and tie out those accounts when calculating the RTO value.</p>
<p>&nbsp;<a href="http://sqlblog.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-79-79/4212.HADR2.png"><img src="http://sqlblog.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-79-79/4212.HADR2.png" alt="" width="332" height="130" border="0" /></a></p>
<p><span style="color:#0000ff;"><em>RPO: As of last good synchronization</em></span></p>
<p><span style="color:#0000ff;"><em>RTO: (Time of failure + Time of client redirect to New System ) - Time of last good synchronization</em></span></p>
<p><span style="color:#993300;">References:</span></p>
<p>A complete tutorial on setting up this configuration is here: <a href="http://msdn.microsoft.com/en-us/library/jj870964.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/jj870964.aspx</a></p>
<h2><strong>Log Shipping</strong></h2>
<p>Another feature available for DR in a Hybrid fashion is using Log Shipping, which also protects your system at a database level. Log shipping involves an automated log backup of your database, and the log is copied and then applied at the secondary server. Because the log file is copied to a Windows share, this solution requires both networking access and an Active Directory integration.</p>
<p><a href="http://sqlblog.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-79-79/3146.HADR4.png"><img src="http://sqlblog.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-79-79/3146.HADR4.png" alt="" width="429" height="180" border="0" /></a>&nbsp;</p>
<p><span style="color:#0000ff;"><em>RPO: As of last good log backup application to the secondary system</em></span></p>
<p><span style="color:#0000ff;"><em>RTO: (Time of failure + Time of manual client redirect to New System + Time of Manual Failover ) - Time of last good log backup</em></span></p>
<p><span style="color:#993300;">References:</span></p>
<p>Log Shipping information is here: <a href="http://technet.microsoft.com/en-us/library/ms187103.aspx" target="_blank">http://technet.microsoft.com/en-us/library/ms187103.aspx</a></p>
<h2><strong>AlwaysOn Availability Groups</strong></h2>
<p>SQL Server 2012 introduces a new set of features called &ldquo;AlwaysOn&rdquo; that encompass many of the HA/DR features in previous releases. One feature within that set is called &ldquo;Availability Groups&rdquo;, and with certain caveats that feature is available for a Hybrid on-premises to Windows Azure VM solution.</p>
<p><a href="http://sqlblog.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-79-79/7183.HADR5.png"><img src="http://sqlblog.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-79-79/7183.HADR5.png" alt="" width="390" height="136" border="0" /></a>&nbsp;</p>
<p>AlwaysOn requires a Windows Cluster (WFSC), which is where the caveats come into play. You&rsquo;re able to set up a&nbsp; multi-subnet WSFC cluster, but you won&rsquo;t have access to the Availability Group Listener function, so you need to consider the client reconnection.</p>
<p><span style="color:#0000ff;"><em>RPO: As of last good synchronization</em></span></p>
<p><span style="color:#0000ff;"><em>RTO: (Time of failure + Time of manual client redirect to New System + Time of Manual Failover ) - Time of last good log backup</em></span></p>
<p><span style="color:#993300;">References: </span></p>
<p>A complete tutorial on setting up this configuration is here: <a href="http://msdn.microsoft.com/en-us/library/jj870959.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/jj870959.aspx</a></p>
<p>Real-world notes and testing here: <a href="http://sqlblog.com/b/igorpag/archive/2013/09/02/sql-server-2012-alwayson-availability-group-and-listener-in-azure-vms-notes-details-and-recommendations.aspx" target="_blank">http://blogs.msdn.com/b/igorpag/archive/2013/09/02/sql-server-2012-alwayson-availability-group-and-listener-in-azure-vms-notes-details-and-recommendations.aspx</a></p>
<h2><strong>Other Solution Options</strong></h2>
<p>Taking an overview approach, you can use other data transfer mechanisms. While these involve more manual coding and architecture, you do have more control. For instance, you could copy the data to multiple locations, platforms and more, and allow reading and manipulations of the data at the destination. You can use code options or even SQL Server Replication (blog on this process is here: <a href="http://tk.azurewebsites.net/2012/07/17/how-to-setup-peer-to-peer-replication-in-azure-iaas-sql-server-2012/" target="_blank">http://tk.azurewebsites.net/2012/07/17/how-to-setup-peer-to-peer-replication-in-azure-iaas-sql-server-2012/</a>)</p>
<p><span style="color:#0000ff;"><em>RPO: Varies</em></span></p>
<p><span style="color:#0000ff;"><em>RTO: Varies</em></span></p>
<p><span style="color:#993300;">References:</span></p>
<p>A whitepaper on the information I've discussed throughout this article and other options is available here: <a href="http://msdn.microsoft.com/en-us/library/jj870962.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/jj870962.aspx</a></p>
<p>The &ldquo;SQL AlwaysOn&rdquo; Team Blog (where you may find more current information) is here: <a href="http://sqlblog.com/b/sqlalwayson/" target="_blank">http://blogs.msdn.com/b/sqlalwayson/</a></p>High-Availability White Papers and Resources for SQL Serverhttp://www2.sqlblog.com/blogs/kevin_kline/archive/2012/07/26/high-availability-white-papers-and-resources-for-sql-server.aspxThu, 26 Jul 2012 15:00:00 GMT21093a07-8b3d-42db-8cbf-3350fcbf5496:44457KKline<div class="mceTemp" style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;"><div class="mceTemp"><a rel="attachment wp-att-2011" href="http://kevinekline.com/2012/07/26/high-availability-white-papers-and-resources-for-sql-server/charlotte-sql-ug/"><img class="size-medium wp-image-2011" title="Charlotte SQL UG" alt="" width="300" height="168" style="border:0px none;cursor:default;margin:0px;padding:0px;-webkit-user-drag:none;" src="http://kevinekline.com/wp-content/uploads/2012/07/Charlotte-SQL-UG-300x168.jpg"></a>In foreground, attendee makes dreaded "shoot myself" hand sign to the speaker.</div><p>I was just telling the good people of Charlotte about how they (and how YOU) need to read all things by Paul Randal (<a title="Paul Randal's Blog" href="http://www.sqlskills.com/BLOGS/paul/">blog</a>&nbsp;|&nbsp;<a title="Paul Randal's Twitter Feed" href="http://twitter.com/paulrandal">twitter</a>), except for all of his&nbsp;<a title="Maybe He Did Write a Romance Novel, Maybe He Didn't" href="http://www.amazon.com/forum/romance?cdForum=FxM42D5QN2YZ1D&amp;cdThread=Tx2769ZA6OCU1BD">cheesy romance novels</a>&nbsp;like&nbsp;<a title="Quite Possibly The Worst Romance Novel EVER" href="http://www.amazon.com/Caress-and-Conquer-ebook/dp/B006IUV50A/ref=sr_1_2?ie=UTF8&amp;qid=1343317555&amp;sr=8-2&amp;keywords=Caress+and+Conquer+by+Connie+Mason"><em>Caress and Conquer</em></a>&nbsp;written under the nom de plum of Connie Mason.</p><p>There's lots more good stuff from Paul, just not romantic.</p><p>This is a 'so-last-version' whitepaper describing &nbsp;five common high-availability and disaster-recovery architectures deployed by customers, along with a case study of each. Although the white paper is specific to SQL Server 2008 R2 and isn't updated for AlwaysOn features, it's still really, really good. &nbsp;It covers:</p><ul><li>Failover Clustering for High Availability with Database Mirroring for Disaster Recovery</li><li>Database Mirroring for High Availability and Disaster Recovery</li><li>Geo-Clustering for High Availability and Disaster Recovery</li><li>Failover Clustering for High Availability Combined with SAN-Based Replication for Disaster Recovery</li><li>Peer-to-Peer Replication for High Availability and Disaster Recovery</li></ul><p>You can get it from&nbsp;<a href="http://download.microsoft.com/download/5/B/D/5BD13FFA-5E34-4AE1-9AA0-C6E6951B8FC8/SQL%20Server%202008%20R2%20High%20Availability%20Architecture%20White%20Paper.docx">this link</a>. &nbsp;Not everything is transferable to new AlwaysOn technologies, but then again AlwaysOn is an Enterprise Edition feature. &nbsp;So the database mirroring recommendation can be upsized, in many if not all cases, to SQL Server 2012, while the SAN and peer-to-peer recommendations continue to hold fast.</p><p>In addition, I encourage you to get up to speed on AlwaysOn. &nbsp;There are two great AlwaysOn FAQs that I recommend.&nbsp; The first is Microsoft’s official AlwaysOn FAQ at&nbsp;<a href="http://msdn.microsoft.com/en-us/sqlserver/gg508768.aspx">http://msdn.microsoft.com/en-us/sqlserver/gg508768.aspx</a>.&nbsp; The second comes from my buddy and high-availability expert Allan Hirt (<a title="Allan Hirt, Mr. SQLHA" href="http://www.sqlha.com/">blog</a>&nbsp;|&nbsp;<a title="Allan Hirt's Twitter Feed" href="http://twitter.com/sqlha">twitter</a>) at&nbsp;<a href="http://www.sqlha.com/2012/04/13/allans-alwayson-availability-groups-faq/">http://www.sqlha.com/2012/04/13/allans-alwayson-availability-groups-faq/</a>.</p><p>To get started with AlwaysOn, check out&nbsp;<a href="http://msdn.microsoft.com/en-us/library/cc645581.aspx">http://msdn.microsoft.com/en-us/library/cc645581.aspx</a>.</p><p>Enjoy,</p><p>-Kev</p></div>Bug-Out Bags and Cloud Architecture Considerationshttp://www2.sqlblog.com/blogs/buck_woody/archive/2012/01/20/bug-out-bags-and-cloud-architecture-considerations.aspxFri, 20 Jan 2012 17:00:58 GMT21093a07-8b3d-42db-8cbf-3350fcbf5496:41196BuckWoody<p>I served in the U.S. Military for a while, and as part of my training we had to maintain a “Bug-Out Bag”, which was a large duffle-bag full of certain items that we could live on/fight with in an emergency. I’ve carried the spirit of that idea forward with me into civilian life, in Florida and especially here in the Pacific Northwest.</p> <p>In Florida we dealt with the threat of hurricanes - I went through four of those in one year that hit my area. You’re without power, it floods quickly, and it gets wicked hot. You roof might be gone, whatever. Here in the Pacific Northwest, I live near one of the largest volcano's in the world, we have flooding, and recently we were hit with an ice-storm. Now I’ve lived all over the world, from Alaska to North Dakota and <a href="http://en.wikipedia.org/wiki/Shemya" target="_blank">even near the Kamchatka Peninsula in Russia</a>, and I can handle the snow. But ice - that’s a toughie no matter where you live. We had so much that it split my little pine tree in front of the house in half. </p> <p><a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-79-79-metablogapi/8168.P1030729.jpg"><img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="P1030729" border="0" alt="P1030729" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-79-79-metablogapi/6180.P1030729_5F00_thumb.jpg" width="244" height="184" /></a>&#160;<a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-79-79-metablogapi/5428.P1030728.jpg"><img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="P1030728" border="0" alt="P1030728" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-79-79-metablogapi/7178.P1030728_5F00_thumb.jpg" width="244" height="184" /></a></p> <p>We lost power - although I think the folks at Puget Sound Energy did an amazing job at getting us back up in less than 24 hours, but we weren’t worried anyway. That bug-out bag mentality carried forward to a “second pantry” we keep in the garage. </p> <p>We have a large plastic box (that will fit in the back of the Subaru) with dried goods like pasta, and canned goods and even a little cook stove. We have 25 gallons of clean water in Jerry-Cans. We have batteries, candles and matches. And we have flashlights around every door. We use supplies from the “pantry” to fill our house pantry, and then refill the emergency one from the grocery store. That way everything is fresh, rotated, and we can “bug-out” here at home or on the road. </p> <p>So what does this have to do with Distributed Computing Architectures?</p> <p><em>It’s the thought process</em>. In both the military and civilian life, I’ve done a few things:</p> <ol> <li>Sat down and thought carefully about exactly what I need. Did I include a can-opener? A small shovel to dig out of whatever I got stuck in? Then I weed out what I *really* don’t need.</li> <li>Put those things into a small, manageable container. </li> <li>Tried them - even when (especially when) I didn’t have an emergency</li> <li>Tweaked the process to see what I could do better.</li> </ol> <p>Have you done this when you moved an app to the “cloud”? Each of these has a computing parallel - do you know what you would do if you couldn’t access the Distributed Computing Environment?</p> <p>I’ve found these thoughts are actually a great place to start - keeps the process simplified from the start, and gives you a sense of assurance when you’re asked if you can recover from an emergency. </p>T-SQL Tuesday #19: Blind Spotshttp://www2.sqlblog.com/blogs/merrill_aldrich/archive/2011/06/14/t-sql-tuesday-19-blind-spots.aspxTue, 14 Jun 2011 05:31:59 GMT21093a07-8b3d-42db-8cbf-3350fcbf5496:36218merrillaldrich<p>A while ago I wrote a post, <a href="http://sqlblog.com/blogs/merrill_aldrich/archive/2011/03/07/visualize-disaster.aspx">Visualize Disaster</a>, prompted by a real incident we had <a href="http://www.allenkinsel.com/archive/2011/06/invitation-for-t-sql-tuesday-19-disasters-recovery/"><img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;float:right;border-top:0px;border-right:0px;padding-top:0px;" title="TSQL2sDay150x150" border="0" alt="TSQL2sDay150x150" align="right" src="http://sqlblog.com/blogs/merrill_aldrich/TSQL2sDay150x150_7A6347E2.jpg" width="154" height="154" /></a>at my office. Fortunately we came through it OK from a business point of view, but I took away an important lesson: it’s very easy, whether your organization and your team is savvy about disaster recovery or not, to have significant blind spots with regard to recovery in the face of some large, unexpected outage. We have very clear direction and decent budgets to work with, and the safety and recoverability of applications and data is a real, primary objective at my workplace – and <em>still</em> this was a take-your-breath-away, eye opening kind of experience. Here are some common places I have seen such blind spots in my past work. Perhaps you can have a look around you and see if you see these wherever you are today, and maybe some ways to combat them:</p> <h2>Invincibility Blind Spot</h2> <p>I think most of us have worked at a place where the leadership is just oblivious to the idea that anything damaging could happen to their business from an IT failure. I did some consulting at a place where one of the owners flat-out told me, “I’m not sure all this technology really helps us. It’s certainly not essential. We could go back to pencil and paper and be just fine.” I knew just from watching their operation for a short time that if they lost their technology, they would probably go straight out of business. Their server was the type you see pictures of as jokes on the web – in an un-conditioned room, with an oscillating fan aimed at it, on a rickety shelf, shared password, etc.</p> <p>This can be hard to combat. A typical organization like this would look at ideas like backup or disaster recovery, and immediately balk because it “sounds expensive” or “there isn’t time for that, because it’s not real work.” And they aren’t always small companies – one place I did work for had 1500 employees and essentially no DR strategy other than some half-hearted tape backups.</p> <p>The only way I have gotten traction with these cases is to do two things: </p> <ol> <li>Make sure the leadership hears the argument for DR from someone they trust and that has credibility <em>with them</em>. In some cases, that was me, once I built trust working with them. In other cases the argument, right or wrong, had to come from someone else – perhaps another business person, not even in I.T. – for it to carry any weight.</li> <li>Once you have that voice that carries real weight, walk the leaders of that organization through a visualization of what could really happen if they lost their infrastructure: the sending people home, the loss of credibility with customers, the real, no-hand-waving, no-magic amount of time it would take to recreate a functional system, the work lost. It has to be real, and it has to burst that imaginary bubble that can surround computer technology and make it seem like it’ll just somehow keep working. A building fire is usually a good scenario, because you don’t have to be in IT to relate.</li> </ol> <h2>Ego Blind Spot</h2> <p>The Ego blind spot is somewhat trickier. The place this can lurk is with capable IT staff who do have a mandate to make DR work, but whenever they are approached about discussing DR or testing their systems, may become defensive or make excuses. There can be an undercurrent in the conversation that insinuating that DR isn’t “covered” by their systems is some sort of an insult. Often that undercurrent actually comes from insecurity – there may really be gaps in their systems that they privately worry over, but don’t want to crack open and solve because either a. it’s embarrassing or b. they don’t relish the extra work and risk it could take to reconfigure a running system. These folks generally have the best intentions, but getting at the gaps in the technology can be a real problem, just because of personalities.</p> <p>Here the only remedy I know of is sociological – the business continuity leader (or the IT team lead, if it’s the same person) has to have the leadership skills to win these folks over. The technical staff have to be in a position where finding the DR gaps and improving their systems is something they perceive will provide an opportunity to demonstrate, and not threaten, their skills. It has to feel like a worthwhile project. It’s almost impossible to get at the underlying problems any other way. The leader in this scenario will need their technical expertise, their on-the-ground view of how systems really work to even locate the issues, and for that, grudging cooperation will not do. Working DR has to become a real part of the staff’s fully owned, personal priorities. If the person who knows the low-level detail about how a system works is armed with DR know-how, and committed to making DR work, the gaps will disappear. If, on the other hand, the technical people don’t want to see the gaps, and the leadership isn’t capable of seeing the gaps, the gaps will remain until some incident exposes them.</p> <h2>Magic System Blind Spot</h2> <p>This is an interesting one – the Magic System blind spot is essentially a blind faith that some of the latest gee-whiz tech is the silver bullet that will save everything. “We have DR covered because we virtualized.” “We have DR covered because we replicate.” “We have DR covered because we load balance.” “Disaster can’t touch us – we have a <em>SAN</em>!” </p> <p>“Cloud.” </p> <p>I’ve seen naïve, young people succumb, I’ve seen leadership (the ones out of touch with the technology, generally) succumb, but surprisingly I have also seen savvy people I would never have expected succumb to this.</p> <p>The remedy here looks simple to a staffer, but maybe difficult to a leader: no matter what a vendor claims or advertises, what we imagine a magical system can do, you <em>must</em> have someone available who, impartially, knows how that technology works enough to dispel the magic. All this stuff works for a reason. Using dedupe? Make sure someone on staff understands how that really works. Snapshots? <em>How.</em> Relying on virtualization for DR? <em>Exactly how does that work?</em> Only by unpacking how these systems do what they do can you be sure they will work at crunch time.</p> <h2>Devil in the Details Blind Spot</h2> <p>Lastly, we have the blind spot that is the nemesis of us all. The one present in every organization, extremely difficult to stamp out, “When we fail over, when the data center goes down, <em>will it work?”</em> This is a simple question, but here’s why it is so difficult: every system has so many moving parts, each of which perhaps requires specialized knowledge, and a seemingly small detail that nobody thought of can absolutely wreck the DR process when you have a real incident. It’s very easy to have a scenario where practically everything works except that one tiny thing that prevents it all working – the database is there, the web servers are up, we have network connectivity and name resolution <em>but everyone forgot that the encryption key to the whoozit has to be loaded into the whatchacallit.</em> It’s really easy to miss something. And because the something that was missed is small, maybe nobody took it very seriously.</p> <p>Remedies for this are more difficult. For some organizations with the finances, it might be possible to actually run multiple data centers and, in fact, fail production systems between them. That would ensure the design is sound. Most of us, though, have to use test systems and then just try our darnedest to be really careful.</p> <p>If you can’t test with production systems, the next best thing would be to have a pre-prod or staging system that is comparable to production where you can do rehearsals. Such a rehearsal can be a drill around some imaginary scenario, say “It’s 5:00 am and Data Center A is on fire. (This is a drill.) Go.” </p> <p>Failing that, the only recourse – and it’s much less accurate – is a careful and detailed tabletop visualization. Visualizations like this are great, and valuable, if they are run well. Vital ingredients:</p> <ol> <li>Effective leadership that can persuade people to check egos at the door and take it seriously. Without buy-in, you never get to the details that matter.</li> <li>A facilitator that can ask relevant but probing questions, in order to eliminate the inevitable hand-waving that masks gaps in the system. Example: “At this point we would load the logins into the DR SQL Server.” The facilitator should <em>not</em> say “OK.” She should say “From where? How? Who?”</li> <li>Detail. Everything in a reasonably sane organization works at a high level. It’s only by diving into the details and making a visualization real that you uncover those small, system-breaking gaps.</li> <li>Note takers. In every tabletop I’ve attended, a huge number of issues were uncovered, and in order to get the most value, it’s important to capture them all right then, in the room. Otherwise they escape!</li> </ol> <p>Do you see one of these four blind spots in your organization? Others? Any tips or processes for stamping them out? I’d love to hear.</p>SQL Azure Use Case: Shared Storage Applicationhttp://www2.sqlblog.com/blogs/buck_woody/archive/2011/04/26/sql-azure-use-case-shared-storage-application.aspxTue, 26 Apr 2011 13:33:50 GMT21093a07-8b3d-42db-8cbf-3350fcbf5496:35207BuckWoody<p><span style="font-size:x-small;"><em><span style="font-size:small;">This is one in a series of posts on when and where to use a distributed architecture design in your organization's computing needs. You can find the main post here: </span><a href="http://blogs.msdn.com/b/buckwoody/archive/2011/01/18/windows-azure-and-sql-azure-use-cases.aspx"><span style="font-size:small;"><u><font color="#800080">http://blogs.msdn.com/b/buckwoody/archive/2011/01/18/windows-azure-and-sql-azure-use-cases.aspx</font></u></span></a><span style="font-size:small;"> </span></em></span></p> <p><strong><span style="font-size:small;">Description:</span></strong></p> <p><span style="font-size:small;">On-premise data will be a part of computing for quite some time – perhaps permanently. Bandwidth requirements, security, or even financial considerations for large data sets often dictate that relational (on non-relational) systems will be maintained locally in many organizations, especially in enterprise computing. </span></p> <p><span style="font-size:small;">But distributed data systems are useful in many situations. Organizations may wish to store a portion of data off-site, either for sharing the data with other applications (including web-based applications) or as a supplement to a High-Availability and Disaster Recovery (HADR) strategy.</span></p> <span style="font-size:small;"> <p><strong><span style="font-size:small;">Implementation:</span></strong></p> <p><span style="font-size:small;">SQL Azure can be used to add an additional option to an HADR strategy by copying off portions (or all) of an on-premise database system.</span></p> <p><span style="font-size:small;"><a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-79-79-metablogapi/3386.sql_2D00_aHADR_5F00_2.png"><img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="sql-aHADR" border="0" alt="sql-aHADR" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-79-79-metablogapi/4265.sql_2D00_aHADR_5F00_thumb.png" width="298" height="181" /></a></span></p> <p><span style="font-size:small;">In this arrangement, on-premise systems remain as they are. Data is replicated using many technologies, such as SQL Server Integration Services (SSIS), scripts, or Microsoft’s Sync Framework to a SQL Azure database. This data can be kept “cold”, meaning that a manual process is required to bring the data back, or as a “warm” standby using connection string management in the application.</span></p> <p><span style="font-size:small;">Recently we architected a solution where a company kept a rolling two-week window of data replicated to SQL Azure using the <a href="http://msdn.microsoft.com/en-us/sync/default.aspx" target="_blank">Sync Framework</a>. The application, a compiled EXE running on user’s systems, had a “switch connections” button, that allowed the users to take a laptop to another location, select that option, and continue working from anywhere they had Internet connectivity. This required forethought and planning, and did not replace their primary HADR systems, but it did allow them to continue operations in the case of a severe outage at multiple sites. Since they are an emergency services provider, this gave them the highest redundancy.</span></p> <p><span style="font-size:small;">Another option is to amalgamate data from disparate sources. </span></p> <p><span style="font-size:small;"><a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-79-79-metablogapi/6320.sql_2D00_aHyb_5F00_2.png"><img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="sql-aHyb" border="0" alt="sql-aHyb" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-79-79-metablogapi/2625.sql_2D00_aHyb_5F00_thumb.png" width="342" height="134" /></a></span></p> <p><span style="font-size:small;">In this arrangement, two or more data services (one of which is SQL Azure) are accessed by a single program. The program queries each system independently, and using LINQ a single query can work across all of the data, assuming there is some sort of natural or artificial “key” that can join the data sets together. The user programs simply view this single data set as a single data source, unaware of the underlying data sets. This allows great flexibility and agility in the downstream program. The upstream data sources can change as long as the elements are kept consistent.</span></p> <p><span style="font-size:small;">There are performance and security implications to amalgamated data systems, but if architected carefully they provide multiple benefits. A few of of these are that other systems can access the individual data sources, reporting is simplified and standardized, and multiple copies of data are eliminated.</span></p> <span style="font-size:small;"> <p><strong><span style="font-size:small;">Resources:</span></strong></p> <p><span style="font-size:small;">You can read more about the Sync Framework and SQL Azure here: <a href="http://social.technet.microsoft.com/wiki/contents/articles/sync-framework-sql-server-to-sql-azure-synchronization.aspx">http://social.technet.microsoft.com/wiki/contents/articles/sync-framework-sql-server-to-sql-azure-synchronization.aspx</a>&#160;</span></p> <p><span style="font-size:small;">If you are new to LINQ, you can find more resources on it here: <a href="http://msdn.microsoft.com/en-us/library/bb308959.aspx">http://msdn.microsoft.com/en-us/library/bb308959.aspx</a>&#160;</span></p> </span></span>Scandalous II: Shh! I am De-duplicating Compressed Backupshttp://www2.sqlblog.com/blogs/merrill_aldrich/archive/2011/04/23/scandalous-ii-shh-i-am-de-duplicating-compressed-backups.aspxSat, 23 Apr 2011 05:01:50 GMT21093a07-8b3d-42db-8cbf-3350fcbf5496:35122merrillaldrich<p>This is part II of <a href="http://sqlblog.com/blogs/merrill_aldrich/archive/2011/03/25/scandalous-i-virtualization-is-a-workaround-duck.aspx">two Scandalous posts</a>. Watch, mouth agape, as I run with scissors, right up against prevailing wisdom! Unfollow me now, before it’s too late!</p> <p>Here’s the thing. There are two really outstanding posts out there on the ‘tubez that explain in vivid detail the problems with sending compressed data into a de-duplicating appliance. And these guys are both absolutely right. Everything in their posts is correct, and I would ask that, if you haven’t, you please read them before mine:</p> <p>First, Brent Ozar:</p> <p><a title="http://www.brentozar.com/archive/2009/11/why-dedupe-is-a-bad-idea-for-sql-server-backups/" href="http://www.brentozar.com/archive/2009/11/why-dedupe-is-a-bad-idea-for-sql-server-backups/">http://www.brentozar.com/archive/2009/11/why-dedupe-is-a-bad-idea-for-sql-server-backups/</a>&#160;</p> <p>(And, may I say, well done on the Numero Uno Google result for that post. Very nice!)</p> <p>Next Denny Cherry:</p> <p><a title="http://itknowledgeexchange.techtarget.com/sql-server/sql-backup-compression-and-backup-dedup-are-mortal-enemies/" href="http://itknowledgeexchange.techtarget.com/sql-server/sql-backup-compression-and-backup-dedup-are-mortal-enemies/">http://itknowledgeexchange.techtarget.com/sql-server/sql-backup-compression-and-backup-dedup-are-mortal-enemies/</a>&#160;</p> <p>(A very respectable #3 on the Google-ometer.)</p> <p>Now, I’m not kidding. These guys know their stuff, and they are right. Stop reading right now.</p> <p>&#160;</p> <p>&#160;</p> <p>&#160;</p> <p>&#160;</p> <p>Still here? Ok, now come closer.</p> <p><font size="1">Closer.</font></p> <blockquote> <p><font size="1">Shh.</font></p> </blockquote> <blockquote> <p><font size="1">I studied this whole thing very carefully, and I do it anyway.</font></p> </blockquote> <p><font size="2">While it’s true that de-duplication works poorly with compressed data, and if you compare the de-dupe ratios for “usual” uncompressed files with the de-dupe ratios for compressed files, the compressed data looks very, very bad. But there’s even more to this story, so much more that we decided to, in a limited way, stuff the compressed files into our DDR anyway.</font></p> <p><font size="2">Here’s why:</font></p> <p><font size="2">Both SQL Server backups and file compression are a deterministic process. If you back up the same database twice, and it has the same data pages in it, and those pages are largely unchanged, then the backup files will be substantially the same. This is true if you compress both files with the same algorithm and settings, too – the data in the compressed files will be largely identical. It will not be like any OTHER files on your network, but the two files will be similar to one another.</font></p> <p><font size="2">If you change a small percentage of the data pages in the data file, that will still be true: a compressed backup of the database on, say, Monday will be mostly the same as a compressed backup of the same database, with modest changes, on Tuesday.</font></p> <p><font size="2">What that means is that if I have a 1 TB database, which I do, that produces a 250 GB compressed backup file, and that database receives mainly incremental changes from day to day or week to week, then each successive backup will be similar to the previous one. And if I copy them into a de-duplicating store (at least the one I have to work with) then, while the first file will be basically 100% net new data, the second will de-dupe against the first. It’s not as effective as other types of files, but it does help. Let’s say, for argument, that I get 75% de-duplication of only the two files, instead of the normal 85%+ across many instances of other files, I am still getting 75% de-duplication, and that can be very useful.</font></p> <p><font size="2">Useful how? Well, we have SAN replication married to our de-duplicating store for offsite backup and disaster recovery. That means that each night I have to transmit a LOT of SQL backup data across a WAN to another site. What’s a lot? For me, that just means the pipe is small and the data is much bigger. And that process would go a lot faster if, somehow, by magic, a whole lot of the data were already at the other end of the pipe before I start.</font></p> <p><font size="2">See where I’m going with this? With de-duplicated files, as days and weeks pass, each time we replicate new files from one site to the other, a whole lot of the data <em>is already there at the other site</em>. We only have to transmit the net new data. Even if that’s only 50% (a very poor performance number for de-duplicated storage in most people’s minds) that’s still cutting the data in <em>half.</em> Which is pretty good. Plus it’s compressed, which helps every <em>other</em> aspect of the backup story.</font></p> <p><font size="2">So we have what I think is a good compromise, born out by internal testing:</font></p> <ol> <li><font size="2">Keeping compressed SQL Backups in de-duplicated storage <em>indefinitely,</em> as a replacement for tapes, is impractical. It’s just too expensive. So we keep the SQL Backups in there only for the purpose of DR, and we have a pretty aggressive purge schedule to be rid of old files. The sweet spot seems to be to keep only a week or two.</font></li> <li><font size="2">We use tapes too, for archival purposes, and they have longer retention.</font></li> <li><font size="2">We back up to local (DAS or SAN) disks first at the SQL Server and then copy into the de-duplicating store, so that the backup process performs well and isn’t bottlenecked at the network or at the speed the appliance can receive the files. So backups go to disk, then get copied into the de-dupe store, cancel against whatever is in there, and then it replicates them off site.</font></li> </ol> <p><font size="2">This is not a cheap setup, but it works great. I love it. That 250 GB file I mentioned is available at my other site in a couple of hours, because it’s always mostly there already. Your mileage may vary depending on all the specifics of the technology you have, and, as I said, Brent and Denny are right.</font></p> <p><font size="1">* Professional driver on a closed course; don’t try this at home; no animals were de-duped in the production of this post. </font></p> <p><font size="2"></font></p> <p><font size="2">&#160;</font></p>Visualize Disasterhttp://www2.sqlblog.com/blogs/merrill_aldrich/archive/2011/03/08/visualize-disaster.aspxTue, 08 Mar 2011 05:21:00 GMT21093a07-8b3d-42db-8cbf-3350fcbf5496:33951merrillaldrich<P><STRONG>Or, How Mirroring Off-Site Saved my #Bacon</STRONG></P>
<P>My company does most things right. Our management is very supportive, listens and generally funds the technology that makes sense for the best interest of the organization. We have good redundancy, HA and disaster recovery in place that fit our objectives. Still, as they say, bad things can happen to good people. This weekend we did have an outage despite our best efforts, and that’s the reason for this post. It went pretty well for my team, all things considered, but we’d put in a lot of preparation.</P>
<H2>It’s a Matter of When and How, not If.</H2>
<P>If you work in this industry it’s very likely that you will be hit with something like this at some point. It’ll come when you don’t expect it, in a way you probably didn’t imagine. What separates the women from the girls, so to speak, is how ready you are for the unexpected when it happens. In sports there’s a technique called “positive visualization” or “mental rehearsal” where a skier, or other athlete goes through his or her whole run beforehand, imagining each gate and how they will successfully navigate the course. As far as I have seen it’s quite effective for creating the right mindset to have a successful run, and it’s something I use in planning for failover or disaster recovery. I thought I’d take a minute, fresh from my recent hair-graying experience, to remind everyone to go through this exercise.</P>
<H2>Imagine Your Datacenter is Gone</H2>
<P>For this to be effective, you have to really go through it in detail, like the skier imagining every gate. You get a phone call, and find out every server in your primary datacenter is offline, and no one knows exactly why. (I am altering the scenario here a little to respect the privacy of my company, but in reality the reason doesn’t matter.) Let’s say the UPS caught fire, or the sprinklers went off, or someone forgot to put diesel in the generator, or there was an earthquake, or a meteor. Fact is, you had a highly redundant infrastructure with failover clusters and backup power and RAID and dual power supplies and redundant everything and <EM>still</EM> your whole site went down. </P>
<P>It happens. A lot.</P>
<P>First, are you in a company that has not invested in a DR strategy and is totally unprepared? If so, then I would strongly suggest going through this exercise, at a high level, with your boss. An outage like this can and does put whole companies out of business, and if you have a CIO, he or she might not be the CIO afterward.</P>
<H2></H2>
<H2></H2>
<H2></H2>
<H2>Really Do this Detailed Thought Experiment</H2>
<P>Let’s say, for the sake of argument, that your datacenter will be partially offline for four days (I am improvising here, and you can too, but make it realistic). Run through these visualizations, and imagine how you handle it in your environment:</P>
<OL>
<LI>Do you have your data? How much data is lost? The servers are offline, and you’re not getting anything from their local drives. Not full backups, not log backups. Nada. Tape drive is there, but has no power. Is there an up-to-date copy at another site? Or recent backups at another site? If so, what’s the recovery point (ie. how old is it) and what would that mean for your business? <BR>But don’t stop with the data -</LI>
<LI>If you have another server at another site, can all your applications and/or users actually connect to it? Connection strings in place? How do you repoint everything so that the failover server can be used? It’s easy to gloss over this issue, but think it through in detail: will you have to have staff go and change individual machines to connect to another server? This can be a really sticky problem.</LI>
<LI>Is there enough bandwidth between your users and your DR site to sustain the normal workload?</LI>
<LI>So you have data, and clients that can point to it. Can they authenticate? Are all the logins in place from the old server? Remember, you can’t reach the old box, can’t query it – there is no way to take a look at this point and see what logins were there. How do you recover authentication? If you are using SQL auth, what about all those passwords? Even if you use mirroring or log shipping, the login issue can still take your system down.</LI>
<LI>Now, hopefully, you have connections and users authenticating. What about those SQL Agent jobs? Are the jobs all present on your failover machine? How will you know?</LI>
<LI>Use SSIS in your environment? Where are the packages? Do those fail over to your DR site too? How are the DR copies kept current?</LI>
<LI>Keep going like this down every subsystem you use – replication, ETL processes, reporting, etc.</LI></OL>
<P>The answers to all these questions will be different for you, but the importing thing is that there should <EM>be</EM> real, working answers. In the middle of the night, sitting at the keyboard, you can’t be figuring this stuff out.</P>
<P>I am pretty happy with what we have built at my office – though I am careful not to get complacent. We use a combination of mirrored failover clusters (that is, failover clusters in two datacenters, with database mirroring synchronizing them over our WAN) and de-duplicated backup files that are SAN-replicated offsite to provide two channels of offsite backup. For some older systems we are still on log shipping, but plan to advance those to mirroring as soon as our ISVs and budgets permit. We use some custom SQL Agent/PowerShell jobs to propagate logins and jobs between the sites – which jobs we had to actually use this weekend for the first time. I am happy to report, they worked. Whew.</P>
<P>On the other hand, I came from a company that was much more reckless, and effectively had no failover strategy whatsoever. They were frankly just too cheap to do it. Looking back, it terrifies me, because I know how simple it could be for them to lose their whole business.</P>
<P><STRONG>Edit 3/11/2011</STRONG></P>
<P><STRONG>With the earthquake in Japan, this is in the forefront of many people's minds today. Please have a look at these other posts, esp. Paul Randal's survey:</STRONG></P>
<P><A href="http://www.sqlskills.com/BLOGS/PAUL/post/Surveys-DR-plan-testing-and-considering-human-nature.aspx">http://www.sqlskills.com/BLOGS/PAUL/post/Surveys-DR-plan-testing-and-considering-human-nature.aspx</A>&nbsp;</P>
<P><A href="http://www.sqlha.com/blog/">http://www.sqlha.com/blog/</A>&nbsp;</P>
<P>Could be a good time to approach the boss about this important topic.</P>