Free space in datafiles and filegroups

  • I am looking for a method of automating alerts when individual files or/and fiegroups approach 90% capacity. In oracle I use oracle eneterprise manager grid control and have automated warnings for tablespace growth. I am struggling to find a similar method in SQL2005. I have found various scripts/procedures that give me sizes but ideaaly would like some way of alerting?

  • We can probably think of creating a job and execute the script you have at scheduled interval.

    We can even send alert mails using DBMail or SQLMail.

  • I use an SSIS package run at specified intervals by SSA to send me an email notice of the data and log file sizes for all DBs on all Servers. Very straightforward to implement.

  • Well, you can create a series of alerts (Under SQL Server Agent >> Alerts) - SQL2005 has a pretty wide range of alerts for DB file growth/% used and such...

    Example of an Alert:

    USE [msdb]

    GO

    /****** Object: Alert [DBA - Check CA Log File Growth] Script Date: 05/25/2011 11:50:56 ******/

    EXEC msdb.dbo.sp_add_alert @name=N'DBA - Check CA Log File Growth',

    @message_id=0,

    @severity=0,

    @enabled=1,

    @delay_between_responses=300,

    @include_event_description_in=1,

    @notification_message=N'CHECK THE SERVER ASAP - RUN THIS TO VERIFIED LOG SIZES

    exec F1Settings.dbo.utl_CheckTransactionLogStatus NULL, NULL, 1',

    @category_name=N'[Uncategorized]',

    @performance_condition=N'SQLServer:Databases|Percent Log Used|COREACQUIRE|>|80',

    @job_id=N'00000000-0000-0000-0000-000000000000'

    GO

    Or as the other posters have pointed out you can use one of the scripts you've already found and create a SQL Agent Job to run it regularly.

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • The problem with performance alerts is that they need to be created for each database. However, a script can be executed against a bunch of databases.

    John Miner
    Crafty DBA
    www.craftydba.com

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply