The following implementation helped me in analyzing the disk space usage.
There are many ways to get the available disk space in the server and using SCOM we can get the alerts whenever the disk space reaches below the threshold levels. This implementation fetches the available space information and stores it in a table on a daily basis which helps in comparing the data with the previous days and also over a period of time to understand how much disk space is being utilized.
Undoubtedly, when we have the data, we will have lot of scope in analyzing it.
As
the famous quote goes, “If you torture the data long enough, it will confess”. 😊
Our requirement is to fetch the information in the format below and using xp_fixeddrives, we get the following results:
Code:
USE TestDB1
GO
-- Create a table to store the information
-- Adding a default value to the Updated Date Time. It records when the execution took place.
-- Inserting values into the table
As you see, this is implemented without leaving the SQL Server Management Studio and without using any third-party tool.
No comments:
Post a Comment