info@techdevops.com | 437-991-3573 | Data Engineering Services
TechDevOps.com
Resources Tools
Experts in Microsoft SQL Server on Windows, Linux, Containers | Clusters, Always On, FCI | Migrations, Cloud, Performance



Monitor the progress of an Azure SQL Database Tier Scaling Operation
by BF (Principal Consultant; Architecture; Engineering)
2017-11-17









View all Operations:

select * from sys.dm_operation_status order by start_time asc


View Most Recent Operation Record Per Database:

with SAAS_DB as
(
select *, row_number() over (partition by resource_type, major_resource_id, minor_resource_id order by start_time desc) as Row# from sys.dm_operation_status
)

Select
UPPER(Resource_Type_Desc) as 'Resource',
Operation,
major_resource_id as 'DB',
State_Desc as 'State',
Percent_Complete,
Error_Code,
Error_Desc,
Error_Severity,
Start_Time,
Last_Modify_Time
from
SAAS_DB
where
Row# = 1 and resource_type_desc = 'Database'


Get Azure SQL Database Edition and Tier Level:

--Need to be in the context of the User Database
select DATABASEPROPERTYEX('DBName','Edition') as Edition, DATABASEPROPERTYEX('DBName','ServiceObjective') as ServiceObjective;