SSMS – Is I in The Cloud?!
I was reviewing some processes that should have terminated, but hadn’t, prior to performing a Restore, when I came across this snippet of SQL. It looks like a fairly nasty hack to bring SQL Server Management Studio into 2011 and the world of Azure:
DECLARE @edition sysname; SET @edition = cast(SERVERPROPERTY(N'EDITION') as sysname); select case when @edition = N'SQL Azure' then 1 else 0 end as 'IsCloud'