Pages Menu

Posted by on Jun 15, 2011 in Development | 0 comments

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'

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.

This site uses cookies to help make this website better. By continuing to use this site we’ll assume you’re OK with that (implied consent).