Home > Articles > Databases > SQL Server

Monitoring and Troubleshooting Transactional Replication

Baya Dewald
  • PrintPrint
  • Share ThisShare This
  • DiscussDiscuss
Close WindowBaya Dewald

Baya Dewald

Learn more…

Recommended Practices for Analysis Services 2005/2008 Design
Feb 8, 2010
SQL Server Analysis Services 2005/2008 Administration
Jan 22, 2010
SQL Server 2005 Transactional Replication Agents
Oct 20, 2006
Replicating Code Modules with SQL Server 2005
Sep 15, 2006
Monitoring and Troubleshooting Replication Using SQL Server 2005
Sep 1, 2006
Maintaining Transactional Replication with SQL Server 2005
Aug 18, 2006
Setting Up Transactional Replication with SQL Server 2005
Aug 11, 2006
Monitoring and Tuning SQL Server with Profiler
Mar 3, 2006
Tips and Tricks Within Microsoft Analysis Services
Feb 24, 2006
Case Study of Building a Data Warehouse with Analysis Services (Part Two)
Feb 17, 2006
Case Study of Building a Data Warehouse with Analysis Services (Part One)
Feb 10, 2006
Developers vs. DBAs: Keys to Successful Cohabitation
Oct 6, 2005
SQL Server Transactional Replication Agents
Oct 22, 2004
Replicating Code Modules in SQL Server
Oct 15, 2004
Working with Analysis Services Cubes in SQL Server
Oct 1, 2004
Dimensional Databases: Building A Data Warehouse
Sep 17, 2004
SQL Server Log Shipping
Aug 20, 2004
Maintaining Transactional Replication
Apr 30, 2004
Monitoring and Troubleshooting Transactional Replication
Apr 23, 2004
Setting Up Transactional Replication with SQL Server
Mar 26, 2004
Introduction to Database Replication
Mar 5, 2004
SQL Server: Advantages and Drawbacks of User-Defined Functions
May 16, 2003
SQL Server User-Defined Functions (UDFs)
May 2, 2003
SQL Server String, Cursor, Security and Rowset Functions
Apr 18, 2003
Date, Math and Text Functions in SQL Server 2000
Apr 4, 2003
SQL Server System-Related Functions
Mar 14, 2003
Enhancing SQL Server Functionality with Functions
Feb 21, 2003
Optimizing Transact-SQL Code
Aug 9, 2002
SQL Server: Optimizing Database Performance Through Indexes
Aug 2, 2002
SQL Server: Tuning Database Design
Jul 26, 2002
SQL Server Tuning: Database Maintenance
Jul 19, 2002
Application Performance Tuning
Jul 12, 2002
Options Affecting SQL Server Locking Behavior
May 31, 2002
SQL Server: Blocking Problems
May 24, 2002
SQL Server: Details of Locking
May 17, 2002
SQL Server: Transaction and Locking Architecture
May 10, 2002
SQL Server and OPENXML
May 1, 2002
DTS Tips and Tricks
Mar 8, 2002
The DTS Object Model
Mar 1, 2002
Introduction to Data Transformation Services (DTS)
Feb 22, 2002
Normalizing Name Data in SQL Server
Jan 25, 2002
String Manipulations with SQL Server 2000
Jan 25, 2002
The EXPLICIT Mode of FOR XML
Jan 18, 2002
XML Support in Transact-SQL
Jan 18, 2002
Gathering Data for a Data Warehouse
Jan 11, 2002
Steps Involved in Building a Data Warehouse
Jan 11, 2002
Populating a Data Warehouse with SQL Server 2000
Nov 9, 2001
SQL Server: Determining Whether a Date is a Business Day
Nov 9, 2001

Sorry, this author hasn't posted any blogs.

So you set up replication and it works for a week. Then one fine day your pager goes off. Now what? Where do you look for clues? How do you troubleshoot? How can you tell if your replicated system performs well? Read on to find out the answers from Baya Pavliashvili.

In the second article in this series, Setting Up Transactional Replication, I showed you how to set up a simple publication and subscribe to it using replication wizards or scripts. After you set up replication, you need to ensure that it functions as expected. Furthermore, you need to see whether transactions get delivered to the subscribers in a timely fashion. Replication usually works very well, but as with any system, errors do crop up occasionally.

This article shows you how to check replication functionality and how to troubleshoot errors. As you might imagine, it is impossible to predict every error that you might encounter. Instead, I will show you how to detect errors and where to look for clues to troubleshoot replication issues.

Monitoring through the Replication Console

After you configure replication, the SQL Server Enterprise Manager displays a new folder called Replication Monitor at the distributor node. In fact, if you want to monitor replication but don't want to see other folders on the distribution server, you can right-click the Microsoft SQL Servers node under the console root and choose Show Replication Monitor Group. You should see a screen similar to that shown in the following figure.

Figure 1Figure 1

Note that the Replication Monitor contains folders for numerous agents, even if you're not using some of them. On my server, I use only Snapshot, Log Reader, and Distribution Agents because they are involved in transactional replication. Clicking each folder displays the details of work performed by each type of agent. An alternative way to monitor replication agents is to expand the publishers folder and select the specific publication you want to check out. If I click D10ZF411, for example, I can examine details of the sample publication I created for the previous article. If you look in the right pane of Enterprise Manager while a particular publication is selected, you see some useful information, as shown in the following figure.

Figure 2Figure 2

The first column in this view shows the type of agent being monitored. The Snapshot button is marked in red because it is stopped. Log Reader and Distribution agents have green arrows, indicating that both of them are running.

NOTE

The Distribution agent is denoted by using the server name: database name convention.

The Duration column tells us that it took 8 seconds to generate the initial snapshot. Furthermore this column informs us that Log Reader and Distribution agents have been running continuously for 7 hours and 38 minutes. The Delivery Rate column tells us that the Distribution agent has been delivering 21 commands per second on average. The Latency column is particularly interesting; replication latency measures the time it takes to deliver commands from the publisher to the distribution database and then to the subscriber(s). In this example, latency has been 7 seconds (7000 milliseconds) for the Log Reader agent and almost 10 seconds (9858 milliseconds) for the Distribution agent. The last three columns show the number of transactions, number of commands, and average number of commands per delivered transaction.

You can refresh the Replication Monitor view manually by right-clicking the publication and choosing Refresh or by letting the Enterprise Manager refresh it automatically. To change the automatic Refresh frequency, right-click the publication and choose Refresh Rate and Settings. Doing so activates the Refresh Rate and Settings dialog box shown in the following figure.

Figure 3Figure 3

  • Share ThisShare This
  • Your Account

Discussions

Make a New Comment

You must log in in order to post a comment.

Related Resources

There are currently no related podcasts. Please check back later.

Great password information at a small price
By John Traenkenschuh on June 13, 2009 No Comments

Where can cash-strapped security pro's get great information on security basics??

Steven HainesOracle Buys Sun of $7.4B
By Steven Haines on April 20, 2009 No Comments

In a stunning turn of events, Oracle steps in and buys Sun amist the breakdown of IBM's attempt to acquire Sun.

Buck WoodyIf it's Free it's for Me
By Buck Woody on January 26, 2009 No Comments

Sign me up for anything free these days. I just ran across a book that promises to help you build a web site for free...

See All Related Blogs

Informit Network