Three days ago I tweeted this:
Evidently I wasn't the only one that thought this was a good idea because as you can see from the screenshot that tweet has, so far, been retweeted more than fifty times. Clearly there is a desire to see the AdventureWorks databases made available for the community to noodle around on so I am pleased to announce that as of today you can do just that - [AdventureWorks2012] now resides on SQL Azure and is available for anyone, absolutely anyone, to connect to and use* for their own means.
*By use I mean "issue some SELECT statements". You don't have permission to issue INSERTs, UPDATEs, DELETEs or EXECUTEs I'm afraid - if you want to do that then you can get the bits and host it yourself.
This database is free for you to use but SQL Azure is of course not free so before I give you the credentials please lend me your
ears eyes for a short while longer. AdventureWorks on Azure is being provided for the SQL Server community to use and so I am hoping that that same community will rally around to support this effort by making a voluntary donation to support the upkeep which, going on current pricing, is going to be $119.88 per year. If you would like to contribute to keep AdventureWorks on Azure up and running for that full year please donate via PayPal to firstname.lastname@example.org:
Any amount, no matter how small, will help. If those 50+ people that retweeted me beforehand all contributed $2 then that would just about be enough to keep this up for a year. If the community contributes more than we need then there are a number of additional things that could be done:
- Host additional databases (Northwind anyone??)
- Host in more datacentres (this first one is in Western Europe)
- Make a charitable donation
That last one, a charitable donation, is something I would really like to do. The SQL Community have proved before that they can make a significant contribution to charitable orgnisations through purchasing the SQL Server MVP Deep Dives book and I harbour hopes that AdventureWorks on Azure can continue in that vein. So please, if you think AdventureWorks on Azure is something that is worth supporting please make a contribution.
OK, with the prickly subject of begging for cash out of the way let me share the details that you need to connect to [AdventureWorks2012] on SQL Azure:
- Server mhknbn2kdz.database.windows.net
- Database AdventureWorks2012
- User sqlfamily
- Password sqlf@m1ly
That user sqlfamily has all the permissions required to enable you to query away to your heart's content. Here is the code that I used to set it up:
CREATE USER sqlfamily FOR LOGIN sqlfamily;
CREATE ROLE sqlfamilyrole;
EXEC sp_addrolemember 'sqlfamilyrole','sqlfamily';
GRANT VIEW DEFINITION ON Database::AdventureWorks2012 TO sqlfamilyrole;
GRANT VIEW DATABASE STATE ON Database::AdventureWorks2012 TO sqlfamilyrole;
GRANT SHOWPLAN TO sqlfamilyrole;
EXEC sp_addrolemember 'db_datareader','sqlfamilyrole';
You can connect to the database using SQL Server Management Studio (instructions to do that are provided at Walkthrough: Connecting to SQL Azure via the SSMS) or you can use the web interface at https://mhknbn2kdz.database.windows.net:
Lastly, just for a bit of fun I created a table up there called [dbo].[SqlFamily] into which you can leave a small calling card. Simply execute the following SQL statement (changing the values of course):
VALUES ('Your name here','Some Message','your twitter handle (optional)','Blog URI (optional)');
[Id] is an IDENTITY field and there is a default constraint on [DT] hence there is no need to supply a value for those.
Note that you only have INSERT permissions, not UPDATE or DELETE so make sure you get it right first time! Any offensive or distasteful remarks will of course be deleted :)
Thank you for reading this far and have fun using AdventureWorks on Azure. I hope it proves to be useful for some of you.
AdventureWorks on Azure - Provided by the SQL Server community, for the SQL Server community!