Do you mean a SQL Server in a Azure VM?
MS SQL Server is a normal Windows service and you can shutdown the service, either via Windows Service Manager or directly in SSMS: Right-mouse click on the server node => Shutdown.
Or per SQL command: https://learn.microsoft.com/en-us/sql/t-sql/language-elements/shutdown-transact-sql?view=sql-server-ver16
How to stop a SQL server while not using it ?
![](https://techprofile.blob.core.windows.net/images/pO20F8kIhECtJoOd0cv32A.png?8DA25A)
Al Amin Neaz Ahmed
1
Reputation point
There are links on the internet on how to stop MySQL server in Azure. But how do i stop a SQL server while I'm not using it?
3 answers
Sort by: Most helpful
-
Olaf Helper 43,246 Reputation points
2022-10-17T10:47:25.32+00:00 -
Tom Phillips 17,721 Reputation points
2022-10-17T12:59:43.37+00:00 SQL Server does not have any built in way to "shutdown on idle". The Windows server is always running.
-
Erland Sommarskog 107.2K Reputation points
2022-10-17T21:50:18.843+00:00 The question is grossly unclear. But if you are using Azure SQL Database, you can achieve what you what, if you go for Serverless. A Serverless database will be dismounted after a certain time of inactivity.