Home Forums SQL Server 2012 SQL 2012 - General Troubleshooting Replication: Get servers/subscribers from MSREPL_ERRORS RE: Troubleshooting Replication: Get servers/subscribers from MSREPL_ERRORS

  • Hello,

    Merge replication:

    USE distribution

    go

    SELECT MSmerge_agents.subscriber_name ,

    *

    FROM MSrepl_errors

    JOIN MSmerge_history ON MSrepl_errors.id = MSmerge_history.error_id

    JOIN MSmerge_agents ON MSmerge_agents.id = MSmerge_history.agent_id

    ORDER BY MSrepl_errors.time DESC

    Don't have transactional replication to test, should be

    USE distribution

    go

    SELECT MSdistribution_agents.subscriber_name ,

    *

    FROM MSrepl_errors

    JOIN MSdistribution_history ON MSrepl_errors.id = MSdistribution_history.error_id

    JOIN MSdistribution_agents ON MSdistribution_agents.id = MSdistribution_history.agent_id

    ORDER BY MSrepl_errors.time DESC

    If the subscriber_name returns null, use the MSdistribution_agents.Name or MSmerge_agents.Name column for analisys

    Best Regards,

    Vladimir