How to view the backup size / backup storage usage for our Azure SQL Managed Instance

Sourabh Patil 20 Reputation points
2025-12-29T12:07:11.83+00:00

We need to view the backup size / backup storage usage for our Azure SQL Managed Instance. The Azure Portal Backups blade only shows restore points and does not display backup size details. Please provide guidance or access to view backup storage size instance-level or database-level for capacity planning and cost analysis purposes.

Azure SQL Database
0 comments No comments

Answer accepted by question author
Anonymous
2026-01-06T13:09:43.45+00:00

Hi Sourabh Patil,

Thank you for your feedback. Please find below the responses to your additional questions, which I hope will help address your concerns.

After verifying your connection (EngineEdition = 8) and checking msdb.dbo.backupset and msdb.dbo.backupmediafamily, your observation is correct — this is expected behavior in Azure SQL Managed Instance (MI) due to how backups are handled at the PaaS level.

1. Why backup size isn’t shown in MSDB tables

In MI, backup metadata is available through msdb, but it doesn’t fully match on‑prem SQL Server. The per‑database physical backup size isn’t exposed because backups are managed by the platform.

Microsoft confirmed in your Q&A thread: Queries that work in SQL Server (on‑prem or VM) don’t apply to Azure SQL MI for per‑database backup size.

Backup history metadata exists but doesn’t include per‑database data relevant to billing or capacity planning. In short, you can view backup events, timestamps, and compression info — but not the actual per‑database backup size, since these backups live in Microsoft‑managed blob storage.

2. Why Azure SQL MI doesn’t show backup size per database

Azure SQL MI uses automated full, differential, and log backups stored in encrypted, geo‑redundant storage — all managed by the platform rather than the SQL Server engine.

Official documentation: [Backup storage model | techcommunity.microsoft.com]

Because backups span multiple layers (compute, storage, PITR chain), backup consumption is only tracked at the instance level.

3. Microsoft‑supported way to analyze cost and storage

Microsoft recommends using Azure Cost Management for any billing or backup size visibility:

Billing reflects total instance‑level backup storage (PITR), not the sum of individual database backups.

4. Can we view backup size per database?

No. Azure SQL MI doesn’t expose per‑database backup size. Even though msdb shows backup history, size info tied to billing is hidden because backups are platform‑managed.

You can query:

You cannot query actual storage size or file location.

5. Why this design is intentional

  • Platform abstraction: Backup creation, retention, and encryption are handled by Azure for consistency and reliability.
  • Shared storage model: Backups use deduplication, compression, and pooling, so per‑database sizing isn’t straightforward.
  • Cost logic: Billing aligns with total PITR storage for the instance, not per‑DB usage.
  • Accuracy: Per‑database reporting could mislead capacity planning due to variable backup patterns.

6. Recommended guidance

To plan or review backup usage and cost:

  1. Use Azure Cost Management → Cost Analysis
    • Filter by:
           - Service Name: _SQL Managed Instance_
           
           
                 - Meter: _Backup Storage (PITR/LTR)_ __[[FAQ | learn.microsoft.com]](https://learn.microsoft.com/en-us/azure/azure-sql/managed-instance/frequently-asked-questions-faq?view=azuresql)__
           
                 
                 1. Review patterns using msdb or XEvents — check frequency, compression, and duration. __[[learn.microsoft.com]](https://learn.microsoft.com/en-us/azure/azure-sql/managed-instance/backup-activity-monitor?view=azuresql)__
           ```1. Tune retention to manage cost — longer retention increases storage use. __[[ADO Wiki | Supportability]](https://supportability.visualstudio.com/AzureSQLMI/_wiki/wikis/AzureSQLMI/2298344)__
      
      

Was this answer helpful?

1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Manoj Kumar Boyini 19,430 Reputation points Microsoft External Staff Moderator
    2025-12-29T12:40:50.0633333+00:00

    Hi Sourabh Patil,

    It looks like you're trying to find out how to view the backup size or backup storage usage for your Azure SQL Managed Instance. While the Azure Portal's Backups blade shows restore points, it doesn't directly provide backup size details. Here's a way you can get that info using SQL queries:

    Steps to View Backup Size

    Access SQL Server Management Studio (SSMS):

    • Open SSMS and connect to your Azure SQL Managed Instance.

    Run the Backup Monitoring Query:

      - In SSMS, open a new query window and execute the following SQL query to get backup activity, including backup sizes:
      
      ```sql
      SELECT TOP (30) 
    bs.machine_name, 
    bs.server_name, 
    DB_NAME(DB_ID(bs.database_name)) AS [Database Name], 
    bs.recovery_model,
    CONVERT (BIGINT, bs.backup_size / 1048576) AS [Uncompressed Backup Size (MB)], 
    CONVERT (BIGINT, bs.compressed_backup_size / 1048576) AS [Compressed Backup Size (MB)], 
    CONVERT (NUMERIC (20,2), (CAST(bs.backup_size AS FLOAT) / CAST(bs.compressed_backup_size AS FLOAT))) AS [Compression Ratio], 
    bs.has_backup_checksums, 
    bs.is_copy_only, 
    bs.encryptor_type,
    DATEDIFF(SECOND, bs.backup_start_date, bs.backup_finish_date) AS [Backup Elapsed Time (sec)], 
    bs.backup_finish_date AS [Backup Finish Date], 
    bmf.physical_device_name AS [Backup Location], 
    bmf.physical_block_size
    

    FROM msdb.dbo.backupset AS bs WITH (NOLOCK) INNER JOIN msdb.dbo.backupmediafamily AS bmf WITH (NOLOCK) ON bs.media_set_id = bmf.media_set_id WHERE DB_ID(bs.database_name) = DB_ID() AND bs.[type] = 'D' ORDER BY bs.backup_finish_date DESC OPTION (RECOMPILE); ```

      **Analyze the Results**:
      
         - Once you run this query, you'll be able to see detailed information about the backup sizes, compression ratios, and locations, which can help you with capacity planning and cost analysis.
         
    

    Additional Resources

    For more information on monitoring, you can refer to the following resources:

    If you have any more questions or need further assistance, feel free to ask! Hope this helps!

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.