Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2004

    Unanswered: How to check amount of disk space left?

    Here is one of the MCDBA exam question.
    Does anyone explain how to do the following?
    I click new alert, and selected 'Sql server performance condition alert' Type
    But I don't know which object and counter I should choose to get disk space left.
    Thank you..

    Q: You are the administrator of Microsoft Windows 2000 Advanced Server computer. The server is also
    running SQL Server 2000 and contains a database named Sales. The server is configured as shown in
    the exhibit.
    The sales database is configured by using the default options and increases by 50MB per day. You
    want an operator to be notified automatically before the database runs out of disk space. You also
    want to minimize the amount of administrative overhead necessary for this database.
    What should you do?

    Configure systems monitor to log an alert if the hard disk database contains less than 600MB of disk
    space. Configure SQL server agent to send an e-mail message notifying the operator of the system
    monitor alert.

    Explanation: The solution with least administrative effort is to set up a system monitor alert to log when
    disk space is below a certain threshold, here 600MB. Then configure the SQL Server agent to trap this event
    and send an e-mail notifying the operator when this occurs.
    Note: Using SQL Server Agent, you can define alerts and configure responses to alerts.
    SQL Server Agent monitors the Windows application log and compares each SQL Server event logged with
    the alerts that have been defined. If a match is found, an event alert fires. SQL Server Agent can also
    monitor specific SQL Server performance object counters and fire a performance condition alert when the
    value for the counter is less than, equal to, or greater than a defined threshold. The Create Alert Wizard can
    be used to configure the SQL Server agent for alerts.

  2. #2
    Join Date
    Jul 2003
    San Antonio, TX
    You need to find out the current size of the disk left, then subtract 600MB from it, and add the result to the current size of the database minus 50. The result of this yoiu need to convert to KB, and use that value with SQLServerDatabases object and Data Files counter.
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts