Download presentation
Presentation is loading. Please wait.
1
SQL Server Replication
2
Agenda Concepts Replication Types
Replicating to objects of different schema Bi-Di P2P Merge Merge Filtering Monitoring Performance Tips Troubleshooting Replication and Mirroring Replication and Ags Replication and Azure Replication and Linux
3
COncepts Publisher/Distributor/Subscriber/Gateway Publication Article
Transactional Replication Replicates Transaction COncepts
4
Move data closer to the consumer
Reduce contention Move data closer to the consumer Segregating data Why Replicate
5
Replication Types Snapshot Snapshot with Immediate Updating
Snapshot with Queued Updating Transactional Transactional with Immediate Updating Transactional with Queued Updating BiDi P2P Oracle Publishing Merge Replication
6
Demos Snapshot with immediate updating Transactional
Transactional to a different table on the same database Transactional to objects of different schemas BiDi P2P Initializing from a backup Merge Merge alternate snapshot folder Merge Filtering
7
BiDi notes Loopback_detection Fix Identity (odd even)
Not For Replication Schema Changes
8
Initialize From Backup
Requires Immediate Sync or does it? How to handle new articles/Publications? Initialize From Backup
9
P2p Getting Setup Internals Gotcha’s (EE/Dev only) Identity elements
Adding New Articles To Quiesce or not to Quiesce P2p
10
Monitoring Perfmon Query Replcounters Stats Tracer Tokens
Read Batch Size/Read Batch Threshold Monitoring
11
Performance Tuning – deploying the snapshot
Initialize from backup Database Snapshot (parameter of =‘database snapshot’ Index Builds are serial Multiple Publications must be applied one at a time No sync Performance Tuning – deploying the snapshot
12
Performance Tuning – Distribution Agent
Wait stats Balancing publications/Independent agent Replicating the execution of stored procedures MaxCmdsIntran SubscriptionStreams (KB & ) Performance Tuning – Distribution Agent
13
Performance tuning ReadBatchSize/ReadBatchThreshold
CommitBatchSize/CommitBatchThreshold Performance tuning
14
ReadBatchSize/ ReadBatchThreshold
15
ReadBatchSize (10000 singletons)
16
ReadBatchSize/ ReadBatchThreshold
Key take away for heavily logged activiy make these values high. For low logged activity (large batches/indexing) keep these low ReadBatchSize/ ReadBatchThreshold
17
Profiles
18
10000 Singletons
19
100 Batches of 100 singletons
20
Performance Tuning – publication maintenance
Never use GUI, always script Shut down SQL Server agent – or at least the log reader/distribution agents Rolllback tran Better to use a new publication than add an article Purging the distribution database Adding Indexes (not replicated)
21
Troubleshooting OutputverboseLevel Command line Profiler – exceptions
Extended Events Troubleshooting
22
Replication and mirroring
Remote Distributor Trace Flag 1448 Replication and mirroring
23
Replication and AGs Remote distributor sp_redirect_publisher
sp_validate_redirected_publisher sp_get_redirected_publisher sp_validate_replica_hosts_as_publishers
24
Replication and Linux SQL 2017 (CU 18) and above
Snapshot and Transactional supported Linux can be a publisher/subscriber/distributor Replication and Linux
25
Replication and Azure Transactional and Snapshot
Azure SQL DB & Azure VM, Azure SQL MI Azure SQL MI as a publisher in public preview database/replication-with-sql-database- managed-instance Limited subset of features Use SQL authentication Create an Alias
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.