Ad Widget

Collapse

MSSQL: Number of DataBases

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wpagane
    Member
    • Apr 2021
    • 31

    #1

    MSSQL: Number of DataBases

    Hello Team,

    Zabbix Version: 5.2

    I was able to install ODBC and I'm now able to monitor my Servers Databases using Template "MSSQL by ODBC" as well!

    However, there is a need to know the "Number of Databases" which have been discovered.

    I found out an item called "MSSQL: Number users connected" --> That's OK. But now, I need to know the "Number of Databases" for that specific Server. I searched around and I didn't find any ITEM which could output this information. Does anybody here could please provide some hints of how could I get this number?

    Thanks a lot in advanced!
  • Hamardaban
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2019
    • 2713

    #2
    Code:
    SELECT count(1) FROM sys.databases
    :-)

    Comment


    • wpagane
      wpagane commented
      Editing a comment
      Hamardaban - You're the man! Thanks a lot! It works and now I'm displaying this info in a Grafana's dashboard.

      I don't want to bother you anymore, BUT, if maybe you also have any hints to get the Number of IIS Applications monitored (Sites and/or Application Pools) it would be nice!!!

      I'm already using Template "IIS by Zabbix agent" discovering IIS Pools as well, but getting trouble to make a "count", for example: "Count of IIS Sites", "Count of IIS Application Pools".
      Last edited by wpagane; 12-05-2022, 18:27.
  • Rachelfoster
    Junior Member
    • Jul 2022
    • 11

    #3
    I want to know more that How do I count the number of databases in SQL Server? How many databases are there in SQL Server? Kohl's Feedback Survey
    Last edited by Rachelfoster; 05-08-2022, 06:09.

    Comment

    Working...