Import and Export (CTP) is an interesting SQL Azure feature that allows us to Export a SQL Azure database in form of a bacpac to Azure storage. And think of bacpac as the “zipped” version of schema and data in your database. It also allows us to import the bacpac to a SQL Azure database….Read more on SolidQ Blog: Step by Step guide to Export a SQL Azure Database to Azure storage via Import and Export CTP
Month: December 2011
How to make the best use of your SQL Azure Free Trial?
StandardLet’s say you have signed up for a SQL Azure free trial and it allows you 1 web edition database of Max Size 1 GB for a Month. You want to make the best use of this resource to get the maximum out of it, don’t you? No worries – In this blog post, I’ll list tips and tricks which would help you get the maximum out of that 1 GB SQL Azure database in a given month.
One option is to install Adventure Works LT sample database for a month – you try connecting SSMS, run queries, create DB objects, run stored procedures and you realize that it is SQL server in cloud (SQL server vs SQL Azure) – And you used your 1 GB SQL Azure DB free trial for a month, fair enough – you did learn a few things and that’s good. Now, let me propose a slight change that will allow you to try features such as SQL Federations and SQL Data SYNC and still not go above the “free” usage limit.
Before I do that – it is important to understand this:
When you are given a 1 GB Web edition SQL Azure DB free trial for a month – it effectively means that you have “30” 1 GB web edition SQL Azure DB whose validity is one Day and this is so because – the SQL Azure billing is “on per day” basis.
Image Source: Getting started with SQL Azure – Part 3: Provisioning and Billing Model of SQL Azure << Paras Doshi
Note: The billing cycle is based on UTC format and not your “local” Timezone.
Now let’s take this one step further:
This billing model allows you to create “30” 1 GB web edition DB for 1 day – and you have exhausted your free trial cap.
Alternatively, this allows you to create “15” 1 GB web edition DB for 2 day – and you have exhausted your free trial cap.
Alternatively, this allows you to create “10” 1 GB web edition DB for 3 day – and you have exhausted your free trial cap.
……
And I hope – you got my point that you can spread those “30” 1 GB web edition DB in many different combinations.
Now, here is one way you can go about o spread your cap of “30” 1 GB web edition SQL Azure DB:
Number of Days [Col1] | Feature | Details | Number of 1 GB web edition DB consumed per day [Col4] | Consumption [Col1 * Col4] |
5 | – learn basics | – connect via SSMS – run TSQL commands – Explore Management studio – SQL Azure firewall | 1 | 5/30 |
2 | – Data SYNC | Learn cloud to cloud synchronization using 1 Hub SQL Azure DB and 2 Member SQL Azure DB | 3 | 11/30 |
2 | – Data SYNC | Learn Enterprise to cloud synchronization using 1 hub SQL server DB and 1 SQL Azure DB | 1 | 13/30 |
2 | – Azure reporting | Learn SQL Azure reporting | 1 | 15/30 |
1 | – COPY TSQL command | -copy a SQL Azure DB using COPY command | 2 | 17/30 |
1 | -SQL Azure Import/Export | Export a SQL Azure DB to Azure storage blob and then import it back to a new SQL Azure DB | 2 | 19/30 |
1 | – SQL server to SQL Azure migration | try various migration tools like SSIS, BCP, SQL Azure migration wizard to migrate SQL server DB’s to SQL Azure | 3 | 22/30 |
1 | – SQL Azure federations | When you SPLIT a SQL Azure DB, it will perform it ONLINE. that means a single split command equals two create db command and one drop command and so for that day – you are charged for three db’s. Read more here | 5 | 27/30 |
3 | – Anything you may want to learn | you have “3” db’s to learn any other feature | 1 | 30/30 |
Now, this is not the optimum plan but it does give an idea to plan your free trial usage. I’ll tell you why the above plan is not optimum. For instance, when you try COPY command – you have two databases to play with for the rest of the day and you can do bunch of stuff with it. Other being, Once you have migrated the local SQL server db’s to cloud – you have those db’s to play with for the rest of the day. (Again, a billing day is counted based on UTC format. be aware!)
So yes. This is it! you can tweak the above plan based on your need and time you may have. feel free to post your suggestions in the comment section.
Summary of Just Learned Tips that i have submitted for year 2011 at BeyondRelational.com site
StandardJust learned is a section in the BeyondRelational site that is meant for members to post a nuggets (short) of knowledge. I like this section – and so time to time i open the section and browse through the posts and once in a while, contribute. Here is the list of tips that i submitted this year:
3. Just learned how to allow file downloads in IE in Windows server 08 R2
4. SQL Server PowerPivot for SharePoint not available with standalone sharepoint
6. Deploying azure web roles just got faster with “Windows Azure Accelerator for Web Roles”
8. General – Lorem ipsum has no meaning and just used this phrase to redirect attention
9.[Azure] a MSDN subscriber gets an alert email in case the Azure usage crosses the allowed usage
10. Press F11 on IE and Firefox to view web pages in full screen mode
11. never let your domain name expire
12. [Azure] One can map (unfriendly) azure storage domain to a custom domain name (Easily)
13. The new recognition system on MSDN, Technet and Expression profile is powered by windows Azure!
14. Posting code in wordpress.com
15. [Azure] Charges dropped for ingress (inbound traffic)
16. [Azure] One can combine a web role and a worker role
17. SQL Azure – currently, Maximum 6 servers are supported per subscription
18. Azure will charge you until you delete your hosted service
19. Atleast 2 instances of a role are required to meet the Azure SLA requirements
20. a DMV [sys.dm_db_partition_stats] in SQL Azure to calculate size of DB
Thank you for the Gift: Windows Phone and Klout!
StandardWindows Phone just ran one of the best klout perk ever! So the way it works is that based on the score on Klout (which is a service that measures your online influence) – some people including me were invited to a Windows Phone Launch Party and they were also gifted a Windows Phone.
Here’s my Gift:

Klout Perk: Windows Phone!
And I was eligible for this perk as i am (as per klout) an influencer on Microsoft Technologies (in Dallas, Texas area).
So,
Thank you Windows phone for a great party and gifting me a phone that i like a lot!
Part 10/10 of “Getting started with SQL Azure” series is live!
StandardPart 1: We defined SQL Azure and discussed advantages of SQL Azure
Part 2: We created an Azure account and created our very first SQL Azure database
Part 3: We discussed about the provisioning and the billing model of SQL Azure
Part 4: We discussed the SQL Azure architecture
Part 5: We discussed the SQL Azure security model
Part 6: We discussed how to migrate Databases to SQL Azure
Part 7: We discussed how to improve performance of SQL Azure DB and options for planning backup and restore strategies.
Part 8: We discussed administrative tasks related to SQL Azure.
Part 9: we discussed about Developing SQL Azure applications.
Part 10 A: We discussed about SQL Azure Data SYNC and SQL Azure reporting
Part 10 B: Conclusion
Uploading a Hello world python app on Google App Engine (with windows as your local OS)
StandardI assume:
1) you have never installed python platform before.
2) you are new to Google App Engine.
3) you are running windows. if you are running Linux – the process is different. And please refer this for getting started.
4) you have a Google account.
Ok. So let’s get started with developing a hello world python app on windows first and then upload that app to Google App Engine.
1. Get the python development environment for windows.
I opted for Active state python community edition which you can download from: http://www.activestate.com/activepython/downloads
2. Install Google app engine SDK for python.
The second step is to download the Google App Engine SDK for python on windows which you can download from: http://code.google.com/appengine/downloads.html
3. Create an Application on Google and get the APP ID.
Now, let’s sign up for a Google App Engine Account with a Google account you may have. Part of the process includes verification via a code sent to your mobile device – so be ready to provide your mobile number. And every Google Account gets to deploy 10 applications with a Google App Engine admin account.
Now, To sign up for Google APP engine. Go to: https://appengine.google.com/ and if you have a Google Apps account go to: https://appengine.google.com/a/<DOMAIN.COM>
Now, sign in with your Google account and you would be asked to verify your account:
FAQ for this process is here: http://code.google.com/appengine/kb/sms.html
Now, once you successfully verify your account, you would see something like:
And click on create application and fill in the following details. For now, fill in the App ID and the App Title. Leave other options as default for now. And yes, please check the availability of your app id and this will also be your URL. The URL will take the form.appspot.com
Scroll down and you will find a “create application”. please click on it. You will also see a message: “Application registered successfully”. Now, let’s do some coding!
4. Let’s write the Hello World Python app!
create a directory and name it anything you like. I named it “parasdoshipyapp”. But remember the location of the directory – you need it later.
Now,
create a helloworld.py file inside the directory you just created. (you can edit it via notepad or pythonwin). And here is the demo code:
print ‘Content-Type: text/plain’
print ”
print ‘Hello, world!’
Now, you will need to create app.yaml file. Here is the demo code:
application: parasdoshipyapp
version: 1
runtime: python
api_version: 1handlers:
– url: /.*
script: helloworld.py
Note:
In the first line, you add the app id (remember, we had created an application id in step 3)
And the last line is the file that has the code. In this case, the code is meant to print just couple of lines.
5. Test and upload on Google App Engine via Google App engine Launcher.
open Google App Engine Launcher:
Go to File –> create new application, and you will see:
Add the app id in the application name and the directory of your app. In my case, it is “parasdoshipyapp” and click on create.
Now let’s test it locally.
Click on “Run” to test it locally. Note the port no. In my case it is 8080 so I am going to go and open “http://localhost:8080/” on my browser:
It runs and so let’s deploy it on cloud (Google App Engine)
click on “deploy” and enter your Google Account credentials. Note the projects field is your “App ID”
Now we you will see the progress of the deploy. Let it do it’s processing and when it has successfully deployed your app, go to the URL and check out your site! Also explore the application dashboard.
And here is a hello world app I deployed! URL: http://parasdoshipyapp.appspot.com/
So that’s about it. I played with Google app engine as a part of an assignment for my UW cloud computing certificate program and I thought about documenting the process so may be it can help someone. Also refer to Google App Engine Getting started documentation here: http://code.google.com/appengine/docs/whatisgoogleappengine.html
Update:
If you are searching for a tutorial to help you get started with Java on Google App Engine. Here’s the tutorial: Getting started with creating Java app on Google App engine – Guest Post by Dhwaneet Bhatt
Upload a file to windows azure blob via “data transfer” tool
StandardIn earlier blog post, we talked about how to upload excel file to SQL Azure via the Data transfer tool found in SQL Azure labs. In this blog post, we will see how to upload an excel file to windows azure blob via this tool codenamed Data Transfer. So let’s get started.
1. Go to https://web.datatransfer.azure.com and select the second option – Windows Azure Blob:
2. Provide the credentials of your storage account (I checked the URL, it has https) – And provide account name in the format.blob.core.windows.net , container name and if the container of that name does not exist than it would be created, and the key which you can find from the storage accounts in Azure management portal. click on next.
3. now point the tool to the file you wish to upload and click on Import.
4. So that’s it Done! you will find the files you uploaded on My Data > Blobs Tab.
And you can view the file through My Data tab. (excel file will be downloaded and viewed via excel on your machine)
Note:
And during my experiments, I also tried uploading a .txt and .xml files. It works too!
Overall, Data Transfer makes our life easier by providing a web interface to upload data to SQL Azure and Windows Azure blobs.
Upload CSV and excel files to SQL Azure via “Data Transfer” tool
Standard[UPDATE 9/12/2012: The URL’s that point to the service does not seem to work. The service may be out of “lab phase” and hopefully we would see this integrated in Portal or as an Independent service.]
Microsoft recently announced a tool (which is in CTP) called “Data Transfer” on SQL Azure Labs. It let’s you transfer CSV and excel data to SQL Azure or Windows Azure blob. I think this service would make our task easier than before. Earlier, We had the option to use SQL server integration services (SSIS) or BCP to transfer excel files or CSV files to SQL Azure. It was straightforward too but what if we had the tool in which you just point it to your excel/csv file and it would do try to do the rest. wouldn’t that be easier? Yes, so Data Transfer aims to achieve exactly that. To test drive Data Transfer tool go to https://web.datatransfer.azure.com/
In this blog post, I will show you how to upload an excel file to SQL Azure via this tool:
1. After you have registered yourselves (via a Live ID) on https://web.datatransfer.azure.com/ – you will see
2. In my case, since I wish to transfer an excel file to SQL Azure, I am going to go with first option i.e. Microsoft SQL Azure
3. In the next step, provide the credentials of a SQL Azure DB (that exists already)
You have the option of saving a connection. And the drop down that you see in the above image will let you see all your saved connection.
4. In the next step, point to your file and select appropriate options via the Advanced options which has the File Encoding, Column Delimiter, Row delimiter and Text Qualifier options. So this are useful if you had a flat file with {tab} instead of {,} to separate column values. In my case, I am going to leave the advanced options to their default values. Point to the excel file and since my first row has column names – I am going to check the box that says “column names in the first data row” and then click on analyze.
5. if you had not checked the “Edit table defaults” box, then Done! you can view the status of the process from the My Data tab. It’s this easy.
If you checked the Edit table defaults, the next page would allow you to edit the data-type. The power of this tool resides in the fact that it guesses the data-type and assigns it to the data that we had specified. And if you want to over-ride the data-type chosen by the tool, you can do so here at this page:
BTW: I find this amazing!
6. Click on save and the data is ready to be uploaded. it’s that simple. And after the upload, you can view the details here on the “my data” page:
7. You can log into the SQL Azure manage portal and browse the tables. And after upload, the link to “manage” these tables will also be available in the “my data” page.
Conclusion:
As you imagine, the process is simple and “Data Transfer” tool makes it easier to upload CSV/Excel file to SQL Azure. And it also let’s you upload a file to Azure blob storage account. Give it a spin! URL: https://web.datatransfer.azure.com/
And learn more about it here: http://www.microsoft.com/en-us/sqlazurelabs/labs/datatransfer.aspx
part 9 of “Getting started with SQL Azure” series is live!
StandardAim of “Getting started with SQL Azure” series is to offer you a set of brief articles that could act as a Launchpad for your to-be wonderful journey of exploring Microsoft’s cloud based database solution i.e. SQL Azure.
In part 9, I have discussed about developing SQL Azure applications with following subtopics:
– Partially Supported and not supported TSQL statements
– SQL Server features not supported by SQL Azure
– Tools that have support to connect to SQL Azure:
– How can clients or Applications connect to SQL Azure?
Summary:
Part 1: We defined SQL Azure and discussed advantages of SQL Azure
Part 2: We created an Azure account and created our very first SQL Azure database
Part 3: We discussed about the provisioning and the billing model of SQL Azure
part4: We discussed the SQL Azure architecture
part 5: we discussed the SQL Azure security model
part 6: We discussed how to migrate databases to SQL Azure.
Part 7: We discussed how to improve performance and backup options in SQL Azure
Part 8: we discussed about Administrative tasks with SQL Azure.