Kaseya Community

SQL Server DB Monitoring

  • Has anyone used Kaseya to monitor the size of SQL databases? I'm thinking it should be similar to some of the Exchange Scripts, does anyone practice it?

    Legacy Forum Name: SQL Server DB Monitoring,
    Legacy Posted By Username: owen
  • Did you ever get any answers to this question?

    Legacy Forum Name: Script Discussion,
    Legacy Posted By Username: PITG
  • Nope - but I created a simple script that would check the size of all of the SQL DB's and write them to log for now. Down the road I'm hoping to add a check against disk free space and generate an alert if low.

    Legacy Forum Name: Script Discussion,
    Legacy Posted By Username: owen
  • Anyone ever get anywhere on this? I also want to try to do this same thing with our SQL servers..

    Legacy Forum Name: Script Discussion,
    Legacy Posted By Username: CHIPSCC
  • Owen can you post your script. That may spawn other ideas on how to improve upon it. ---Thanks

    Legacy Forum Name: Script Discussion,
    Legacy Posted By Username: toddbn
  • monitor SQL databases.xml
    I am currently monitoring database size for some of our clients. You can monitor the size of individual databases (though you need to specify which one), or you can monitor the total size of all databases (as I in the attached monitor set).

    The only other catch is if SQL is installed as a named instance you will need to change counter object to MSSQLSERVER$instance

    The attached monitor set also checks the sql server and server agent services are running









    Legacy Forum Name: Script Discussion,
    Legacy Posted By Username: Eddy Grosso
  • Imported Empty Post

    Legacy Forum Name: Script Discussion,
    Legacy Posted By Username: hexeliebe
  • The information is already in SQL server under the dbo.sysFiles table for each database server. for example, if your database table is named George, you'd use the following query:

    USE master
    select * from sysFiles

    Run this in query analyzer and you'll see the amount of information available.

    I'll update this post with a procedure we use utilizing OSQL to run a stored procedure and input the results into a data table for later retrieval to capture a timeframe snapshot to trace differences in the database.


    Legacy Forum Name: Script Discussion,
    Legacy Posted By Username: hexeliebe
  • SQLServerStats.zip
    O.K. here are the scripts.

    Remember to change the extension on the MonitorSQL_Setup.txt script to SQL and the extension on the runDBGrowthStats.txt to VBS.

    The MonitorSQL script creates a new database with three tables (server, DBGrowth, DiskSpace).

    The runDBGroth script utilizes the OSQL utility to collect information and insert into the property tables.

    The next step is to query the server table then do a FOR LOOP to run the vbs from a stored procedure.
    As it is, the script works only on the local server so for each SQL server you want to collect data you must copy both scripts and run them locally.

    Please post all upgrades so we can share the love.

    Hexe (a.k.a. Scruffy)


    Legacy Forum Name: Script Discussion,
    Legacy Posted By Username: hexeliebe
  • Alright, 2 questions....I'm new to Kaseya.

    When I download the attached SQLServerStats.zip it tells me the file is empty and only shows to be 1Kb.....any chance the files aren't there, or am I crazy?


    Second...I'm trying to import some of these nifty scripts from the forum here, but when I try to import I get errors like the "IF statement at " so and so is invalid. I'm trying to import the base XML statements, no IF statements in there???

    I'm sure I'm doing something wrong....


    Legacy Forum Name: Script Discussion,
    Legacy Posted By Username: wade.kilgore