1/10/2024 0 Comments Monit disk spaceIn the Appliance section, click Baseline Status.You check the Appliance Disk Space against the predefined baseline on a standalone machine or any cluster member. To check the Appliance Disk Space against the baseline The Cluster Management page displays the disk usage of each machine on the cluster. In the Appliance section, click Cluster Management.On the coordinator, click Administration.To view the disk usage of the cluster member For more information, see Managing disks and swap space. The Current Usage section of the Manage BMC Discovery Disks page displays the current disk usage. In the Appliance section, click Disk Configuration.From the main menu, click the Administration icon.To view the disk usage of a standalone machine Restart the services to recover from the forced shutdown.While (select count(*) from #driveinfo) >= (select fspace from #driveinfo where id = (select drive from #driveinfo where id = free space is lower than threshold appends details to mail body and dumps the file size details into the logfile. Loop through each drive to check for drive threshold Insert into #driveinfo EXEC master.xp_fixeddrives IF EXISTS(select * from sys.sysobjects where id = object_id('#driveinfo'))Ĭreate table #driveinfo(id int identity(1,1),drive char(1), fspace int) Create temp table to hold drive free space info ****** Object: Stored Procedure dbo.DiskSpaceMntr******/ Input: - recepients - DBMail - Threshold Free space in MB below which you need the alert to be - Log file to hold the file size details and send it as attachment.Įxample: EXEC = 'D:\DBA\DiskSpaceLog.txt' *-ĭesc: Send Disk space alert with free space details in each drive ** further information on how to create and schedule a SQL job can be found within your SQL Server documentation or obtained using the Help within SSMS. select File -> Open, then locate the downloaded file to openģ) execute the script within the Query window to create the stored procedureĤ) create a new scheduled SQL job to execute the stored procedure with your individual parameters as per the Example contained in the script. open a new Query window and paste the text copied from below Also in the mail it provides the information of which drive is running low on space.ġ) highlight and copy the script below or download the attached file to a desired locationĢ) launch SQL Server Management Studio either: Includes an attachment of all the folders and files inside each folder and its size in Bytes in the drive where The following stored procedure sends an alert when any drive size drops below a set threshold and also Databases should be backed up prior to performing this procedure.* This procedure should only be performed by users familiar with SQL Server Management Studio. *Warning: Irreparable database damage can occur. Proactive automated system maintenance best practice. SQL Server 2005, SQL Server 2008 R2, SQL Server 2012, SQL Server 2014, SQL Server 2016, SQL Server 2017 Predetermined threshold in order to prevent running out of space and the problems that would be associated. Need to automate the process to monitor the total disk space and available disk space and send an alert at a
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |