oData Enabling a SQL Azure Database

by mheydt 4. April 2010 16:29 >

Today I went through the process of oData enabling one of my SQLAzure databases.  One of the advantages of using SQLAzure is that it is easy (almost) to enable oData access.  The following was the process I went through for your use, as I didn't see a similar tutorial.

First, I recommend starting at this page on the oData site (it is where I started):

From this page you can go to the oData Service Portal, which is at this URL: https://www.sqlazurelabs.com/ which looks like the following:

Click on the OData Service for SQL Azure tab.  Upon your first time in, you'll see a registration screen as follows.  Accept the terms and continue.

When you get in, you'll be presented with a form to enter your SQL Azure database credentials:

Press connect, and upon successful connection, you will be presented with a list of specific databases fromt that server for you to oData enable.  Select your database, and the 'Enable OData' checkbox, and you will be presented with a request to specify access to the database.  The default is no anonymous access:

You can select any user in your database if you want anonymous access.  For now I'm using 'dbo':

At this point, you have actually completed oData enabling of your database.  You can access the data at the URL provided in the portal on the screen.  As an example, if I click the link above, I get the following result:

I only have one table in this database, named HistoricalErcotPrices.  If I was to append /HistoricalErcotPrices to the URL, I would get the following:

Not incredibly useful, but if you view source, you can see the data:

Very nice indeed!

If you want an app to visualize your oData feed, there is the Silverlight OData Explorer, which looks like the following once you enter your feed url:

Tags:

Azure | oData

blog comments powered by Disqus

about the author

I'm a .NET, XAML, and iOS polyglot that loves playing with new things and making cool and innovative stuff.  I am also a Mac junkie.

I am Principal Technologist for SunGard Global Services in NYC, in their Advanced Technologies practice, and I work extensively with SunGard's energy and financial customers.

Note the the posting on this blog are my own and do not represent the position, strategies or opinions of SGS.

twitter

I can't stop thinking big!
Sunday 1:08AM via WindowsLive
Just watched Moneyball. That's my pick for best movie this year.
Saturday 3:51PM via WindowsLive
@vincebelpiede: Report: Skype For Windows Phone Beta Imminent http://t.co/KYNjgg1L#mhtnd
Wednesday 8:39AM via Twitter for Mac
@mashable: Kinect Fusion Will Turn Gaming (and More) Into a 3D Fun House - http://t.co/Ihrq2fY2#mhtnd
Wednesday 8:39AM via Twitter for Mac
New Kinect SDK: http://t.co/57MvA5L5 #mhtnd
Wednesday 8:39AM via Twitter for Mac
Follow me on Twitter

recent comments

None

month list