Monday, June 18, 2012

SQL Azure Spatial Data

I found out something interesting. When dealing with Spatial data, SQL Server Management Studio will provide us with a tab that looks like the following to show our spatial query results:


The results will show anything that we query from the Geography or Geometry spatial types. However, in the above example where I am querying geographical data, you do realize that the results don't really make much sense. If you see the screenshot carefully, there are actually black dots on the grid. *LOL*

Now, let's port the database over to SQL Azure and execute the same query. Behold! SQL Azure's Spatial Data results window!


Awesome huh?! SQL Azure is smart enough to load up bing maps to show the geographical data. All our locations are marked with stars on the map. Not only that, you can also select a tool tip column to better visualize your geographical data.


When you hover your mouse over the stars, you will see a tool tip for your location. I think this is pretty neat :) 

Anyway, here's a bug (or design behavior) warning. If you have zoomed in to your location, switched to the Results tab to view your tabular results and then switched back to your map, you may get a "blue screen" like the following:


You maybe thinking that your map is loading and why is it taking so long to load. After a while, you may even think that the result window has hung. Actually, the map did not hang nor is it loading. You are just simply put to a view of the "Gulf of Guinea". The blue is actually the ocean *LOL*. Simply click on the zoom-out icon (frantically) and you should be able to see the world map again (with your stars intact).

There you go... SQL Azure Spatial! :)

Windows Azure Virtual Machines

In the recent June 2012 update, we can now provision Virtual Machines (VM) on Windows Azure via a new feature called Windows Azure Virtual Machines. This is Microsoft's entry into the Infrastructure as a Service (IaaS) space.


Windows Azure Virtual Machines is different from VM Role, in that it does not require us to create the VHD ourselves and upload it to the cloud. Everything is done on Windows Azure and we will have our VM running in just a few minutes.

There are few images that are available during the preview, Windows Server 2012 RC being one of them.


Not only can we create Windows VMs, but we can also create non-Windows VMs from the Gallery.

Once we have created our VMs, we can just RDP in.

Here is the Pricing information. Take note that you will still be charged during the preview period. So remember to delete your VMs (and the other stuff that was created for you) if you are just testing!

Note: After removing your VM, do remember to also remove the Cloud Service that was created. To remove the Storage, you will first need to Delete the Disk in the Virtual Machines tab.