woensdag 4 april 2012

My first SQLAzure database!

Introduction

At Microsoft Virtual Academy you can take all kind of courses about Microsoft products. I've decided to follow the course about SQL Azure. There are all kind of articles about SQL Azure included and a lot of videos about SQL Azure. These are very informative. If you want to know more about SQL Azure I can recommend you following these courses.

In this blogpost I'll descibe a first exploration of SQL Azure. First I'll describe the registration process, then creating my first SQL Azure database and finally connecting with the database with SQL Server Management Studio.


Registration

First, registration for SQL Azure is needed at the windows Azure portal. You can register for windowsazure at the windows azure site and press select "buy" . The screens below are in the dutch language. Apologizes for that.


Press Next.


Login in with your windows live account


Then, a code verification is needed. A text message is send to your cell phone.


Enter your creditcard information and you're in.


My first SQL Azure database

This paragraph is about creating a simple SQL Azure database. The screen below is a maintenance window of the windows azure platform. Click on 'Database' for creating the SQL Azure database.



But, first we need to create a new server:




Enter an administrator login for the server


Enter the IP address.



And now it's really time to create a database in Azure.


The following window shows the database information.


The database is created now and I can test the database with the test connectivity option.


And enter your account.


Connect with Management Studio

In this pragraph I'll describe creating the database.First login to SQL Azure


And enter the web enables database objects editor.



Below, i'm creating my first table with SQL Azure!!





Now startup SQL Server Management studio and try to connect to the SQLAzure server:


At first i couldn't connect to the SQLAzure database. The following message kept on coming:


TITLE: Connect to Server
------------------------------


Cannot connect to xxxxxxxxx.database.windows.net.


------------------------------
ADDITIONAL INFORMATION:


Login failed for user 'xxxxxxx'.
This session has been assigned a tracing ID of '1xxxxxxd-155xxxxx8-afcd-d1ffeefb5d90'.  Provide this tracing ID to customer support when you need assistance. (Microsoft SQL Server, Error: 18456)


For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=18456&LinkId=20476

I tried a lot of things as suggested on many sites. Nothing seemed to work. But, when I opened a query to a on premise database and  then changed the connection to the SQLAzure FQDN, it worked!!!



And now connecting with the connect button works too.



And let's check the results of the insert script in the SQL Azure portal




Conclusion
It's very easy to create a database in SQL Azure. I can't say much for now about SQL Azure. I had some troubles connecting with the SQL Azure server but after some trails it seems to be working now.

Greetz,
Hennie

Geen opmerkingen:

Een reactie posten