This post will guide you, how to add SQL instances into the monitoring table to collect the data from servers. This needs to be run in each of the target server scripts i.e. whatever server we are adding into monitoring. Use CMS registered server version wise. So that, it is easy to run in one shot. -- add server -- Check HA -- enable dac -- CREATE SP FOR % SPACE & PERFMON -- ADD in Registered server -- add in table ========================= IP changes need to be update in Backup calendar table -- =============================== /*Since the SP name is same for both SQL and non SQL linked server, make…
-
-
Automon completion and job creation scheduling from agent DBA
Once we have configured all linked server setup and we can create a job in the agent based on the alert we wanted to email. Following image will give some idea, how many jobs can be created with combined of SP and sctipts. Job to be created: Hoping this will give some idea.
-
Automon linked server working status report alert notification Automon DBA SPs – AM25
This script will check the Automon linked server status and notify an alert, when it is not running. SP: /* use [DBAdata] drop table tbl_Linked_Server_Status go CREATE TABLE [dbo].[tbl_Linked_Server_Status]( [servername] varchar(200), error_no bigint, errors varchar(2000), Date datetime ) */ -- select * from tbl_Linked_Server_Status use [DBAdata] go -- Exec [DBAdata].[dbo].[Usp_Linked_server_Status_Check] --DROP PROC [Usp_Linked_server_Status_Check] alter PROCEDURE [dbo].[Usp_Linked_server_Status_Check] /* Summary: Check the SQL agent stats Contact: Muthukkumaran Kaliyamoorhty SQL DBA Description: Check the SQL agent stats ChangeLog: Date Coder Description 2013-jan-21 Muthukkumaran Kaliyamoorhty Updated the 2012 functionality */ --WITH ENCRYPTION AS BEGIN SET nocount ON -- select * from dbadata.dbo.tbl_Linked_Server_Status Truncate table dbadata.dbo.tbl_Linked_Server_Status DECLARE @server_name SYSNAME DECLARE @DESC SYSNAME --DECLARE @sql…
-
Agent SQL service status report alert notification Automon DBA SPs – AM24
This script will check the SQL server agent service status and notify an alert, when it is not running. SP: /* use [DBAdata] drop table tbl_agent_Status go CREATE TABLE [dbo].[tbl_agent_Status]( [servername] varchar(200) not null primary key, instance_name varchar(200), Edition varchar (50), Status varchar (50), Date datetime, ) */ -- select * from tbl_agent_Status use [DBAdata] go -- Exec [DBAdata].[dbo].[Usp_Agent_Status] --DROP PROC [Usp_Agent_Status] alter PROCEDURE [dbo].[Usp_Agent_Status] /* Summary: Check the SQL agent stats Contact: Muthukkumaran Kaliyamoorhty SQL DBA Description: Check the SQL agent stats ChangeLog: Date Coder Description 2013-jan-21 Muthukkumaran Kaliyamoorhty Updated the 2012 functionality */ --WITH ENCRYPTION AS BEGIN SET nocount ON -- select * from dbadata.dbo.tbl_agent_Status Truncate table…
-
Automon server error report alert notification Automon DBA SPs – AM23
This script will check last day server error report and notify an alert. SP: alter procedure USP_DBA_ErrorHandling_Report /* Summary: Send a error report of script Contact: Muthukkumaran Kaliyamoorthy SQL DBA Description: Send a error report of script ChangeLog: Date Coder Description 2013-jan-21 Muthukkumaran Kaliyamoorhty Updated the 2012 functionality */ --WITH ENCRYPTION AS BEGIN SET nocount ON --Send an email to DBA team ----------------------------------------------------------------- DECLARE @minid INT DECLARE @maxid INT DECLARE @servername varchar(100) DECLARE @Module_name varchar(100) DECLARE @error varchar(100) -- select * from dbadata.dbo.tbl_get_datafiles_size if exists ( select 1 from tbl_Error_handling where Upload_Date>=DATEADD(Day,-1,getdate()) and Module_name <>'Perfmon' group by Server_name,Module_name,[error_message] having count(*)>=1 ) begin DECLARE Svr_error_CUR CURSOR FOR select Server_name,Module_name, left([error_message],25)…