Pages Menu
TwitterRssFacebook

Posted by on Jun 15, 2011 in Development

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'

Written by Tom Morgan

Tom is a Microsoft Teams Platform developer and Microsoft MVP who has been blogging for over a decade. Find out more.
Buy the book: Building and Developing Apps & Bots for Microsoft Teams. Now available to purchase online with free updates.

Post a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.