February 15, 2013 at 5:29 pm
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.
February 16, 2013 at 6:35 am
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
February 16, 2013 at 11:01 am
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; Theyll drag you down to their level and beat you with experience
February 16, 2013 at 2:26 pm
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.
February 17, 2013 at 7:37 am
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
February 18, 2013 at 9:31 am
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.
February 18, 2013 at 11:10 am
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(( / 128.0) AS decimal(18,2)) AS FileSizeInMB
, CAST((fileproperty([name],'SpaceUsed')) / 128.0 AS decimal(18,2)) AS SpaceUsedInMB
, CAST((( - fileproperty([name],'SpaceUsed')) / 128.0) AS decimal(18,2)) AS FreeSpaceInMB
FROM sys.database_files
______________________________
AJ Mendo | @SQLAJ
February 18, 2013 at 12:45 pm
I am that confident on creating my own.
Can one please help me providing some documention how to implement it.
February 18, 2013 at 2:02 pm
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) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
February 18, 2013 at 3:57 pm
It cant be possible to set unlimited growth.
So, that is the reason, I am looking for some thing that will help us.
February 18, 2013 at 4:56 pm
Ranzz (2/18/2013)
It cant be possible to set unlimited growth.So, that is the reason, I am looking for some thing that will help us.
It is possible in SQL Server.
Maybe your specific company has a policy against it, so you're not allowed to do it?
Stupid policy, but you may not be able to change it.
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
February 19, 2013 at 3:08 pm
Any help from the other members!
February 20, 2013 at 8:00 am
At some point you will need to do some work yourself. If you need to set max size, then YOU need to find out how much the database is growing, by day, week, or month. Then determine the max number to set and monitor the growth.
Several options have been suggested. They may not work "as is" but look at them and determine for your situation what will work best. You will learn valuable information about your server and database and gain a better understanding for the future.
______________________________
AJ Mendo | @SQLAJ
Viewing 13 posts - 1 through 12 (of 12 total)
You must be logged in to reply to this topic. Login to reply