SQL Server Performance

Monitoring scripts

Discussion in 'SQL Server 2005 General DBA Questions' started by poratips, Jun 2, 2010.

  1. poratips New Member

    We are using Sql server 2005 and i would like to know some monitoring script like if disk get full and its alert us.
    Really appreciate your guidelines.
  2. preethi Member

    1. SQL Server has a stored procedure xp_FixedDrives which returns the MB free for all attached drives. If you want to use when the MB free is less than a certain MB you can use this.
    2. In PerfMon, you have an option to add alerts where you can select Logical Drive as the object and select % of free space for all available disks (not _TOTAL) and set the threshold. This method allows you to execute windows net send to send an alert, add an entry into Evert log or even execute an external program
    3. You can use Powershell, or WMI scripts also. Simple way is to schedule a job that will check all the drives and send you an email.
    Hope this helps.

  3. satya Moderator

    FOr better monitoring you can make use of Windows operating system input/output (I/O) calls to perform read and write operations on your disk. SQL Server manages when and how disk I/O is performed, but the Windows operating system performs the underlying I/O operations. The I/O subsystem includes the system bus, disk controller cards, disks, tape drives, CD-ROM drive, and many other I/O devices. Disk I/O is frequently the cause of bottlenecks in a system.
  4. poratips New Member

    Thanks both of you, I will try i out.
    Really appreciate your help!

Share This Page