• AutoMon

    SQL server status alert stop ping alert notification Automon DBA SPs – AM08

    This script will try to connect the SQL service and notify an alert is it fails. Table: use dbadata go create table dbadata.dbo.dba_PingServers ( server varchar(255), uptime datetime , status varchar(255) --,loadtime datetime ) use dbadata_archive go create table dbadata_archive.dbo.dba_PingServers ( server varchar(255), uptime datetime , status varchar(255) , loadtime datetime )   SP: /* use dbadata go create table dbadata.dbo.dba_PingServers ( server varchar(255), uptime datetime , status varchar(255) --,loadtime datetime ) use dbadata_archive go create table dbadata_archive.dbo.dba_PingServers ( server varchar(255), uptime datetime , status varchar(255) , loadtime datetime ) */ USE [DBAData] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO -- select * from dbo.dba_PingServers -- Exec [DBAData].[dbo].[usp_prdServerPing_1]…

  • AutoMon

    Big transaction log file space usage alert notification Automon DBA SPs – AM07

    This script will check the large Transaction Log file used and notify an alert based on the threshold.   Table: USE [DBAdata] GO drop TABLE [dbo].[tbl_get_logfiles_Huge] CREATE TABLE [dbo].[tbl_get_logfiles_Huge]( [servername] [sysname] NULL, [dbname] [sysname] NOT NULL, [filename] [sysname] NOT NULL, [recovery_model] [sysname] NOT NULL, [log_size] [int] NULL, [log_reuse_wait_desc] [sysname] NOT NULL, [freespace] [varchar](50) NULL, [Drive_letter] [sysname] NULL ) USE [DBAdata_Archive] GO drop table tbl_get_logfiles_Huge CREATE TABLE [dbo].[tbl_get_logfiles_Huge]( [servername] [sysname] NULL, [dbname] [sysname] NOT NULL, [filename] [sysname] NOT NULL, [recovery_model] [sysname] NOT NULL, [log_size] [int] NULL, [log_reuse_wait_desc] [sysname] NOT NULL, [freespace] [varchar](50) NULL, [Drive_letter] [sysname] NULL, [Upload_date] [datetime] NULL )   SP: USE [DBAdata] GO /****** Object: StoredProcedure [dbo].[Usp_dba_send_logfiles_huge] Script Date:…

  • AutoMon

    Data file drive full low space alert notification Automon DBA SPs – AM06

    This script will check the Data file drive low space and notify an alert based on the threshold.   Table: use [DBAdata] drop table tbl_get_datafiles_size --select * from tbl_get_datafiles_size CREATE TABLE [dbo].[tbl_get_datafiles_size]( [servername] [sysname] NULL, [dbname] [sysname] NOT NULL, [filename] [sysname] NOT NULL, [data_size] [int] NULL, [freespace] [varchar](50) NULL, [Drive_letter] [sysname] NULL, ) use [DBAdata_Archive] drop table tbl_get_datafiles_size CREATE TABLE [dbo].[tbl_get_datafiles_size]( [servername] [sysname] NULL, [dbname] [sysname] NOT NULL, [filename] [sysname] NOT NULL, [data_size] [int] NULL, [freespace] [varchar](50) NULL, [Drive_letter] [sysname] NULL, [Upload_date] datetime )   SP: /* use [DBAdata] drop table tbl_get_datafiles_size --select * from tbl_get_datafiles_size CREATE TABLE [dbo].[tbl_get_datafiles_size]( [servername] [sysname] NULL, [dbname] [sysname] NOT NULL, [filename] [sysname] NOT NULL,…

  • AutoMon

    Transaction Log file drive full low space alert notification Automon DBA SPs – AM05

    This script will check the Transaction Log file drive low space and notify an alert based on the threshold. Table: use [DBAdata] go drop table tbl_get_logfiles_size CREATE TABLE [dbo].[tbl_get_logfiles_size]( [servername] [sysname] NULL, [dbname] [sysname] NOT NULL, [filename] [sysname] NOT NULL, [recovery_model] [sysname] NOT NULL, [log_size] [int] NULL, [log_reuse_wait_desc] [sysname] NOT NULL, [freespace] [varchar](50) NULL, [Drive_letter] [sysname] NULL ) use [DBAdata_Archive] drop table tbl_get_logfiles_size go CREATE TABLE [dbo].[tbl_get_logfiles_size]( [servername] [sysname] NULL, [dbname] [sysname] NOT NULL, [filename] [sysname] NOT NULL, [recovery_model] [sysname] NOT NULL, [log_size] [int] NULL, [log_reuse_wait_desc] [sysname] NOT NULL, [freespace] [varchar](50) NULL, [Drive_letter] [sysname] NULL, [Upload_date] [datetime] NULL )   SP: USE [DBAdata] GO /****** Object: StoredProcedure [dbo].[Usp_dba_send_logfiles_size] Script Date:…

  • AutoMon

    Drive space percentage low threshold alert notification Automon DBA SPs – AM04

    This will check all SQL server Drive and notify on the low space percentage based on the threshold. This will enable & disable Ole Automation Procedures, make sure, if you have system to be always enabled Ole Automation Procedures, comment the script based on the requirements.   Table: use DBAdata -- select * from DBAdata.dbo.DBA_All_Server_Space_percentage drop table DBA_All_Server_Space_percentage CREATE TABLE [dbo].[DBA_All_Server_Space_percentage]( [DRIVE] [char](1) NULL, [Lable_NAME] [varchar](50) NULL, [FREE_SPACE_IN_MB] [int] NULL, [used_SPACE_IN_MB] [int] NULL, [Total_SPACE_IN_MB] [int] NULL, [Precentage_free] NUMERIC(9,0) NULL, [SERVER_NAME] [varchar](50) NULL ) /*=====================================*/ -- select * from DBAdata_Archive.dbo.DBA_All_Server_Space_percentage use [DBAdata_Archive] drop table DBA_All_Server_Space_percentage CREATE TABLE [dbo].[DBA_All_Server_Space_percentage]( [DRIVE] [char](1) NULL, [Lable_NAME] [varchar](50) NULL, [FREE_SPACE_IN_MB] [int] NULL, [used_SPACE_IN_MB] [int] NULL, [Total_SPACE_IN_MB]…