Scale Azure SQL DB

Scale Azure SQL DB from the command line.

SELECT CAST(DATABASEPROPERTYEX(db_name(),'serviceobjective') AS NVARCHAR(50)) AS ServiceObjective

Scale to S3:


The query returns immediately.

  • If the target database is already at the specified service tier, no change is made.
  • If scaling starts, at some point in the next few minutes, every live database connection will be disconnected (including this one – you can monitor the database property to see when the change takes place, but must do so from outside T-SQL, catching any disconnection errors for retry).