Ken Chu
Ken Chu

Reputation: 137

How to detach data disk in Azure SQL VM

For temporary testing purpose. I created a SQL VM in Azure, and the Azure wizard assign me a OS disk with 127G and a Data disk with 1T. But the cost of the Data disk is a little bit expensive for me. so I change the server default data and log path to OS(C) disk. and backup DB to OS(C) disk. then detach Data(F) disk.

The problem is sql server start fail without data disk. what should I do if I want run sql server without data(F) disk?

Upvotes: 0

Views: 879

Answers (2)

Aung Oo - MSFT
Aung Oo - MSFT

Reputation: 584

C drive is dedicated for OS. While putting data and log files on the same drive as OS may work for test/dev workloads, it is not recommended to put database files and OS on the same drive for your production workloads. Depending on your VM type, OS drive may use Standard Disks (HDD) or Premium Disks. There are IOPS limit for each of these Disks types. For instance, Standard Disks can support up to 500 IOPS and it is important to keep these IOPS for OS so that OS operations do not have to compete IOPS with other applications. Starving OS operations can result in VM restart.

Please send an email to [email protected] if you have additional questions.

Thanks, Aung

Upvotes: 1

4c74356b41
4c74356b41

Reputation: 72151

as far as I recall, you dont really need data disk to run sql on azure vm. by default it will use it to host database files, you can move those to disk C and repoint SQL to them. there are many ways to do that, you can consult official docs.

https://learn.microsoft.com/en-us/sql/relational-databases/databases/move-system-databases?view=sql-server-2017

Upvotes: 0

Related Questions