Home > replication > Replication (Publisher Log File)

Replication (Publisher Log File)

  • With transactional replication you have a log reader that reads the log file on the pulisher.  Replication only gives you eyes into the distribution database (assuming the log reader has already put all transactions into the distribution database.  Here is a script you can run on the publisher to see how many transactions are in the publishers log file waiting to be picked up by the Log Reader.  This runs on the publisher (Good candidate to be set up as a reporting services report to be emailed to the DBA’s hourly)
declare @DatabaseName varchar(100)
SET @DatabaseName = '<PublisherDatabaseNameHere>'

    instance_name as DatabasName,
    cntr_value as Num_Pending_Trans,
        when cntr_value > 10000 
            then 'ALERT' 
        else ' ' 
    End as Status
FROM sys.dm_os_performance_counters
WHERE counter_name = 'Repl. Pending Xacts'
and instance_name IN (@DatabaseName)
Categories: replication
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: