Monday, June 3, 2013

How to take backup from SQL Azure

Hi All,

From last few weeks I’ve been struggling to take backup of a SQL Azure DB.
I believe many of you might have faced this issue.
As per my knowledge & enquiries till date I come to know that, to take a backup from SQL Azure you need to have the Azure management portal access.

But just now I found a great innovative trick to take a backup from SQL Azure.
Here is the simple guide for “How to take backup from SQL Azure”.

Requisites:
·         SQL Server 2012
·         A high speed Internet Connection


Step 1: Open Management Studio & login to your SQL Azure account.


I believe you’d be seeing your Object Explorer like this (Of course with different database list, if you are not in my project :D).


Step 2: Now right click on the DB for which you want to take a backup à Click on ‘Tasks’ à Click on ‘Deploy Database to SQL Azure’.



Step 3: Now you will be seeing a window like following.

   

Click on ‘Next


Click on ‘Connect’.
A window like following will pop-up.


Login to your local SQL Server instance.
After successfully logging in you’ll be finding a window like following.

  

Click ‘Next’.


Click Finish’.
Now your SQL Azure DB will start deploying to your local SQL Server.


Step 4: After successful deployment to your local SQL Server, you simply can take a backup as you take for normal DBs .


I’ve tested this on my machine & it’s working fine.
Hope it’ll work for you as well.

Any queries feel free to revert back.

Using Continuous Deployment to Azure with Team Foundation Service

Guys,

Here are the Steps to Do it

  • Add AzureContinuousDeployment.11.xaml to your BuildTemplates folder if you don’t have it already.
  • If you had to do step 1, then you will need to also register the Azure template for use. Start creating a dummy build definition and select the new template in the Process section. Once you have it there it’s ‘registered’ and you can discard the build definition


  • Get an Azure account (if you have an MSDN subscription you get great free access thrown in)
  • Enable the Websites preview feature under your subscription
  • Create a Website

2.png


  • Go to your website and Set up TFS publishing

3.png


  • Work through the wizard adding the authorization details and choose your Team Project. When you are done the ‘magic’ will happen and you will see the following

4.png


  • Linking it all together
This screen confused me a little. What it doesn’t tell you is that it created a build definition in your chosen project for you. The format is <WebsiteName>_CD

5.png


  • The first thing you are probably going to want to do is edit that builds Workspace Mappings as it defaults to the root of your project, i.e. a checkin ANYWHERE in your team project will trigger the build. (note there appears to be some logic involved here.. see further in the post)

6.png


  • If your Team Project has no solutions, your build definition will not have any Solution to Build defined

7.png


  • Even though the build is not fully defined, if you check in anything to the Team Project it will trigger

8.png


  • and fail…

9.png


  • Let’s add a solution to our Team Project

10.png


  • and check it in…. another CI build will trigger

11.png


  • Behind the scenes, when you checked in that solution file, TFS automatically associated the solution with the build definition….. and if you F5 your website ….. its got the new content!

12.png


  • That was EASY! You also get a log of your deployment in your Management screen

13.png


  • So what happens if we Set up TFS publishing to a team project which already has solutions…
I’ll disconnect TFS in the Dashboard

  • When you do this, TFS will disable rather than delete the build definition it created


15.png

  • If I Set up Publishing again it simply enables the build. I’ll delete the build so we are back to a position where we can compare linking TFS to a project.If I do this, the build definition automatically adds my Solution to it’s template.

16.png


  • Not only that, it actually tried to be clever with the Workspace mappings… that’s cool!

17.png

Thats it...I Know Its a bit lengthy Process But its Cool...and there is one more link which i found very interesting for Publishing to Windows Azure using TFS Check this out !!!

~~~ Adios ~~~
       Prasant