# how to create  dql to check database failed connection

**URL:** <https://community.dynatrace.com/t/how-to-create-dql-to-check-database-failed-connection/51041>\
**Category:** DQL\
**Tags:** dql, dynatrace-managed, data-explorer\
**Created:** [April 3, 2025, 7:17am UTC](https://community.dynatrace.com/t/how-to-create-dql-to-check-database-failed-connection/51041 "2025-04-03T07:17:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![heramb\_sawant](https://avatars.discourse-cdn.com/v4/letter/h/c4cdca/32.png) [@heramb\_sawant](https://community.dynatrace.com/u/heramb_sawant)\
**Post date:** [April 3, 2025, 7:17am UTC](https://community.dynatrace.com/t/how-to-create-dql-to-check-database-failed-connection/51041/1 "2025-04-03T07:17:33Z")

</div>

Hi

have created dashboard tile using&nbsp;builtin:service.dbconnections.failure, this shows&nbsp; failed connection count.

I want to imeplement the same using DQL , how I can do that. I did not find matching key in grail metric list.

My final aim is to check this count and send alert/email to team.

Regards,  
Heramb Sawant

---

<div class="post-metadata">

**Author:** ![yanezza](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/yanezza/32/5036_2.png) [@yanezza](https://community.dynatrace.com/u/yanezza)\
**Post date:** [April 5, 2025, 5:47pm UTC](https://community.dynatrace.com/t/how-to-create-dql-to-check-database-failed-connection/51041/2 "2025-04-05T17:47:55Z")

</div>

Hi,

This metric, along with other service metrics, has not yet been converted (_for example, calculated service metrics_).

Have you tried retrieving this metric from a **DB Extension 2.0**? This approach might provide additional insights.

---

<div class="post-metadata">

**Author:** ![tesp11331](https://avatars.discourse-cdn.com/v4/letter/t/919ad9/32.png) [@tesp11331](https://community.dynatrace.com/u/tesp11331)\
**Post date:** [November 17, 2025, 10:52am UTC](https://community.dynatrace.com/t/how-to-create-dql-to-check-database-failed-connection/51041/3 "2025-11-17T10:52:20Z")

</div>

Hi, I have the same need but cannot find this metric neither in the extension.

---

<div class="post-metadata">

**Author:** ![Shekh10](https://avatars.discourse-cdn.com/v4/letter/s/c77e96/32.png) [@Shekh10](https://community.dynatrace.com/u/Shekh10)\
**Post date:** [October 13, 2026, 7:12am UTC](https://community.dynatrace.com/t/how-to-create-dql-to-check-database-failed-connection/51041/4 "2026-10-13T07:12:12Z")

</div>

Hi,  
Has anyone found any alternate solution for built-in metric like:&nbsp;builtin:service.dbconnections.failure to be queried in Grail?
