SQL 2012 Always On Replication Monitoring
Hello everyone,
A new feature in SQL 2012 is the Always On replication. It will allow you to replicate a database to a another SQL server and make it available in READ ONLY mode. This is a great addition to SQL Server and you can find out more in BOL (Books On Line) and a lot of places on the internet.
Once Always On is configured and running you should monitor its status to ensure that data is replicating. I have created the script below to help perform this task. You can add to this by placing the results in a table and have a SQL job update the table. Once an error is detected, you can have a report or email alert generated. It's basically up to you.
The last section of the code is commented out. This section is for testing the main script and you should modify and try it out then note the output from the main script.
This script creates no tables or stored procedures but you should test it on your development system first.
Enjoy!
Rudy
Download script here: https://docs.google.com/file/d/0B07PMQYOhF2DNy1OcVBhWmdRZFk/edit?usp=sharing
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.