Running a dedicated SQL Server VM in windows Azure - sql-server

I've read that you can pay a per hour fee to license SQL Server on a Windows Azure VM, if you want to run a dedicated instance (as opposed to using Azure SQL). However, when I go to create a VM running SQL Server, only the evaluation edition is available in the image gallery. I don't see any options in the VM creation process to add the additional per hour license for SQL Server. Where does this come in to play?

This is a result of Virtual Machines on Windows Azure being still in preview.
As far as I know - whilst in preview only the evaluation copy of SQL is formally available and at no extra charge. I suspect this will change when IaaS goes GA.
You can read about it here

Related

Running SQL Server 2012 in Container in Azure

At work we load data into a SQL Server 2012 database, and create .bak files that are exported. Yes that is correct, due to compatibility issues, we need to use SQL Server 2012.
This process, which is probably running for 3-4 hours per day, is currently running on an on-premise machine, but we want to move it to Azure.
However, SQL databases in Azure are v2017+, but I have read that it's possible to run SQL Sever 2012 in a Docker container. Before I invest a lot of time into this idea, has any one tried to host an old SQL Server version in a Docker container in Azure?
As said, use a VM. Microsoft maintain VM images all the way back to 2008 plus you can integrate backup and automatic updates to the OS and SQL. Images are listed here and you can pay as you go or bring your own license:
https://learn.microsoft.com/en-us/azure/azure-sql/virtual-machines/windows/sql-server-on-azure-vm-iaas-what-is-overview
In the pay as you go model you can shutdown the VM (i.e. the VM itself not just the OS) and you won’t get charged for the VM or the SQL license. You will still get charged for storage. See here:
https://learn.microsoft.com/en-us/azure/azure-sql/virtual-machines/windows/pricing-guidance#pay-per-usage

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.

Is it possible to test SQL AlwaysOn Availability Groups on a single developer workstation?

I have implemented executing sqlcmd.exe to run a script (provided by hosting & ops DBAs) that copies a newly created database in the C# app that creates the database to a second server in an AlwaysOn Availability Group. Unfortunately we have no AlwaysOn Availability support in our development or integration environments so I have only been able to test executing sqlcmd to run the script and handling the script failure. Is it at all possible for me to simulate the AlwaysOn Availability Group environment on my developer workstation if a create a second SQL Server instance. I am running SQL 2014 Developer Edition at the moment but should it be required, will be able to upgrade to SQL 2016 Developer Edition.
If this is not possible we will be forced to deploy without full end to end testing and have the first end to end tests happen in the production environment.
I have fairly good developer level SQL skills; in other words I'm very comfortable with stored procedures and such but have very little knowledge of the new and advanced features for actually administering SQL servers.
You can but you will either have to create VM (Virtual Machines) using VMWare software or VMs using Microsoft (MS) technology. There are other VM products but these two are used for the majority of virtualizations of the SQL Server/Microsoft stack. If you use MS technology you can download the software for usually up to 90 days (free) without activating the software. I would do it on an SSD so it finishes in a timely basis and you probably need 12-16GB of memory on the host, developer, machine.
There are detailed online instructions on creating VMs for SQL Server on clusters. The best ones have screen shots.

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/

Automate SQL Server 2008 backup and restore on shared hosting with limited permissions

I have a windows virtual private server (VPS) Windows Server 2012, with SQL Server 2008, on which I have complete access to the Production database for my web application. This allows me to use SQLBackupAndFTP to backup the database and place it on my mirror hosting, which is a shared hosting with limited privileges (no restore privilege).
I want to automatically restore the mirror server database every night to the copy of the production database.
The mirror server is used as a fall back in case the production server was to ever go, we would could at a minimum restore to last nights production environment.
How can I achieve this given I have limited permissions?
I have no access to the shared hosting via RDP, or SSH etc.
In case you don’t have full access to SQL Server and the machine that is running it you can’t really initiate a restore command (maybe there are some workarounds but I’m not familiar with any).
What you can do if SQL Server is on a public IP address is setup some kind of replication between two servers so they synchronize automatically. Again, not sure if this is possible w/o full access to machine but you can give it a try.
Final solution would be to use one of the third party comparison and synchronization tools to synchronize databases at a given time. Just find a tool that has command line interface such as Data Diff from Apex. Another one you can use is Data Compare from Red Gate but I’m sure there must be others too.
Note that these tools are not free …

Resources