locked
Is there free Azure SQL Server for small web apps? RRS feed

  • Question

  • I have dreamspark account and I would like to build some small apps which dont require large amount of DB storage. Dreamspark subscriptions only provide mysql but no sql verver. Is it possible to get small usage of Azure SQL server without charged and entering credit card information? 

    "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it."

    Monday, November 23, 2015 10:30 AM

Answers

  • Hi emil_tr

    The DreamSpark Azure subscription includes a 20mb MySQL database via ClearDB see the following

    Configuring a MySQL database on Azure

    Go to Create – Data and Storage – MySQL Database

    We want to create a new MySQL Database,

    image

    On the next screen of the wizard, give it a database name and select create

    image

    After a few minutes later, the resource should be ready and linked.

    SNAGHTML18c245c7

    If you go to the dashboard now you should see your database

    SNAGHTML18c3a2c7

    To manage your database, click manage Database

    SNAGHTML18c4a8ad

     

    SNAGHTML18c54952

    You can also use other tools such as Oracle's MySQL Workbench or any other SQL management tool if you prefer.

    When you create a MySQL database on Windows Azure, the database is actually created on ClearDB. ClearDB databases can be connected to remotely, and that's what we'll do.

    Download MySQL Workbench and opt to create a new connection. In the window, fill in the data from the previous screenshot – the host name, user name and password. You can even download SSL keys from ClearDB (see screenshot below) and use them in the SSL tab of the connection in MySQL Workbench to make your connection more secure.

    SNAGHTML18c75f32

    After pushing Test Connection, Workbench should connect successfully. After pushing connect, it should display an empty database.

    image

    Wednesday, November 25, 2015 1:48 PM
  • It certainly is possible to use SQL Server Compact on Windows Azure.

    However, I would suggest you check out the clearDB MySqL free offering which is included in DreamSpark.

    Microsoft dreamspark provides a 20mb mercury MySQL for every Azure subscription. This means you can create a subscription and create a free website, with a free MySQL Azure Database. (As long as it's less than 20 MB) You can also have multiple Web Sites associated with the same MySQL Azure Database for free. So, if you're considering SQL Server Compact on Windows Azure because your database will be very small and you don't want to pay for a 100 MB database, you can consider this option. In most cases, it will be a better solution. Your website will perform better, your database performance will be better and you have the ability to change your data and it will be replicated.

    Issues with SQL Server Compact on Windows Azure

    Data is not replicated
    If you change anything in the database, the changes stays local. This means that if you have multiple instances running your web application, then each web application will have their own database, and if you change something in one of them, the change won't be replicated to other instances, which will result in unpredictable behaviour in your application.

    You risk losing data
    If you change anything in the database after deployment, you risk losing data, because Windows Azure might decide to redeploy your instance to another virtual or physical machine. When this happens, the new instance will be setup with the deployment package you originally uploaded to Windows Azure, and this package does not contain any changes you make to the database. And this redeployment can happen at any time for several reasons.

    Conclusion
    So, SQL Compact on Azure? Sure, no problem if your data is read-only. However, note that you won't get the performance you would with SQL Azure.

    If you want to use SQL Server Compact with Windows Azure, you can use the "private deployment" method, as explained on "ErikEJ"'s blog

    Below is the solution for setting up SQL CE:

    Step by Step like this:

    1. Install two nuget: EntityFrame.SqlServerCompact & Microsoft SQL Server Compact Edition

    2. put your SQL database file(.sdf/.mdf) in APP_Data folder (Put the connection string like this in order to use it:

      <add name ="DefaultConnection" connectionString ="Data Source=|DataDirectory|CompactDB.sdf" providerName ="System.Data.SqlServerCe.4.0" />)
      
    3. Publish full project include above SQL database file to AzureWebsites.

    4. you can find it can work well and is totally free.

    Monday, December 14, 2015 9:13 PM

All replies

  • The cheapest is Basic tier which is $5. Looks like they were doing a promotion for a free 20MB database. 

    Check out this forum thread: https://social.msdn.microsoft.com/Forums/azure/en-US/42f24032-d14e-4930-a5dd-1697b566ff44/free-20mb-database-for-website


    Azure power user for 4 years & .NET developer for 15 years Founder & CEO of Stackify APM - Advanced application monitoring for Azure



    Monday, November 23, 2015 3:58 PM
  • wow 20 mb is really small. SQL Ce would even make more sense to use in this case

    &quot;Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.&quot;

    Wednesday, November 25, 2015 11:16 AM
  • wow 20 mb is really small. SQL Ce would even make more sense to use in this case

    &quot;Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.&quot;

    SQL CE does work on Azure Web Apps as it is in the sample bakery app. However, I'm not sure if it works on apps scaled to multiple instances


    Azure power user for 4 years and .NET developer for 14 years. Founder and CEO of Stackify APM - Advanced application monitoring for Azure

    Wednesday, November 25, 2015 1:05 PM
  • Hi emil_tr

    The DreamSpark Azure subscription includes a 20mb MySQL database via ClearDB see the following

    Configuring a MySQL database on Azure

    Go to Create – Data and Storage – MySQL Database

    We want to create a new MySQL Database,

    image

    On the next screen of the wizard, give it a database name and select create

    image

    After a few minutes later, the resource should be ready and linked.

    SNAGHTML18c245c7

    If you go to the dashboard now you should see your database

    SNAGHTML18c3a2c7

    To manage your database, click manage Database

    SNAGHTML18c4a8ad

     

    SNAGHTML18c54952

    You can also use other tools such as Oracle's MySQL Workbench or any other SQL management tool if you prefer.

    When you create a MySQL database on Windows Azure, the database is actually created on ClearDB. ClearDB databases can be connected to remotely, and that's what we'll do.

    Download MySQL Workbench and opt to create a new connection. In the window, fill in the data from the previous screenshot – the host name, user name and password. You can even download SSL keys from ClearDB (see screenshot below) and use them in the SSL tab of the connection in MySQL Workbench to make your connection more secure.

    SNAGHTML18c75f32

    After pushing Test Connection, Workbench should connect successfully. After pushing connect, it should display an empty database.

    image

    Wednesday, November 25, 2015 1:48 PM
  • yes, I have uploaded my website with CE and tested it. I can confirm that it works but probably because dreamspark account runs on 1 instance, no cluster. therefore it is no harm to use. Only disadvantage is no replication and important data might be lost unless doing a manual backup. 

    &quot;Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.&quot;

    Wednesday, November 25, 2015 4:15 PM
  • It certainly is possible to use SQL Server Compact on Windows Azure.

    However, I would suggest you check out the clearDB MySqL free offering which is included in DreamSpark.

    Microsoft dreamspark provides a 20mb mercury MySQL for every Azure subscription. This means you can create a subscription and create a free website, with a free MySQL Azure Database. (As long as it's less than 20 MB) You can also have multiple Web Sites associated with the same MySQL Azure Database for free. So, if you're considering SQL Server Compact on Windows Azure because your database will be very small and you don't want to pay for a 100 MB database, you can consider this option. In most cases, it will be a better solution. Your website will perform better, your database performance will be better and you have the ability to change your data and it will be replicated.

    Issues with SQL Server Compact on Windows Azure

    Data is not replicated
    If you change anything in the database, the changes stays local. This means that if you have multiple instances running your web application, then each web application will have their own database, and if you change something in one of them, the change won't be replicated to other instances, which will result in unpredictable behaviour in your application.

    You risk losing data
    If you change anything in the database after deployment, you risk losing data, because Windows Azure might decide to redeploy your instance to another virtual or physical machine. When this happens, the new instance will be setup with the deployment package you originally uploaded to Windows Azure, and this package does not contain any changes you make to the database. And this redeployment can happen at any time for several reasons.

    Conclusion
    So, SQL Compact on Azure? Sure, no problem if your data is read-only. However, note that you won't get the performance you would with SQL Azure.

    If you want to use SQL Server Compact with Windows Azure, you can use the "private deployment" method, as explained on "ErikEJ"'s blog

    Below is the solution for setting up SQL CE:

    Step by Step like this:

    1. Install two nuget: EntityFrame.SqlServerCompact & Microsoft SQL Server Compact Edition

    2. put your SQL database file(.sdf/.mdf) in APP_Data folder (Put the connection string like this in order to use it:

      <add name ="DefaultConnection" connectionString ="Data Source=|DataDirectory|CompactDB.sdf" providerName ="System.Data.SqlServerCe.4.0" />)
      
    3. Publish full project include above SQL database file to AzureWebsites.

    4. you can find it can work well and is totally free.

    Monday, December 14, 2015 9:13 PM