2/25/09

SQL Data Services (SDS) Tutorial

This blog entry is for you if you are new to SQL Data Services and want to get started.

This article is based on CTP release of SQL Data Services.

I assume that you have:
SQL Data Services account
SQL Data Services SDK installed on your machine

When you start SDS Explorer from Windows "Start" menu, it looks like this.



Without doing anything, just click "Query" button at the lower right corner.

You will receive a popup window asking User and Password.



For User field, provide the solution name you specified while you were signing up for SDS. You should have also received a password at the same time. Once you get passed authentication, SDS Explorer will tell you that it is "working...", and moment later you should see this.



Your output may be different from what I have here, but the idea is the same and simple: you get listing of all of the "Authorities" under "Service" that you have permissions to access.

You can create as many Autorities as you want, but you cannot delete them (I am not sure if this is a limitation during CTP or permanent policy).

Next, let's create a new Authority.

Click "Authority" button, which is one of the buttons under "Template" label, which will give you this screen:


At this momenty, you haven't done anything to SDS data center. You are simply preparing for a request to create a new authority. Notice that SDS Explorer generated a GUID value for you as Id of the new authority. You could use this GUID or specify something more user friendly. For example:


I changed the Id value to "yoshi" (Note. I have not confirmed this but it appears that Authority Id must be unique within the global namespace. My attemp to create Authority with typical id values like "testauthority" and "authorityexample" fails).

What you are doing here is to define a XML payload which will be sent to the server using HTTP POST request, which we will see next.

Once you are happy with the name of the new Authority, click on "Create" button.

Now you have successfully created a new Authority. Unfortunatley, SDS Explorer doesn't make it obvious that the operation succeeded. In order to get a positive confirmation, you should check the HTTP Request/Response data, which is available in a small window that shows up by clicking "Request - Response" button toward the bottom.


The "Request" tab shows you that in order to create a new Authority, SDS Explorer made a HTTP POST request against the "Service"

POST https://data.database.windows.net/v1/ HTTP/1.1

It passed XML payload that act as input for this operation

<?xml version="1.0" encoding="utf-8"?>
<s:Authority xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:x="http://www.w3.org/2001/XMLSchema"
xmlns:s="http://schemas.microsoft.com/sitka/2008/03/">
<s:Id>yoshi</s:Id>
</s:Authority>

And the "Response" tab shows that the server successfully created the Authority.

POST https://data.database.windows.net/v1/ HTTP/1.1
Status: Created

Now, lets check to see if we will see our new Authority in the list of Authorities available under this Service. You can use the folder-looking icon of Address bar to "go up one level".

While the address bar contains value

https://data.database.windows.net/v1/

Click on "Query" button. You should see this now.


My new Authority called "yoshi" is now available.

I will write more tutorial on this subject later but with this article, you have seen some of the essential SDS concepts:
* SDS Explorer is a handy tool to work with SDS
* You can Query againt https://data.database.windows.net/v1/">https://data.database.windows.net/v1/ to retrieve listing of Authorities
* You can add your Authority by making HTTP POST request with XML payload (this pattern is called REST)

713 comments:

«Oldest   ‹Older   1001 – 713 of 713
«Oldest ‹Older   1001 – 713 of 713   Newer› Newest»