Users: 15,000+ | Page Views: 50,000+ | PPS: 2.5
TechDevOps.com
Explore Tools
{Experts in Microsoft SQL Server Operations, Performance, HA/DR, Data Migrations & Cloud Computing}



Monitor the progress of an Azure SQL Database Tier Scaling Operation
by BF (Senior MSSQL Operations - Enterprise, Cloud, Strategy)
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;