# \#sql-query

**URL:** https://community.squaredup.com/tag/sql-query/340.md

[Latest](https://community.squaredup.com/latest.md) · [Categories](https://community.squaredup.com/categories.md) · [Tags](https://community.squaredup.com/tags.md)

---

## [Powershell SCOM Monitor in admin?](https://community.squaredup.com/t/powershell-scom-monitor-in-admin/2412)

<div class="topic-metadata">

**Author:** [@andyinsdca](https://community.squaredup.com/u/andyinsdca)\
**Replies:** 2\
**Last updated:** [June 13, 2025, 12:42pm UTC](https://community.squaredup.com/t/powershell-scom-monitor-in-admin/2412 "2025-06-13T12:42:58Z")

</div>

I have a SCOM Monitor that attempts to run a SQL query with the object system.data.sqlclient.sqlconnection (the SQL powershell modules aren’t installed). The PS1 runs fine with an admin powershell window, but does NOT ru…

---

## [Database Query Result Monitoring Management Pack for SCOM](https://community.squaredup.com/t/database-query-result-monitoring-management-pack-for-scom/1797)

<div class="topic-metadata">

**Author:** [@saiyadra](https://community.squaredup.com/u/saiyadra)\
**Replies:** 2\
**Last updated:** [June 28, 2022, 8:39pm UTC](https://community.squaredup.com/t/database-query-result-monitoring-management-pack-for-scom/1797 "2022-06-28T20:39:48Z")

</div>

Hi all, Does anyone have an updated version of this MP that works with the new SQL Version Agnostic MP: (It was published on Savision site but Martello Tech bought out Savison and this MP has been removed.) If not, c…

---

## [SQL Query monitor in powershell](https://community.squaredup.com/t/sql-query-monitor-in-powershell/1725)

<div class="topic-metadata">

**Author:** [@lucvb](https://community.squaredup.com/u/lucvb)\
**Replies:** 1\
**Last updated:** [April 14, 2022, 7:07pm UTC](https://community.squaredup.com/t/sql-query-monitor-in-powershell/1725 "2022-04-14T19:07:55Z")

</div>

Hi, I need to make a monitor in powershell to query a sql database. The database is on a always on availability group. Can I query the database via the availability group or do I need to choose one node for the database…

---

## [last successful sql backup reporting (sql query ops db)](https://community.squaredup.com/t/last-successful-sql-backup-reporting-sql-query-ops-db/1201)

<div class="topic-metadata">

**Author:** [@charlez](https://community.squaredup.com/u/charlez)\
**Replies:** 1\
**Last updated:** [January 26, 2021, 11:14am UTC](https://community.squaredup.com/t/last-successful-sql-backup-reporting-sql-query-ops-db/1201 "2021-01-26T11:14:34Z")

</div>

Hi, I would like to be able to report daily on last successful sql backup on all servers running sql using sql query on ops db. The sql management pack has a monitor that monitors if a sql backup is older than x days. …

---

## [Availability SQL Query](https://community.squaredup.com/t/availability-sql-query/1187)

<div class="topic-metadata">

**Author:** [@peterwsvensson](https://community.squaredup.com/u/peterwsvensson)\
**Replies:** 0\
**Last updated:** [October 5, 2020, 8:28am UTC](https://community.squaredup.com/t/availability-sql-query/1187 "2020-10-05T08:28:09Z")

</div>

Has someone got a SQL Query to get the Availability for any object or group? It would be nice to have it in the new SQL Performance Tile for instance. Unfortunately Kevin Holman doesn’t have it on his page with all the…

---

## [SQL query to show Alerts raised by Groups](https://community.squaredup.com/t/sql-query-to-show-alerts-raised-by-groups/1134)

<div class="topic-metadata">

**Author:** [@saiyadra](https://community.squaredup.com/u/saiyadra)\
**Replies:** 1\
**Last updated:** [June 24, 2020, 8:45pm UTC](https://community.squaredup.com/t/sql-query-to-show-alerts-raised-by-groups/1134 "2020-06-24T20:45:03Z")

</div>

Hi all, I am trying to show alerts generated from monitors assigned to specific groups. Does anyone know what query to run or table to target to show alerts from Groups?

---

## [SQL Query while using Donuts](https://community.squaredup.com/t/sql-query-while-using-donuts/1051)

<div class="topic-metadata">

**Author:** [@saiyadra](https://community.squaredup.com/u/saiyadra)\
**Replies:** 2\
**Last updated:** [November 22, 2019, 8:46am UTC](https://community.squaredup.com/t/sql-query-while-using-donuts/1051 "2019-11-22T08:46:13Z")

</div>

I am trying to figure out how or what is being used/targeted when using the Donuts view. For example, I want to create a dashboard to only show Logical Disk Free Space for All Windows Servers except SQL Servers. (I wil…

---

## [SQL-Tile You do not have permission to author or modify sensitive queries](https://community.squaredup.com/t/sql-tile-you-do-not-have-permission-to-author-or-modify-sensitive-queries/1019)

<div class="topic-metadata">

**Author:** [@odgeuk](https://community.squaredup.com/u/odgeuk)\
**Replies:** 1\
**Last updated:** [September 18, 2019, 11:14am UTC](https://community.squaredup.com/t/sql-tile-you-do-not-have-permission-to-author-or-modify-sensitive-queries/1019 "2019-09-18T11:14:25Z")

</div>

I have one user (User 1) who created a Dashboard using the SQL tile. It queries the Data Warehouse. He can see the output from this, as can I (SCOM Admin) The Dashboard is in a team folder. My other user (User 2) can o…

---

## [Sql Query script](https://community.squaredup.com/t/sql-query-script/907)

<div class="topic-metadata">

**Author:** [@erenay-t](https://community.squaredup.com/u/erenay-t)\
**Replies:** 0\
**Last updated:** [January 30, 2019, 10:23am UTC](https://community.squaredup.com/t/sql-query-script/907 "2019-01-30T10:23:02Z")

</div>

Hey Guys, I made a script for Scom monitoring with powershell. $ScomAPI = New-Object -comObject "MOM.ScriptAPI" $PropertyBag = $ScomAPI.CreatePropertyBag() $sqlConn = New-Object Sy…

---

## [SQL Query DWH - Show resolution state as name](https://community.squaredup.com/t/sql-query-dwh-show-resolution-state-as-name/775)

<div class="topic-metadata">

**Author:** [@tom79](https://community.squaredup.com/u/tom79)\
**Replies:** 3\
**Last updated:** [August 21, 2018, 7:38am UTC](https://community.squaredup.com/t/sql-query-dwh-show-resolution-state-as-name/775 "2018-08-21T07:38:36Z")

</div>

Hi! I created a query where I can see all alarms with the error message “Failed to connect to computer”: SELECT a.AlertName, a.AlertDescription, a.RaisedDateTime, ap.ParameterValue, ar.ResolutionState, ar.StateSetDa…

---

## [SQL Query DWH - Show a specific alarm with members of a specific group](https://community.squaredup.com/t/sql-query-dwh-show-a-specific-alarm-with-members-of-a-specific-group/772)

<div class="topic-metadata">

**Author:** [@tom79](https://community.squaredup.com/u/tom79)\
**Replies:** 0\
**Last updated:** [August 7, 2018, 8:19am UTC](https://community.squaredup.com/t/sql-query-dwh-show-a-specific-alarm-with-members-of-a-specific-group/772 "2018-08-07T08:19:55Z")

</div>

Hello! I’m a beginner in Transact-SQL. Currently I´m trying to create a query that allows me to establish a connection between a group and an alarm in the SCOM DWH. The goal is to list a specific alarm with members…
