In Azure it is very easy to upgrade from one pricing/performance tier to another in a matter of clicks, but some processes are not instant.

Upgrading your SQL Database may take some time and through the portal the only info you can get at the moment is that an update is in process.

[box type=”info” width=”100%” ] Online – Updating database pricing tier from S0 Standard to S2 Standard[/box]

Azure SQL Database provides progress information on management operations (like CREATE, ALTER, DROP) performed on a database in the sys.dm_operation_status dynamic management view in the master database of the logical server where your current database is located see sys.dm _operation _status documentation.

So, you can use the operation status DMV to determine progress of the upgrade operation for a database, through the following query:

SELECT o.operation, 
       o.state_desc, 
       o.percent_complete, 
       o.error_code, 
       o.error_desc, 
       o.error_severity, 
       o.error_state, 
       o.start_time, 
       o.last_modify_time 
FROM   sys.dm_operation_status AS o 
WHERE  o.resource_type_desc = 'DATABASE' 
       AND o.major_resource_id = '<database_name>' 
ORDER  BY o.last_modify_time DESC;

Result:
[table] operation,state _desc, percent _complete, error _code, error _desc, error _severity, error _state, start _time, last _modify_time
ALTER DATABASE, IN _PROGRESS, 50, 0, , 0, 0, 2015-10-11 08:09:59, 2015-10-11 11:04:37
ALTER DATABASE, FAILED, 100, 40627, Operation on server ‘ppolyzos’ and database ‘dbname’ is in progress. Please wait a few minutes before trying again., 20, 0, 2015-10-11 08:09:26.480, 2015-10-11 10:10:21.413
[/table]

An in-depth article on upgrade SQL Azure Databases to New Service Tiers can be found here

Categorized in:

Tagged in: