Azure SQL Database or SQL Server in a Virtual Machine? - sql-server

I'm exploring whether to use Azure SQL Database or SQL Server in Virtual Machine. What are the pros and cons each of them?
Thank You.

Well...SQL Azure is PaaS, and Sql Server in VM is IaaS. Just to highlight some differences.
Control & Features - You got a greater control and features in IaaS where else in PaaS you got to stick with the features they have.
Redundancy & Backup - By default, SQL Azure comes with 3 copies of redundancy and you can enable geo-replication to nearest datacenter too. Backup is automatically done for 7 days and onwards depending on the pricing tier.
Cost & Ownership - Basic DB in SQL Azure cost you USD5, however in VM, you can host as many db possible albeit more expensive to rent a single VM.
Check this link out to find out more details

Related

Difference between Azure SQL Server VM and regular Azure VM

When we create azure SQL on VM resource it seems that we are getting VM with full control and this resource is displayed both under VM and SQL services, but there has to be some difference between these two.
VM on SQL is intended for running of SQL server, but technically if we are getting VM then we should be able to install whatever we want on that VM? If this is the case, then we could turn this VM to be multi functional and make it to be the same as provisioning regular VM and installing SQL server manually.
If this is not the case and we are not getting full control, then it seems that this shouldn't be categorized as IaaS and shouldn't be marketed that way.
One obvious difference is in deployment models, with SQL on VM we are getting pre-installed SQL server with additional features like automated backups, etc.
Probably there is some difference in pricing models, but other then this I couldn't find any mentions about these two services.
SQL Server on Azure Virtual Machines provides full versions of SQL Server and simplify licensing costs when you pay as you go.
You are correct, SQL Server on Azure Virtual Machines provides additional benefits like Automated updates, Automated backups.
https://learn.microsoft.com/en-us/azure/azure-sql/virtual-machines/windows/sql-server-on-azure-vm-iaas-what-is-overview
When using SQL Server on Azure Virtual Machines you pay the per-minute licensing rate of SQL Server. The SQL Server license fee is included in the virtual machine image price.
https://azure.microsoft.com/en-us/resources/knowledge-center/how-do-i-license-sql-server-in-azure-virtual/
Microsoft Azure sends invoice with SQL License fee each month.

Which one is Azure SQL Server for production?

As the graph shows above. Which type of sql server edition is for the production? I know the "Developer" version is for the development. Also I already got the Azure VM and have the "Developer SQL Server" on my VM, how can I install the production SQL Server in my VM? Is this free?
My purpose is to make a production SQL Server database. Is there two options for me? One is install a production SQL Server in my VM, another is to create a new Azure SQL database. Which one would be the best way to do this?
As the graph shows above. Which type of sql server edition is for the
Production? I know the "Developer" version is for the development.
Also I already got the Azure VM and have the "Developer SQl server" on
my VM, how can I install the production sql server on my VM? Is this
free?
Developer is not licenced for production - you aren't allowed to use it for production purposes.
Express is licenced for production but if your database gets bigger that 10Gb then it is unsuitable for your use
My purpose is to make a production sql server database. Is there two
options for me? One is install a production sql server on my VM,
another is to create a new Azure SQL database. Which one would be the
best way to do this?
"Best" doesn't mean anything. What are your constraints? Are you creating a brand new database? What tools will be connecting to and using the database? Does it need to be accessible from the internet?
If this is a brand new application / database, and you have limited capability for maintaining a VM then I definitely recommend using SQL Azure instead of a VM
Most importantly, and based on you other question, make sure you understand the term "Production"
Can Azure SQL Server on VM be the production database?
For example, you usually don't provision a 'production' environment without also provisioning at least a dev environment.
It would also help to give us some background on "My purpose is to make a production sql server database". It sounds like this is a request someone has given you but maybe you don't fully understand the term 'production'
None of them are sql azure. They are all sql server on premise on a virtual machine on azure.
If you want to add a sql server azure, you go on your main azure portal page, then on the left panel at the top "create a resource", then chose "SQL Database" on the popular column. Then follow instructions.
If you want as less pain as possible, clearly choose sql azure instead of a sql server on premise on a virtual server on azure. It is by very far the only reasonable choice if you work on azure: cheap, strong, backup automatically done, disaster recovery extremely easily applicable without any prior setup, extremely easy to up size its capacity in case of overload, perfectly secured without any prior setup either.
The only problem of this is the security: it can be accessed only by recognized IP addresses that you mention on the azure portal. So typically, you mention the IP address of you development computer. If your website is on your azure subscription as well, you don't need to worry, it will go through the azure firewall with no setup.
If you reeeeeeally want to use a sql server on premise, well, don't use the developer edition. If you want to avoid performance and load issues, don't use express. The entreprise is very complete, but not useful in most of cases for simple application (like web applications).
If you want most of features, go for the Standard edition, if you want to keep focused on the database engine for your web application, go for the Web edition.
Finaly, if you wanna have a licence free edition on a virtual server, the express is free of charges, but not powerful and extremely limited. The developer edition is free of charges as well and contains every possible and impossible features of sql server. The only pb of this edition is that you are not allowed to use it in production. Only for tests and developments.
As you are already having Azure VM with Developer edition installed you can go for either of the below options.
If you are comfortable to manage the Azure VM yourself, go for IAAS(Infrastructure as a Service) approach: Install SQL Server Standard Edition or SQL Server Enterprise Edition (based on your application needs). Read the capability difference between them. If SQL Server Express edition would be suitable for your needs, then install the same. It does have limited features and many constraints. See the scalability support for different editions in the same link above.
If you want to offload the database server management, go for PAAS(Platform as a Service) approach: Create a Azure SQL database and point your application to it. Azure SQL database is more like SQL Server Enterprise Edition with some limitations like CLR not being supported. Read Azure SQL database differences with SQL Server editions

Is it possible to create an SQL Server Azure VM but use your own license?

I have a program that is a .net console app that is intended to track information at a few websites daily and then put this data into an SQL database.
Previously I've had this program running on a scheduler on my computer but I'm about to take off on a 3 month vacation so I'm planning on deploying it on azure to run it while I'm away.
Last night I set up a SQL server VM. I got it all set up then I tracked the pricing and realized that using the SQL Server image increased the price by about 30$ per month compared to the Windows image (http://www.windowsazure.com/en-us/pricing/calculator/?scenario=virtual-machines)
I have an SQL Server license. So I was thinking of just setting up a Windows VM and then installing SQL server on it. THe only problem is that I'm going to have to copy the MSI over and install it etc. - it would take ages.
Is it possible to just create an SQL Server VM in azure and then enter my own license in there to avoid paying the extra 30$ per month?
By the way, is there a more economical way to get Azure to do this then using a VM? Really, it just needs to run daily and performance doesn't matter.
To answer your question directly: you can only utilise your own SQL Server license on an Azure VM if your organisation's agreement with Microsoft includes License Mobility (http://www.windowsazure.com/en-us/pricing/license-mobility/). If your are unsure or believe this is not the case then you cannot deploy your own license. This is exactly the same on Amazon Web Services (AWS).
SQL Databases for Azure Mobile Services that are under 20MB are free - that may be an option depending on your needs. (see point 5 on this page: http://www.windowsazure.com/en-us/pricing/details/mobile-services/).
You can try converting the .NET console application to Worker Role (PAAS) and use Web Edition of SQL Database (PAAS), and recalculate your TCO.
You can start with the SQL Server Trial image, then apply your own license on it (as on any trial installation).
You could also have a free Azure Web Site, with your code triggered as a "web job". For DB, there is a 20MB free tier for Azure SQL Database.
Why don't you just create a SQL Azure DB. They are only $4.95/mo for DB's under 100MB http://www.windowsazure.com/en-us/pricing/details/sql-database/
Saves the entire headache of running your own SQL Server.
Update: SQL Azure now has different pricing
As suggested in the comments, use Azure WebJobs and if possible a free SQL DB if you only have very limited data to track operation.
Under 20Mb free
~$5/mo for up to 2GB
More Details: http://azure.microsoft.com/en-us/pricing/details/sql-database/

Windows Azure and SQL Server on VM (which choose to compare)

I'd like to compare Windows Azure SQL Database and SQL Server on VM. So I'd like to ask:
which SQL server edition on Windows Azure(S,M edition; Web or Standard) should I choose to compare it with Windows Azure SQL Database Web. I know that these are different concepts PaaS IaaS and so on. In my question I am referring to your experience with these two technologies and their performance. I know that it would be roughly comparison
I made comparison for Azure SQL and SQL Server Std hosted on Azure VM (Large (A3)) for 2GB database. I just copied DB from Azure to VM, so, basically, I had 2 Databases with identical data and was able to run same queries.
SQL Azure DB has known advantages, but when it goes to performance people starts crying:
Getting last 1000 transactions from ~100k transactions with many joins takes:
Azure SQL: 7:40 mins
SQLServer on VM: 2:30 mins
Getting 10 transactions with specific parameter's:
Azure SQL: 3:57 mins
SQLServer on VM: 1:05 mins
In this test I didn't care about query performance, I just want to see the difference for the same data/queries between Azure SQL and SQL Server on Azure VM. As you see, it's very differ.
Roughly, Windows Azure SQL Database is comparable to the features of SQL Server 2012 Standard Edition, but this comparison is only approximate, because each offer is meant for a different use case and offers a different balance of features.
In Understanding Azure SQL Database and SQL Server in Azure VMs you'll find a detailed comparison. Some distinctive characteristics are:
SQL Database is highly available; each database is backed by 3 servers; each operation will only be completed when it is accepted by at least 2 servers. This leads to a higher latency than SQL Server on a single server.
SQL Database runs on cloud infrastructure. Client applications must be fault-tolerant.
SQL Database runs on shared resources, so clients may experience performance fluctuations. The Premium Offer for Windows Azure SQL Database delivers more powerful and predictable performance.
SQL Database has a few limitations on support for features, Transact-SQL, Data Types and Tools and Utilities.
See also how to Compare SQL Server with Windows Azure SQL Database and the guidance on SQL Server in Windows Azure Virtual Machines.
Regarding Windows Azure SQL Database Web edition: Web and Business editions are identical except for storage capacity (see my detailed SO answer about this, here), so it doesn't matter for your comparison.
Regarding SQL Server editions, I think this is going to be primarily a difference in features and licensing, not performance. That said: If you choose the Enterprise edition, you may find more features are active, therefore consuming more resources. Fortunately the Web, Standard, and Enterprise editions are all in the Virtual Machine gallery, so you can deploy any of them without having to do a custom install.
When comparing Windows Azure SQL Database with SQL Server, you should probably start with this MSDN article which goes into detail about the limitations of SQL Database as well as T-SQL differences.

Getting started with Microsoft Azure development

I just started developing in Azure and I bump in to a lot of questions that might help others as well.
My goal is to learn more about:
azure
html5
jquery
ASP.NET MVC4
entityframework
My first steps:
subscribing to Azure. (5 minutes)
create a website, and added a database to my azure account. (5 minutes)
create a TFS environment (5 minutes)
download the publish settings file that can be used in visual studio to publish directly into azure (1 minute)
installed visual studio 2012 (2 hours) (required)
installed azure SDK for .NET (30 minutes) (required)
installed resharper (30 minutes) (optional)
installed SQL server 2012 (still downloading, 1 hour and counting) (needed?)
I started in parallel and began with this great tutorial for getting hands-on experience with website, html5, azure.
Since I deviated from the tutorial by adding my entity classes in a different project I ran into errors running enable-migrations. Here you can read the answer to that problem.
Now the "toughest" part for me until now: tha world of databases.
I am no expert on database development so I was wondering how deep do I need to dive. The goal remains the same: I want to build a webapp where I store and retrieve data from a database. So far the azure experience is quite easy going and everything integrates pretty easily.
I kinda liked the idea that I only need visual studio to work from, and that I can get addins that help me develop the things that I need.
Does that end when you get to database development?
Is SQL server 2012 the way to go?
Or are there "more easy" alternatives?
Is it a lot of work to update the database in the cloud with the stuff that I changed locally?
I do want to store stuff in the database in azure in the end.
Can you folks shed some light on the possibilities there are out there with its cons and pros?
When you work with windows azure environment in emulated environment (local development) You can use desk top version of SQL server 2012.But at the end you have to store your data schema on Azure SQL Database when you publish your cloud Application for production.
What is Windows Azure SQL Database ?
Microsoft Windows Azure SQL Database is a cloud-based relational
database service that is built on SQL Server technologies and runs in
Microsoft data centers on hardware that is owned, hosted, and
maintained by Microsoft.
Similarities and Differences
Similar to an instance of SQL Server on your premises, Windows Azure SQL Database exposes a tabular data stream (TDS) interface for Transact-SQL-based database access.
This allows your database applications to use Windows Azure SQL Database in the same way that they use SQL Server.
Because Windows Azure SQL Database is a service, administration in Windows Azure SQL Database is slightly different.
Unlike administration for an on-premise instance of SQL Server, Windows Azure SQL Database abstracts the logical administration from the physical administration; you continue to administer databases, logins, users, and roles, but Microsoft administers the physical hardware such as hard drives, servers, and storage.
This approach helps Windows Azure SQL Database provide a large-scale multi-tenant database service that offers enterprise-class availability, scalability, security, and self-healing.
Because Microsoft handles all of the physical administration, there are some differences between Windows Azure SQL Database and an on-premise instance of SQL Server in terms of administration, provisioning, Transact-SQL support, programming model, and features.
Features and Types
Windows Azure SQL Database does not support all of the features and data types found in SQL Server.
Analysis Services, Replication, and Service Broker are not currently provided as services on the Windows Azure platform.
Because Windows Azure SQL Database performs the physical administration, any statements and options that attempt to directly manipulate physical resources will be blocked, such as Resource Governor, file group references, and some physical server DDL statements.
It is also not possible to set server options and SQL trace flags or use the SQL Server Profiler or the Database Tuning Advisor utilities.
Windows Azure SQL Database supports many SQL Server 2008 data types; it does not support data types that have been deprecated from SQL Server 2008.
For more details you can follow below mentioned links.
Windows Azure SQL Database Overview
Tools and Utilities Support (Windows Azure SQL Database)
Guidelines and Limitations (Windows Azure SQL Database)
Deploying an ASP.NET Web Application to a Windows Azure Cloud Service and SQL Database
I hope this will help to you.

Resources