0 Replies Latest reply on Jun 12, 2009 11:01 AM by Fodome

    How to monitor various MS SQL Server resources.

    Fodome

      Good day All,

      I recently had to research a few queries for a client and I thought it would be worth sharing with the community.  Having that said, here are a few queries you can use within the ADO-UE (SQL Query) Monitor to monitor MS SQL Server database stuff:

      Monitoring the location of a database file in MS SQL Server:

      MDF File:select filename FROM master.[dbo].[sysdatabases] WHERE name = '<Database_Name>';
      LDF file:select filename FROM master.[dbo].[sysdatabases] WHERE name = '<Database_Name>_log';

      Monitoring the size of a database:

      MDF File:select size*8 as Size_in_KB from <Database_Name>.dbo.sysfiles where name = '<Database_Name>';
      LDF File:select size*8 as Size_in_KB from <Database_Name>.dbo.sysfiles where name = '<Database_Name>_log';
      Both combined:select size*8 as Size_in_KB_Each from <Database_Name>.dbo.sysfiles;

      Hope this helps someone somewhere.

      Sincerely,

      Chris Foley - SolarWinds - Support Specialist
      Support:  866.530.8040  |  Fax: 512.857.0125
      network management simplified  |  solarwinds.com