|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Wednesday, May 29, 2013 9:26 AM
Points: 138,
Visits: 511
|
|
HI Frnds,
I need help on setting up alters when the database (files MDF, NDF & LDF) reaching the MAX size.
If anybody have some thing please share, I am trying to lookup in google and I didnt get anything. If anybody have good post on how to implement it please post it.
Thanks in advance.
|
|
|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Tuesday, June 11, 2013 5:21 AM
Points: 85,
Visits: 361
|
|
Ranzz (2/15/2013) HI Frnds,
I need help on setting up alters when the database (files MDF, NDF & LDF) reaching the MAX size.
If anybody have some thing please share, I am trying to lookup in google and I didnt get anything. If anybody have good post on how to implement it please post it.
Thanks in advance.
What do you mean by "setting up alters"? Do you mean "alerts" when the files are nearing max size? Or when the free space on the drive is getting low?
______________________________ AJ Mendo | @SQLAJ
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Today @ 12:59 PM
Points: 2,063,
Visits: 3,788
|
|
You can set up alerts under the SQL Server agent, I believe the type is "SQL Server Performance Condition Alert" and it will allow you to set thresholds for each database. I can't remember if the value counter allows a percentage or if it needs to be a literal value. You should be able to find that out in BOL
______________________________________________________________________________ "Never argue with an idiot; They'll drag you down to their level and beat you with experience"
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Wednesday, May 29, 2013 9:26 AM
Points: 138,
Visits: 511
|
|
Thanks SQLAJ
yes i mean by alerts..sorry misspelled.
when the files are nearing max sizes. how to implement it. If there is any good blog post, how to set up please forward it.
thanks.
|
|
|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Tuesday, June 11, 2013 5:21 AM
Points: 85,
Visits: 361
|
|
Ranzz,
Take a look at this post. It has some code you can use and shows some examples of alerts. http://www.sqlmag.com/blog/practical-sql-server-45/sql-server-2012/disk-space-monitoring-143552
______________________________ AJ Mendo | @SQLAJ
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Wednesday, May 29, 2013 9:26 AM
Points: 138,
Visits: 511
|
|
Good Post AQLAJ,
It give information on Drive Spaces at certain threshold.
But, I am looking at a threshold alerts when the database (files MDF & LDF) reaching the MAX size.
Please any help frnds..! Thanks in Advance.
|
|
|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Tuesday, June 11, 2013 5:21 AM
Points: 85,
Visits: 361
|
|
Use something like this script to monitor the size and free space of the files. Setup a job that runs everyday/week insert into a database to monitor/track over time, send you an email or both.
SELECT [name] , [physical_name] , CAST(([size] / 128.0) AS decimal(18,2)) AS FileSizeInMB , CAST((fileproperty([name],'SpaceUsed')) / 128.0 AS decimal(18,2)) AS SpaceUsedInMB , CAST((([size] - fileproperty([name],'SpaceUsed')) / 128.0) AS decimal(18,2)) AS FreeSpaceInMB FROM sys.database_files
______________________________ AJ Mendo | @SQLAJ
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Wednesday, May 29, 2013 9:26 AM
Points: 138,
Visits: 511
|
|
I am that confident on creating my own.
Can one please help me providing some documention how to implement it.
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: 2 days ago @ 10:11 AM
Points: 1,333,
Visits: 1,803
|
|
Instead of constantly trying to adjust the max size, I'd suggest setting the max to "UNLIMITED", then monitoring and alerting for every file growth occurence instead.
SQL DBA,SQL Server MVP('07, '08, '09) One man with courage makes a majority. Andrew Jackson
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Wednesday, May 29, 2013 9:26 AM
Points: 138,
Visits: 511
|
|
It cant be possible to set unlimited growth.
So, that is the reason, I am looking for some thing that will help us.
|
|
|
|