High Availability (HA) and disaster recovery (DR) are complicated and important topics when we’re talking about our databases. One of the core responsibilities of a production dba is ensuring the databases are available so the applications and business users can access them. SQL Server has several options for us to implement to improve the resiliency and availability of our data, and once again there are commands within dbatools to make configuring and monitoring these solutions easier.
This chapter will take us through some of the high availability and disaster recovery options in SQL Server and show how dbatools can assist with managing these. First up - let’s talk about log shipping.
Log shipping is the process of backing up the transaction log of the primary database, and copying those backups off to one, or many, secondary copies - to keep them in sync. Since SQL Server 2000, this has been one of the most simple and effective options dbas have to implement HA and DR solutions.
SQL Server Management Studio often fails during simple Log Shipping deployments, but dbatools does not. This section will demonstrate how to implement log shipping using a single command.