Eamon
Eamon

Reputation: 1909

SQL Server Data Files in Microsoft Azure pricing

I have a VM in Azure running SQL server and I am investigating storing my SQL data and log files directly in Azure premium storage as explained here: https://learn.microsoft.com/en-us/sql/relational-databases/databases/sql-server-data-files-in-microsoft-azure

I have been able to get this up and running fairly painlessly and given the benefits of the snapshot backups and quickly scaling the VM, I plan to continue with this however there is one issue I cannot seem to find an answer for and that is what the costs are.

All the documentation related to pricing for Azure Premium storage talks about disks, and that you are charged the cost rounded up to the next largest disk size but it is unclear if this also applies to page blobs that are not disks.

So my question is essentially, if I have a database with a 400GB data file and a 20GB log file, does that equate to one P20 disk and one P10 disk (in which case I should make the log file 128GB), or am I charged for a single P20 disk because the combined size of the two files is 420GB?

Secondly, how does premium storage deal with file growth? With disks it is more straight forward as I don't believe you can dynamically resize them, but what happens when you have an SQL server data file with auto-growth turned on as a page blob in premium storage and it grows over the size threshold of it's current disk? e.g 500GB file auto-grows by 10% to 550GB.

Upvotes: 0

Views: 242

Answers (1)

Shui shengbao
Shui shengbao

Reputation: 19195

So my question is essentially, if I have a database with a 400GB data file and a 20GB log file, does that equate to one P20 disk and one P10 disk (in which case I should make the log file 128GB), or am I charged for a single P20 disk because the combined size of the two files is 420GB?

According to the document.

Billing for a premium storage disk or blob depends on the provisioned size of the disk or blob. Azure maps the provisioned size (rounded up) to the nearest premium storage disk option.

If you store your data file and log file on a single disk. Your data is 420GB, you need pay for P20(512GB) cost. If you store your data file and log file as two disks, you need pay for P20(512GB) and P6(64GB) cost. You also could refer my answer similar with this.

More information about Premium Managed Disks price please refer to this link.

Secondly, how does premium storage deal with file growth?

Currently, Azure does not support auto-grows data disk size, you could use cmdlet to increase disk size, please refer to this [link] for more detailsl

az disk update \
    --resource-group myResourceGroup \
    --name myDataDisk \
    --size-gb 200

(https://learn.microsoft.com/en-us/azure/virtual-machines/linux/expand-disks).

Update:

P10 and P20 are premium storage account, I check the link you provided, you should use standard storage account. Please refer to this link:Azure Storage Pricing.

Upvotes: 1

Related Questions