# Database capacity - used and empty only showing data for master database

**URL:** <https://community.dynatrace.com/t/database-capacity-used-and-empty-only-showing-data-for-master-database/53226>\
**Category:** Extensions\
**Tags:** databases, extensions\
**Created:** [September 4, 2025, 12:43am UTC](https://community.dynatrace.com/t/database-capacity-used-and-empty-only-showing-data-for-master-database/53226 "2025-09-04T00:43:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jedecastro](https://avatars.discourse-cdn.com/v4/letter/j/da6949/32.png) [@jedecastro](https://community.dynatrace.com/u/jedecastro)\
**Post date:** [September 4, 2025, 12:43am UTC](https://community.dynatrace.com/t/database-capacity-used-and-empty-only-showing-data-for-master-database/53226/1 "2025-09-04T00:43:53Z")

</div>

Hi Team, we need to provide monthly report on SQL server database capacity - (current size, used size, %free).

I’m looking at these 3 metrics: sql-server.databases.file.size, sql-server.databases.file.usedSpace, sql-server.databases.file.emptySpace

The issue is only sql-server.databases.file.size shows data for all databases.&nbsp; The other 2 are only showing data for the “master” database and nothing else.

Does anyone know how to get all databases data from sql-server.databases.file.usedSpace and sql-server.databases.file.emptySpace ?

Extension version is&nbsp;&nbsp;Microsoft SQL Server&nbsp;2.2.2

 ![emptyspacemasteronly.JPG](https://global.discourse-cdn.com/dynatrace/original/3X/7/b/7bf053a339bb7f3d7663496a855133982d977239.jpeg)

---

<div class="post-metadata">

**Author:** ![p\_devulapalli](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/p_devulapalli/32/41590_2.png) [@p\_devulapalli](https://community.dynatrace.com/u/p_devulapalli)\
**Post date:** [September 4, 2025, 1:27am UTC](https://community.dynatrace.com/t/database-capacity-used-and-empty-only-showing-data-for-master-database/53226/2 "2025-09-04T01:27:51Z")

</div>

[@jedecastro](https://community.dynatrace.com/user/80490)&nbsp;How are the endpoints configured in the extension?

usedSpace and emptySpace is only reported for the database that the extension is currently connected to, if you want this metric for other databases , you need to have the config updated

 ![p_devulapalli_0-1756948889464.png](https://global.discourse-cdn.com/dynatrace/original/2X/3/35d2e735745cdc17322d75a3674729444a5b72fc.png)

---

<div class="post-metadata">

**Author:** ![jedecastro](https://avatars.discourse-cdn.com/v4/letter/j/da6949/32.png) [@jedecastro](https://community.dynatrace.com/u/jedecastro)\
**Post date:** [September 4, 2025, 1:32am UTC](https://community.dynatrace.com/t/database-capacity-used-and-empty-only-showing-data-for-master-database/53226/3 "2025-09-04T01:32:10Z")

</div>

Thank you Phani, I’m actually a DBA so I’m not sure how the extension was configured.&nbsp; Do you know how to update the extension to get these 2 information for all databases? What values do we need to add to the endpoints/extension please?

---

<div class="post-metadata">

**Author:** ![p\_devulapalli](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/p_devulapalli/32/41590_2.png) [@p\_devulapalli](https://community.dynatrace.com/u/p_devulapalli)\
**Post date:** [September 4, 2025, 1:47am UTC](https://community.dynatrace.com/t/database-capacity-used-and-empty-only-showing-data-for-master-database/53226/4 "2025-09-04T01:47:58Z")

</div>

[@jedecastro](https://community.dynatrace.com/user/80490)&nbsp;You need someone who has access to Dynatrace and has permissions to update the extension configuration. Below link has details around how to update the endpoint details , hope this helps

> **[Manage Microsoft SQL Server extensions](https://docs.dynatrace.com/docs/ingest-from/extensions/supported-extensions/data-sources/sql/microsoft-sql)**
>
> Extend observability in Dynatrace with declarative metrics ingested from Microsoft SQL Server.

---

<div class="post-metadata">

**Author:** ![jedecastro](https://avatars.discourse-cdn.com/v4/letter/j/da6949/32.png) [@jedecastro](https://community.dynatrace.com/u/jedecastro)\
**Post date:** [September 4, 2025, 1:53am UTC](https://community.dynatrace.com/t/database-capacity-used-and-empty-only-showing-data-for-master-database/53226/5 "2025-09-04T01:53:40Z")

</div>

Thank you Phani for the link.&nbsp; I do have access to the extension and I can add endpoints.&nbsp; But just to confirm that I understand correctly, if my SQL instance has 100 databases, in order for us to get the used/free space, we need to create 100 endpoints in the extension for each of those databases?

If yes, then this is not very efficient as we support 100s of instances with 10s/100s databases.. 😞

Do you know if Dynatrace has a plan to fix this?

---

<div class="post-metadata">

**Author:** ![p\_devulapalli](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/p_devulapalli/32/41590_2.png) [@p\_devulapalli](https://community.dynatrace.com/u/p_devulapalli)\
**Post date:** [September 4, 2025, 11:51pm UTC](https://community.dynatrace.com/t/database-capacity-used-and-empty-only-showing-data-for-master-database/53226/6 "2025-09-04T23:51:16Z")

</div>

[@jedecastro](https://community.dynatrace.com/user/80490)&nbsp;From what I see its not really a limitation of Dynatrace but the way SQL server exposes the views .&nbsp;sys.allocation\_units from where the space metrics are calculated exists inside each database unlike&nbsp;sys.master\_files which is server wide

> **[sys.master\_files (Transact-SQL) - SQL Server](https://learn.microsoft.com/en-us/sql/relational-databases/system-catalog-views/sys-master-files-transact-sql?view=sql-server-ver17)**
>
> The sys.master\_files system catalog view contains a row per file of a database as stored in the master database.

> **[sys.allocation\_units (Transact-SQL) - SQL Server](https://learn.microsoft.com/en-us/sql/relational-databases/system-catalog-views/sys-allocation-units-transact-sql?view=sql-server-ver17)**
>
> sys.allocation\_units (Transact-SQL)

Here is a idea which is open for the same and some context around why its the way it is currently

[https://community.dynatrace.com/t5/Product-ideas/Database-file-usage-monitor-for-all-Databases/idi-p/248011](https://community.dynatrace.com/post/248011)
