SQL Azure – Moving your data

 

Moving your data to the (public) cloud necessarily involves relinquishing some control over the setup and maintenance of the environment in which your data is hosted. Cloud-based hosting services such as Microsoft Azure are effectively just scalable shared hosting providers. Since parts of the server configuration are shared with other customers and (to make the service scalable) there is to be a standard template on which all instances are based, there are many system settings that your cloud provider won’t allow you to change on an individual basis.

For me, this is generally great. I’m not a DBA or SysAdmin and I have no interest in maintaining an OS, tweaking server configuration settings, installing updates, or patching hotfixes. The thought of delegating the tasks to ensure my server remains finely-oiled and up-to-date to Microsoft is very appealing.

However, this also has its own down-sides. One advantage of maintaining my own server is that, even though it might not be up-to-date or have the latest service packs applied, I know nobody else has tweaked it either. That means that, unless I’ve accidentally cocked something else up or sneezed on the delete key or something, a database-driven application that connects to my own hosted database should stay working day after day. When an upgrade is available I can choose when to apply it, and test to ensure that my applications work correctly following the upgrade according to my own plan.

Not so with SQL Azure.

Two examples of breaking changes I’ve recently experienced with SQL Azure, both seemingly as a result of changes rolled out since the July Service Release:

Firstly, if you use SQL Server Management Studio to connect and manage your SQL Azure databases, you need to upgrade SSMS to at least version 10.50.1777.0 in order to connect to an upgraded SQL Azure datacentre. This same change also broke any applications that rely on SQL Server Management Objects (including, for example, the SQL Azure Migration Wizard, resulting in the error described here). The solution to both these issues is thankfully relatively simple once diagnosed – run Windows Update and install the optional SQL Server 2008 SP1 service pack.

A more subtle change is that the behaviour of the actual SQL Azure database engine has changed, making it more comparable to Denali on-site SQL Server rather than SQL Server 2008 R2. Whereas, normally, upgrading SQL Server wouldn’t be a breaking change for most code (unless, of course, you were relying on a deprecated feature that was removed), the increase in spatial precision from 27bits to 48bits in SQL Denali means that you actually get different results from the same spatial query. Consider the following simple query:

DECLARE @line1 geometry = 'LINESTRING(0 11, 430 310)';
DECLARE @line2 geometry = 'LINESTRING(0 500, 650 0)';

SELECT @line1.STIntersection(@line2).ToString();

Previously, if you’d have run this query in SQL Azure you’d have got the same result as in SQL Server 2008/R2, which is POINT (333.88420666910952 243.16599486991572).

But then, overnight, SQL Azure is upgraded and running the same query now gives you this instead: POINT (333.88420666911088 243.16599486991646), which is consistent with the result from SQL Denali CTP3.

Not much of a difference, you might think… but think about what this means for any spatial queries that rely on exact comparison between points. How about this example using the same two geometry instances:

SELECT @line1.STIntersection(@line2).STIntersects(@line1);

SQL Azure query run in July 2011: 0. Same SQL Azure query run in August 2011: 1. Considering STIntersects() returns a Boolean, you can’t really get much more different than 1 and 0….

So, a precautionary tale: although SQL Azure hosting might have handed over the responsibility for actually performing any DB upgrades to Microsoft, the task of testing and ensuring that your code is up-to-date and doesn’t break from version to version is perhaps greater than ever, since there is no way to roll back or delay the upgrade to your little slice of the cloud.

The +1 button- more than 4 billion times for a day

In June Google launched the +1 button for websites, making it easier to recommend content across the web. In July, the +1 button crossed 2 billion daily views, and we also made it a lot faster. Today the +1 button appears on more than a million sites, with over 4 billion daily views, and we’re extremely excited about this momentum.

It’s just the beginning, however, and today we’re launching two more features that make +1 buttons more useful for users and publishers alike.

Sharing with your circles on Google+

Clicking the +1 button is a great way to highlight content for others when they search on Google. But sometimes you want to start a conversation right away—at least with certain groups of friends. So beginning today, we’re making it easy for Google+ users to share webpages with their circles, directly from the +1 button. Just +1 a page as usual and look for the new “Share on Google+” option. From there you can comment, choose a circle and share.

The new +1 button on Rotten Tomatoes

+Snippets

When you share content from the +1 button, you’ll notice that we automatically include a link, an image and a description in the sharebox. We call these “+snippets,” and they’re a great way to jumpstart conversations with the people you care about.

Of course: publishers can benefit from +snippets as well. With just a few changes to their webpages, publishers can actually customize their +snippets and encourage more sharing of their content on Google+. More details are available on the Google Webmaster blog.

We’re rolling out sharing and +snippets globally over the next week, but if you’d like to try the new +1 button now, you can join our Google+ Platform Preview. Once you’re part of the Preview, just visit a site with the +1 button (like Rotten Tomatoes) and +1 the page. Thanks for all of your feedback so far, and stay tuned for more features in the weeks and months ahead!