May 13 2014

Add an Instance to SQL Server Azure Virtual Machine

How do you add an instance to your local SQL Server installation? You run the executable that you probably downloaded from MSDN or maybe from a CD. Works the same on an Azure VM right? Sure… but wait. Do I have to go and download the software to my VM instance? Let’s assume that you’re running one of the VMs from the Gallery, then, the answer is “No.” Just navigate to C:\SQLServer_12.0_Full. There you’ll find the full installation setup for SQL Server. And you’re off and running… Until you realize that you don’t have the Product Key for this thing. What happens when you get to this screen:


You can look around all you want and you won’t see a product key anywhere. At least no where that I could find. So what do you do? Same question was asked and answered over on this forum at SQL Server Central. The trick is to get the product key from SQL Server. I tried several different methods, the ones you’ll find if you search for how to get the product key from an existing copy of SQL Server. But finally, as was posted on the forum, a method that worked was found. I tested it out and I was able to add an instance to a VM from the Gallery.

Which brings up the next question. Did I just violate some type of licensing with Microsoft? Lordy I hope not. But I did some research. This definition of the support policy at Microsoft says that anything that is not explicitly denied in that documentation, that is normally supported is still supported. There’s nothing in there about multiple instances. There’s nothing in the basic Azure Licensing FAQ. There’s nothing against this in the Pricing details either. And since the standard iron version of SQL Server allows you to have as many instances running on a given server that you want, from what I can tell, this still applies here.

Personally, I don’t think I’d want to run multiple instances on a single Azure VM. I wouldn’t really want to run multiple instances on a VM or, in some cases, even on iron. Multiple instances frequently have difficulty playing nice. I can’t see that getting any better inside Azure. However, there’s nothing to keep you from doing it except tracking down that Product Key. Get that, and you’re golden.

Sep 10 2013

New Windows Azure Virtual Labs

Getting started with new technologies can be a pain. That makes all the new labs that Microsoft just posted extremely useful. There are several that are going to be immediately applicable to your average data pro; Introduction to SQL Database, Connecting a PaaS Application to an IaaS Application with a Virtual Network, Web Sites and Virtual Machines using ASP.NET and SQL Server. The beauty of these things is that you don’t need to do anything to get started. These are virtual machines hosted out on the cloud that you get access to. Further, you’ll get a lesson plan to follow so you’re not left floundering. You will have to either connect your MSDN account to set up an Azure account or, if you don’t have MSDN, sign up for an Azure account. But, get that done and you have things to learn from.

Sep 04 2013

Azure Capabilities Expand

But then, the capabilities in Azure are always expanding. Here’s the new stuff that was just released in a blog post on Scott Guthrie’s blog. I’m interested in seeing how that automatic scaling on VMs works with SQL Server (if it works with SQL Server). Good times.

And yeah, the cache is really the big news, but I’m still a relational storage monster. Can’t help it.

Remember, if you want to learn Azure, you can link your MSDN subscription with an Azure account. Go here for the details.

Aug 19 2013

Azure Changes, While I’m Working

SignInMy laptop is out for repair. I’m working currently on a Surface Pro instead. It’s spurred me to do something I’ve been meaning to do anyway. I’ve started setting up a full demo & testing VM on Azure. I already had the VM up and running (it takes 5 minutes for crying out loud), but I hadn’t bothered setting up Red Gate software on it and getting it fully prepped to support my work, demos, or whatever else I might need. But, I finally did. It’s working out surprisingly well. I just have to remember to shut the silly thing down when I’m done with it or it does start to bite into my MSDN credit. Anyway…

I was working on the VM for a big chunk of the day yesterday. I decided to shut down, so I opened the Management Portal tab on my browser when I saw a message I had never seen before. I didn’t think ahead far enough to get a screen capture, but paraphrasing and probably misquoting, it went something like this:

The Management Portal has been updated. To use the new Management Portal you must refresh your browser

COOL! I thought and clicked the button (then thought of my faithful blog readers, all six of you, Hi Mom!). But too late. I got a new portal that looked… Just like the old one. Luckily for me, Scott Guthrie posted the updates to his blog (subscribe if you haven’t).

Exciting stuff (assuming you read Scott’s blog), especially if you’re looking at Azure VMs as a mechanism for setting up Availability Groups with your on-premises machines. And if you’re not a giant shop that can afford to pay for multiple co-lo hosting systems, why would you not be? But, the really cool bit for me is that I think that’s the first time, that I know of, when I was online, connected, working, and they released an update. It demo’ed for me, in a really small way, how the release of these updates is a rolling thing. Meaning, if I were to immediately go and create a new VM, the functionality described by Scott would be available. But, while I was working, my VM was online, therefore not updated yet. One of two things will happen here. If I had left my server online, when I went back to it, it might be offline, or, have had a reboot event while I was gone because they updated it. Or, while it was offline it would get updated and when I bring it back online, it may need to get rebooted after the updates are applied (a lot like a local machine). Here, I thought ahead. I left the machine off until this morning so I could see if the update was put in place.

The new login screen is WAY too cheery for 6:30AM. Microsoft. Please fix that.

And nothing. No new updates. No indications that any have been applied. Hmmm… Maybe the machine where my server is hosted hasn’t been updated yet. I’ll have to keep an eye on it.

That’s the good news. The bad news is, I need to rebuild my demos and some of my slide deck (again) in preparation for the PASS Summit. Setting up Availability Groups between a local system and an Azure VM is one of the things we’ll be covering in the full day pre-conference seminar. If you’re interested and want to learn about this and a whole lot more about Azure Infrastructure and Platform services as they relate specifically to relational data storage, go here to register.

Let’s just hope there are no more changes to SQL Server in VMs or Windows Azure SQL Database between now and the Summit. Ha! Who am I kidding? They’re updating this platform all the time.

Jul 01 2013

Getting Started With SQL Server 2014 the Easy Way

You know you want to at least take a look at the new Client Technology Preview (CTP) of SQL Server 2014. I don’t blame you either. I want to spend hours swimming through it too. But, you’re thinking to yourself, “Heck, I’d have to download the silly thing, provision a new VM, walk through the install… Nah. Too much work.” I don’t blame you. I found myself on the road the day the software was released, so I was going to attempt to do all that work on a hotel wireless system. In short, I was going to have to wait, no options. Or were there? Actually, there is a much easier option. Azure Virtual Machines.

And no, it’s not that I can simply get a Windows Azure VM ready to go faster than I can a local one (and, depending on just how I set up and maintain my local servers, that might be true). No, it’s that I can immediately get a copy of SQL Server 2014, no download required. It’s that I can, within about five (5) minutes have a server up and running with SQL Server 2014 installed and ready to go. How? Microsoft maintains a gallery of images for quick setups of Azure Virtual Machines. A couple of those images include SQL Server 2014.


To get started on this, and not pay a penny, you need to make sure that you pass the MSDN permissions listed at that link. I know that some people won’t, and I’m sorry. However, get your MSDN subscription set up and link it to an Azure account, then you’re ready to go. Throughout this post, I’ll refer to paying for Azure, if you’re running through MSDN, just insert, “using up my credits” for “paying” and it should all make sense.

First, click on the Virtual Machines icon.

VMNewThis will show a list of VMs on your account, if any. We’re going to add one, so we’ll click on the little plus sign in the lower left corner of your screen.

Clicking on the New button gives you options. Reading the screen you can tell that you have a list of different services that you can add; Compute, Data Services, App Services, Networks and Store. By default, if you’ve opened this listing from the VM list, you’re going to already have Compute selected. That provides a second list of options; Web Site, Virtual Machine, Mobile Service and Cloud Service. Again, if you’ve opened these options from the VM list you’re going to have the Virtual Machine selected. If not, make sure that is what gets selected. The final two options you have are Quick Create and From Gallery. For our purposes we’re going to use the Gallery, but let me first tell you what the difference here is. Your licenses for SQL Server, Windows Server, and most Microsoft products (so far as I know) are transferable between Azure and your on-premises machines. This means you can create an empty virtual machine on Azure and then load your software on to it. You don’t pay additional licensing fees. But, you can also use the images on the Gallery. Here you can set up a VM for whatever is listed and you get those machines and their software for additional cost, but no additional license required. In short, you can pay a little bit more to get access to SQL Server or what have you without having to buy an additional license. It’s a great deal.


Worry about paying for it all later. We’re going to click on the From Gallery selection. This opens up a new window showing all the different possibilities you have for your VMs. You can install anything from Ubuntu to Sharepoint to several different flavors of SQL Server. You can even add your own HyperV images to this listing (although that does mean paying for licensing on any created VMs). Scroll down until you see SQL Server 2014 CTP1. On my listing currently, there are two copies. One that runs on Wndows Server 2012 and one that runs on Windows Server 2012 R2. If you want a Start button on your screen, pick the second one. You’ll then be walked through the wizard to get this thing created. Click on the right arrow at the bottom of the screen after selecting a VM.


Now you need to supply a machine name. It needs to unique within your account. You’ll also have to pick the size of machine you want. This, and the size of the data you store, is what you pay for. You’ll need to decide how you want to test 2014, small or large. For my simple purposes, exploring 2014, I’m going with Medium. That currently means 2 cores and 3.5gb of memory. You can go all the way up to 8 cores and 56gb of memory, but you will be paying for that, just so we’re clear. You also have to create a user and password for the system. Strict password rules are enforced, so you’ll need a special character and a number in addition to your string.


You need to configure how this machine will behave on the network. You need to supply it with a DNS name, your storage account, and your region. I would strongly recommend making sure that your servers and your storage are all configured for exactly the same region. Otherwise, you pay extra for that extra processing power. Also, you may see somewhat slower performance.


Finally you have to, if you want to, add this server to an Availability Group. For our test purposes we’ll just leave that set to None. But, you can make this a part of an AG in Azure or with a mixed hybrid approach as an async secondary with your on-premises servers. Oh yes, the capabilities are pretty slick. I would suggest also leaving PowerShell remoting enabled so that you can take advantage of all that will offer to you in terms of managing your VMs and the processes running within them.


VMCreatingClick on the check mark and you’re done. You’ll go back to the VM window and at the bottom of the screen you’ll see a little green icon indicating activity. It will take about five minutes for your VM to complete. While it’s running, you can, if you choose, watch the process, but it’s a bit like watching paint dry. You’ll see the steps it takes to create your machine and provision it with the OS and SQL Server version you chose.

Once it’s completed, you’ll have a VM with a single disk, ready to go. But, you need to connect to it. Remember that user name and password? We’re going to use that to create a Remote Desktop connection to the server. When the process is completed, the server will be in a Running state. Click on that server in the Management Portal and click on the Dashboard selection at the top of the screen. This will show you some performance metrics about the machine and, at the bottom, give you some control over what is happening. The main thing we’re looking for is the Connect button.

VMConnectClick on that button. You will download an RDP file from the Azure server. Open that file (and yes, your system may give you security warnings, click past them) and you’ll arrive at a login screen, configured for your Azure account. That’s not what you want. Instead, you’re going to click on “Use another account.” Then, in that window type in your machine name and user name along with the password. Once you click OK, you’ll be in an RDP session on your SQL Server 2014 CTP1 VM. Have fun!


Remember, you can stop the VM when you’re not using and you stop paying for it (or, using up your MSDN credits). Just go to the dashboard and use the “Shut Down” option at the bottom of your screen.

If you found this useful and you’d like to learn a lot more about the capabilities of using Azure within your environment, I’d like to recommend you sign up for my all day pre-conference seminar at PASS 2013 in Charlotte. I’ll cover this sort of thing and one heck of a lot more about the future of being a DBA working in the hybrid environment of Azure and on-premises servers.