16. Scaling Workloads

Database Snapshot Copy on Write:

Snapshot files .ss (preferred) or .mdf (alternate)

CREATE DATABASE db1
  ON PRIMARY (
    NAME='name',
    FILENAME='db.ss'
  )
  AS SNAPSHOT OF db2;

Replication

Need SQL Server Agent active

SnapshotAgent:

LogReaderAgent:

Sync type not auto require sysadmin

DistributionAgent account

Subscriber Account (db_owner for suscriber database)

All done through Wizard

Adding Always-On Readable Secondary Replicas

The main risk of using readable secondary replicas is that implementing snapshot isolation on the secondary replica can actually cause deleted records not to be cleaned up on the primary replica. This is because the ghost record cleanup task only removes rows from the primary once they are no longer required on the secondary.

2016+ Load balance R/O request