GithubHelp home page GithubHelp logo

mattmc3 / sp_ag_health Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 1.34 MB

A SQL Server proc to put availability group (AG) health information at your fingertips.

License: MIT License

PLSQL 3.86% HTML 96.14%

sp_ag_health's Introduction

sp_ag_health

sp_ag_health aims to be a one-stop-shop for getting information about the health of your SQL Server availability groups.

Installation

Run sp_ag_health.sql in your master database.

Usage

-- Basic usage
exec sp_ag_health

-- You can set different thresholds if the defaults are not right for your environment
exec sp_ag_health @alert_log_send_queue_threshold=200000, @alert_redo_queue_threshold=200000

-- You can set the columns you care about. A minus in front of @orderby_columns means sort desc
exec sp_ag_health
     @select_columns='alerts,database_name,ag_name,ag_replica_server,ag_replica_role,log_send_queue_size_kb,redo_queue_size_kb'
     ,@orderby_columns='-alerts,ag_name,-database_name'

Diagrams

Microsoft provides an overview of their system views. The "Always On" section highlights the following structure:

System Views Map Always On

Here is a more detailed ERD with the fields from sp_ag_health flagged.

AlwaysOn

You can view even more detail here.

Notes

This proc is not 1.0 yet, and as such is subject to change! Changes may include:

  • Columns (additional, datatypes, names, order, etc)
  • Proc parameters (additional, names, order)
  • Others changes as necessary for design, performance, features, and maintainability

Resources

  • Get the Microsoft System Views Map here
  • See Microsoft system view docs here and here

sp_ag_health's People

Contributors

mattmc3 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.