Transactional Replication – Understanding Latency By Abhay Chaudhary Database Architect (IBM India Pvt.Ltd.) MCTS\MCITP : SQL Server 2005, SQL Server 2008,

Slides:



Advertisements
Similar presentations
Implementing SQLServer AlwaysON Sarabpreet Singh Anand SQL Server – MVP SQLServerGeeks.com (VP)
Advertisements

Mecanismos de alta disponibilidad con Microsoft SQL Server 2008 Por: ISC Lenin López Fernández de Lara.
SQL Server Replication
SQL 2012 – Tabular for DBA’s By Karan Gulati (SQL BI – MCM)
Moving data using replication Anthony Brown
Toolbox Mirror -Overview Effective Distributed Learning.
Module 9: SQL Server 2005 Replication. Overview Overview of Replication Enhancements New Types of Replication Configuring Replication.
Today’s Agenda Chapter 12 Admin Tasks Chapter 13 Automating Admin Tasks.
SQL Server memory architecture and debugging memory Issues
SQL Server Replication By Karthick P.K Technical Lead, Microsoft SQL Server.
Maintaining a Microsoft SQL Server 2008 Database SQLServer-Training.com.
Troubleshooting From the Field – Part 2 SQL DIAG & SQL NEXUS By Ahmad Osama SQL Server Geeks - Editor In Chief and Regional Mentor(Delhi & NCR)
Troubleshooting SQL Server Enterprise Geodatabase Performance Issues
Module 4: Implementing Transactional Replication.
Intro to SQL Server Performance Tuning By Robert Biddle.
Oracle Tuning Ashok Kapur Hawkeye Technology, Inc.
Learningcomputer.com SQL Server 2008 – Administration, Maintenance and Job Automation.
Module 1: Exploring Replication. Overview Understanding SQL Server Replication Setting Up Replication Understanding Agents in Replication Securing Replication.
Overview – Chapter 11 SQL 710 Overview of Replication
Copyright © 2006 Quest Software Monitoring SQL Server Replication Presenter : Jim Katsos.
Module 6: Implementing SQL Server Replication in an Enterprise Environment.
1 Chapter Overview Introducing Replication Planning for Replication Implementing Replication Monitoring and Administering Replication.
Module 11: Introducing Replication. Overview Introduction to Distributed Data Introduction to SQL Server Replication SQL Server Replication Agents SQL.
1 Chapter Overview Performing Configuration Tasks Setting Up Additional Features Performing Maintenance Tasks.
A Brief Documentation.  Provides basic information about connection, server, and client.
Amit Bansal CTO | Peopleware India (unit of eDominer Systems) | |
IN-MEMORY OLTP By Manohar Punna SQL Server Geeks – Regional Mentor, Hyderabad Blogger, Speaker.
|
Chapter 12: Designing a Data- Archiving Solution MCITP Administrator: Microsoft SQL Server 2005 Database Server Infrastructure Design Study Guide (70-443)
DAT 412:Transactional Replication Internals
 Replication is the process of copying database information  Replication is used for:  Backing up your database  Migrating to a new server  Mirroring.
SQL Server 2005 Implementation and Maintenance Chapter 12: Achieving High Availability Through Replication.
CHANGE DATA CAPTURE: A BRIEF OVERVIEW PRESENTED BY TIM WEIGEL
SQL Server 2005 Engine Optimistic Concurrency Tony Rogerson, SQL Server MVP Independent Consultant 26 th.
Module 5: Implementing Merge Replication. Overview Understanding Merge Replication Architecture Implementing Conflict Resolution Planning and Deploying.
Alwayson Availability Groups
Maintenance Practices. Goal  Automate the necessary DBA chores to put organizations on the path of having healthier, consistent and more trustworthy.
DEV414 Black-belt ASP.NET Tips And Tricks For Your ASP.NET Applications Rob Howard Program Manager Web Platform and Tools Team.
Module 5: Managing Content. Overview Publishing Content Executing Reports Creating Cached Instances Creating Snapshots and Report History Creating Subscriptions.
Locking Internals By Amit R S Bansal Director, Principal Consultant & Trainer |
Strategies for Working with Texas-sized Databases Robert L Davis Database Engineer
SQL Server Replication HILARY COTTER SQL SERVER MVP
Does the Optimistic Concurrency resolve your blocking problems Margarita Naumova, SQL Master Academy.
IBM Software Group ® WebSphere ® Support Technical Exchange Transactions in WebSphere Process Server Lalitha Chandran.
SQL Server High Availability Introduction to SQL Server high availability solutions.
No more waiting. Sponsors About me  Database Technology Specialist  MVP  Blogger  Author 3
Transactional Replication it’s not scary Evgeny Khabarov.
Session Name Pelin ATICI SQL Premier Field Engineer.
SQL Replication for RCSQL 4.5
Transactional Replication Deep Dive
Distributed Database Management Systems
Monitoring Data Changes with Change Data Capture
Glasgow, SQL Server Meetup
Introduction to transactional replication
Navigating the options for Data Redundancy
Antonio Abalos Castillo
Example of a page header
Transactional replication
Distributed Database Management Systems
Introduction to Replication
Contained DB? Did it do something wrong?
IBM WEBSPHERE MESSAGE QUEUE online Training | IBM WEBSPHERE MQ Training
Transactional Replication A Deeper Dive Drew Furgiuele, Senior DBA IGS
Designing Business Intelligence Solutions with Microsoft SQL Server
Cloud Data Replication with SQL Data Sync
AlwaysOn Availability Groups
Jean Joseph DBA/Developer
Jean Joseph DBA\DEVELOPER
Disaster Recovery Done Dirt Cheap Founder Curnutt Data Solutions
Using wait stats to determine why my server is slow
Presentation transcript:

Transactional Replication – Understanding Latency By Abhay Chaudhary Database Architect (IBM India Pvt.Ltd.) MCTS\MCITP : SQL Server 2005, SQL Server 2008, SQL Server 2008 BI,MCTS: SQL Server 2008 DB Developer, OCP 9i

9+ years of Database Management experience. Ex- Microsoft PSS ( ). Blogging on SQL Server articles since Assist SQL Server technical community through various forums. Abhay Chaudhary

About SQLServerGeeks.com One of the fastest growing SQL Server communities Blogs, Articles, Podcasts, In-person events, webcasts Millions of page views People behind SQLServerGeeks: Amit Bansal, Sarabpreet Singh, Parikshit Savjani, Abhay Chaudhary, Raunak Jhawar, Ahmed Osama, Amit Karkhanis, Vasudev Menon, Ritesh Medhe, Rakesh Mishra, Piyush Bajaj, Rahul Sharma, Satnam Singh, Bhagwan Singh and more ….. If you want to contribute, us at or visit Join Us section on the website

Latency Where is the latency ? How much is the latency ? Few questions you need to answer Finding threads involved in latency –option 1 Finding threads involved in latency –option 2 (prefer) Reasons for Log Reader-Reader thread latency Reasons for Log Reader-writer thread latency Reasons for Dist Agent-Reader thread latency Reasons for Dist Agent-Writer thread latency References Agenda

Slowness of transaction delivery by either Log reader agent or Distribution agent or both. For log reader agent its slowness in picking up the transactions that are marked for replication in Publisher log. For Distribution agent it’s the slowness in picking up the transactions from the distribution database. Latency

Where is the latency ? If all the subscriptions of one publisher are affected then the latency is from publisher to distributor. If a few subscriptions of one publisher are affected then the latency is from distributor to subscriber.

Query MSLogreader_history and MSDistribution_history system table in Distribution agents. Example : select * from MSlogreader_history where order by time desc select * from MSdistribution_history where order by time desc What's next ? How much is the latency ?

Is the latency in reading the publisher log ? Is the latency in writing the data to the distributor ? Is the latency reading the data from distributor database ? Is the latency in writing the data to the subscriber tables ? Few questions you need to answer

Check the latest comments section of MSlogreader_history and MSdistribution_history tables in distribution DB. Log reader Check the latest comments section of MSDistribution_history and MSdistribution_history tables in distribution DB. Distribution agent State 1 = Normal State 2 = Reader Thread waits for Writer Thread State 3 = Writer thread waits for Reader thread Finding threads involved in latency –option 1

Stop the Distributor agent and check the job history. Finding threads involved in latency –option 2

Stop the Distributor agent and check the job history. Finding threads involved in latency –option 2 ……

Most common reasons are :  Big T-log size due to maintenance.  Very likely  large Batch(s) of replicated transactions.  Very likely  Storage latency (Slow Read IO)  High CPU \IO or load on the Server in due course of time.  likely Reasons for Log Reader -Reader thread latency

Most common reasons are :  Blocking on MSRepl_Transactions and MSRepl_Commands tables.  High IO\CPU load on the Dist server.  likely  No \less maintenance on MSRepl_Transactions and MSRepl_Commands tables.  Very likely  Storage Latency (Slow writes)  Network Latency  likely Reasons for Log Reader –Writer thread latency

Most common reasons are :  Large Batch of transactions  Very likely  Lack of maintenance (Fragmentation and stale stats )  Very likely  Keeping the publication snapshots  likely  Long execution of cleanup job causing latency  likely  Slow Storage (Read latency ) Reasons for Dist Agent -Reader thread latency

Most common reasons are :  Resource consuming queries running already  Very likely  Lack of maintenance  Very likely  Network issues  Storage issues  Too many indexes  Very likely  Blocking  Very likely  High CPU  Very likely Reasons for Dist Agent –Writer thread latency

How Transactional Replication Works Physical Architecture (Replication) Transactional Replication Overview sp_replcmds (Transact-SQL) sp_repldone (Transact-SQL) Solution Design Considerations (Replication) Designing and Implementing (Replication) Replication Agents Overview References

Connect with Abhay Chaudhary

Resolving Latency issues What’s next

Be a member Presentation & Scripts uploaded on Continue your learning…

Thank you for suggestions, please at