Login or Sign Up to become a member!
LessThanDot Sit Logo

LessThanDot

Data Management

Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.

LTD Social Sitings

Lessthandot twitter Lessthandot Linkedin Lessthandot friendfeed Lessthandot facebook Lessthandot rss

Note: Watch for social icons on posts by your favorite authors to follow their postings on these and other social sites.

Your profile

    Search

    XML Feeds

    Google Ads

    « SQL Server DBA Tip 14 – SQL Server General – Updating Production DataSQL Server DBA Tip 13 – SQL Server built in DR/HA Solutions »
    comments

    This past weekend I made my first foray into SQL Azure. SQL Azure has been on my list of "to learn" technologies and lately it made it closer to the top. While I had picked up some knowledge from random links in the twitter-sphere, I hadn't made a concerted effort to learn about it yet.

    I started with a site named Microsoft Virtual Academy. This site (despite some usability issues with the dialog boxes prior to signup) offers a number of virtual "courses" that consist of links to external resources grouped into modules, each of which finishes with a short assessment. As I started working my way through the modules for SQL Azure it so happened that Brian Harry (blog) posted a link to a free Azure trial, which was handy since I no longer have an MSDN account (MSDN accounts are also offered a free trial, check out your subscription page for more information).

    On top of this information it happened that Buck Woody (blog|twitter) posted up an even more extensive list of information on Azure technologies, so it looks like my to-learn list is going to be full for a while.

    As if that flurry of links wasn't enough, DeepFriedBytes posted a podcast with Buck Woody on the importance of cloud (ahem, distributed) technologies. If there is one link you follow-up on, make it that one.

    My First Azure Database

    I followed the instructions provided by the resources above to create my account, configure the firewall rules, and create my first database. But then I was stumped, what was I going to put in it?

    It so happens that I've been working on an idea for a pet project for some time (well, one of many). In fact I had already used this idea to practice prototyping, requirements elicitation, and creation of an Agile-y product backlog. Some people knit, it never really caught on for me.

    Prototype image, 3 of 8
    Prototype image 3 of 8

    Not only that, but the act of coming up with user stories (potential features) forced me to invent a common terminology and recognize which terms were coming up the most frequently.

    Prototype image, 3 of 8
    70+ User Stories/Features

    So I might have enough information to put together a normalized database to support the core functionality, which is about as close as I am going to get to a realistic data model on a Sunday evening.

    Creating the Database

    Creating the first database was fairly straightforward (video) and consisted of setting up my subscription, creating a new server, and then creating the database. The main interface uses Silverlight, so unfortunately I wasn't able to use my [insert tablet here] (the future is here?). After the initial database 'server' was setup, I switched over to SSMS to actually build out my data model.

    DB Diagram
    I Also Drew A Data Model...with Color (Oooo)

    The first step was to add my database to SSMS. As I already have 2008 RS on my local machine, this was fairly straightforward. I clicked the "Connect" button in SSMS, entered the full server name from the Azure interface (right toolbar after creating "Server") and the credentials I had created as part of setting up the database "Server". Voila, it's that easy. The database server is connected, but instead of the usual yellow cylinder I get this nifty new Azure DB Icon icon.

    Now that I was connected I right-clicked to wizard my way through database creation only to find myself staring at a new script window. Unfortunately the GUI capabilities for Azure databases are limited and many times in mousing my way around the GUI I found myself staring at unexpected script windows, which was a little disconcerting and showed me how dependent I had grown towards the interface.

    Creating my database, I found that nearly all of the work was done through scripts instead of the usual GUI windows. Attempting to create the database or tables in the GUI generated a script with a SQL snippet to help me out. Luckily I knew well enough to include indexes on each of my tables (Azure requires each table have a clustered index), so this part went smoothly.

    What I hadn't counted on was how ingrained the usage of the IDE had become. Twice I accidentally left off IDENTITY's that I had intended to write, and both times I found it easier to drop and recreate the table from scratch. Attempting to script the table from SSMS (Right click, Script Table As, aww no "Alter", OK then "Create") resulted in the usual CREATE TABLE command being scripted, including some options that aren't available in Azure.

    Despite some hiccups, however, I was able to build out my entire data model in an hour. Considering I was having to polish some rusty skills along the way and had never touched Azure before, this seems fair.

    What's Next

    Now that I have a database, I'm tempted to use it. Continuing plans include building a sample application to talk to this database, playing with some fail over options, and generally trying out this whole SQL (and Windows) Azure technology. So far I've found the technology to be remarkably easy to start using, lets see if that continues to be true.

    I suspect having missed the distributed computing course in college, this will all get much trickier at some random point in the future.

    And now go click that DeepFriedBytes link up top and listen to Buck, you'll thank me.

    About the Author

    User bio imageEli delivers software and technology solutions for a living. His roles have included lone developer, accidental DBA, team lead, and even unintentional Solaris consultant once. With experience in adhoc, Lean, and Agile environments across NSF grants, SaaS products, and in-house IT groups, he is just as willing to chat about the principles of Lean or Continuous Delivery as he is to dive into Azure, SQL Server, or the last ATDD project he created.
    Social SitingsTwitterLinkedInHomePagedeliciousLTD RSS Feed
    InstapaperVote on HN

    9 comments

    Comment from: SQLDenis [Member] Email
    SQLDenis

    Thanks for posting this, I will have to check those links out before trying put this SQLAzure stuff
    05/12/11 @ 10:02
    Comment from: Eli Weinstock-Herman (tarwn) [Member]
    Eli Weinstock-Herman (tarwn) Added the missing link for Buck's list of SQL Azure links (I mentioned it but forgot to actually anchor in).
    05/12/11 @ 11:22
    Comment from: Rob Sullivan [Visitor] · http://datachomp.com
    Rob Sullivan Have you tried any of the other cloud services to see how much better/worse they are than Azure? Are you going to post any performance numbers?

    Sounds like you are off to a good start... remember though, don't put too much in that DB of yours with a 50GB limit, SQL Azure isn't really meant to scale ;)
    05/12/11 @ 20:59
    Comment from: Eli Weinstock-Herman (tarwn) [Member]
    Eli Weinstock-Herman (tarwn) I haven't tried any other services yet, no. I may consider doing so once I have enough of an application put together that I can actually do something with the data store. I was also playing around with the idea of a SQL CE vs SQL Server vs SQL Azure performance comparison, but I'm not sure I'll get around to that.

    Currently I'm in progress on a sample application on SQL CE and Entity Framework 4 that I plan on expanding to include a non-EF data layer and connectivity to the azure DB, so maybe I'll post some results from that mish-mash.
    05/13/11 @ 04:34
    Comment from: SQLDenis [Member] Email
    SQLDenis If you’d like to get early access to the federations on sql azure, here is the way to get in: SQL Azure Federations Product Evaluation Program nomination survey is now open

    The goal of the program is to help customers targeting building solution on SQL Azure to experiment with the technology before its public release. It will also be a chance to provide the development team with detailed feedback on the federations technology before it appears in SQL Azure
    05/13/11 @ 04:36
    Comment from: Patrick Wood [Member]
    Patrick Wood Thanks for the great post.

    I see you had problems with creating scripts that are compatible with SQL Azure. There is an easy way to Generate Scripts that are 100% compatible with SQL Azure using SSMS.

    In SSMS right click on your database and select Tasks > Generate Scripts... When the "Set Scripting Options" dialog appears click the "Advanced" button and then for "Script for the database engine type" select "SQL Azure Database".

    The following link opens a blog post that shows how it is done: http://bit.ly/kh9cC6
    05/13/11 @ 10:41
    Comment from: Eli Weinstock-Herman (tarwn) [Member]
    Eli Weinstock-Herman (tarwn) Thanks Patrick, that looks promising. I probably should have looked around for a solution the other night, that's what I get for late night database scripting. I'll give it a try as I finish rounding out the database and start integrating an application with it.
    05/13/11 @ 11:29
    Comment from: Patrick Wood [Member]
    Patrick Wood No sweat. There is so much information out there and it is scattered all over the web that it is hard to keep up with everything.

    That is why I created a Microsoft Access and SQL Azure Information Center for Developers http://gainingaccess.net/SQLAzure/AccessAndSQLAzureInfo.aspx. So much of the information I needed could be accessed from one location so I am gathering what I can and hopefully it will help others. But I have to work hard to keep up with the amount of new information available on a daily basis.

    Roger Jennings has an outstanding site http://oakleafblog.blogspot.com for Windows Azure, SQL Azure and other Cloud development.

    The SQL Azure Daily http://paper.li/tag/SQLAzure and the Azure Daily http://paper.li/tag/azure/ are also excellent sources of information. And of course there is Twitter and Facebook.
    05/13/11 @ 18:22
    Comment from: Paras Doshi [Visitor] · http://www.parasdoshi.com
    Paras Doshi Hey. wonderful article and thanks for the buck woody tech podcast link.
    05/25/11 @ 02:03

    Leave a comment


    Your email address will not be revealed on this site.

    To mislead the spambots.

    Your URL will be displayed.
    (Line breaks become <br />)
    (Name, email & website)
    (Allow users to contact you through a message form (your email will not be revealed.)