Move a VM with Azure Resource Mover

I use Azure VMs quite often for trying things out, especially when tech reviewing articles for my day job as editor of Simple Talk. Frequently, a special purpose VM will live for just a couple of days or even a few hours because they are easy enough to throw away when I’m done. I appreciate the ability to create a VM in a Resource Groups (RG) so that all the resources associated with the VM like storage and the IP address can be destroyed with one command.

It’s also easy to move a VM to another RG or switch a RG including the VM to another subscription.

Another task I may want to perform is to move a VM to another region. I found this set of steps that involves using Azure Recovery Services Vault that seems a bit complex. Fortunately, I recently heard about a new, much easier way to move VMs and other resources called Azure Resource Mover (in preview). It was announced today.

To try this out, I created a new VM called vmtestmove in the Central US Region.  I then searched for Azure Resource Mover.

The first step was to specify from the regions for the move.

In the next step, I specified that I wanted to move my VM.

The next screen explained the process.

It took a couple of minutes to add the resource. Note that the VM must be running to do the move. Once it was done, I clicked the notification and landed on the Across Regions screen. The next step is to validate dependencies. Obviously, I’m missing several resources that the VM needs.

Some dependencies were found, so I clicked Add Dependencies.

It found a network interface and the Resource Group. I selected all and clicked Add dependencies.

I then realized it would have been easier if I had just selected all the resources in the RG instead of choosing only the VM. Eventually, I refreshed the screen and saw that all the resources were in place. Notice that a new RG will be created in the target region.

At this point, I clicked the Destination Configuration of the VM and made some changes. I gave the VM a new name and upgraded to a bigger VM.

The new RG must be prepared, initiated, and moved before the other resources. I just performed the steps as I was prompted in the status and refreshed after each one.

Once I refreshed and saw that the RG was in Delete source pending status, I was ready to move the VM.  I selected everything else and clicked Prepare.

It takes a few minutes for each step, and I had to click Refresh after each one and make sure that the status changed for each item. I was notified that the step completed before it was completed for the VM. Once all the steps were complete, I saw the ‘Delete source’ pending status on each item.

At this point, I could see that the new VM was running in the East US region.

Now, I had to decide if I wanted to keep both VMs or to delete the one running in the Central region. I decided to delete it, and just manually deleted the RG to remove it and the other resources the way I would normally delete a VM. There are a couple of other items created to facilitate the move that must be deleted. Be sure to check the documentation for more information.

You also must remove the resources from the Azure Resource Mover page. This is especially important if you want to move any additional VMs or other objects in the future. Just select all the resources and click Remove.

I also decided to try moving an Azure SQL Database using this new service. Check the documentation if you need more information. The main thing that I found is that you must have a SQL server resource in place in the target region before proceeding. Otherwise, it was as straightforward as moving the VM.

The process for moving the VM to another region was simple, and I was glad that it found all the required resources for me. This functionality will be quite useful for many organizations who rely on Azure VMs for their production and downstream environments.


Posted in Cloud computing | 1 Comment

Build Your Brand Presentation

Tonight I gave my “Build Your Brand with Technical Writing” presentation (slides) to the Triangle SQL Server User Group (Raleigh, NC). I love giving this talk because I typically get one or two people who really want to get started writing ask me for help because of the talk.

Writing has been a passion of mine since I first learned to read around age 6. Back then, I dreamed I would be a writer and a teacher when I grew up. I guess I can tell that 6 year-old that her dreams came true.

I didn’t really think about the impact that writing, especially technical writing, has on others. People all over the world have learned T-SQL from me! When I write, I imaging a beginner sitting next to me as I explain the topics.

Here are some tips I gave the audience tonight:

1. Write about something you would like to learn more about.

2. After writing your post or article, set it aside for a day or so and then look at it with fresh eyes. Also, reading it out loud will help bring out any issues.

3. Network, network, network. Get to know people in the community. You never know when someone is looking for a co-author.

4. If you are a presenter, turn your presentation into an article.

5. Put writing on your calendar.

6. Just start writing even if it’s not clear what you plan to write about.

7. Use a tool like Grammarly to help with grammar, spelling and more.

Being an editor is now my third major career step, and I’m enjoying every minute!

Posted in Life in IT | 1 Comment

Azure Data Studio Notebooks and SQL Prompt

One of the coolest and most useful features of Azure Data Studio (ADS) is Notebooks. If you haven’t seen them, notebooks allow you to combine text with markdown and runnable code in the same document, and they are shareable. Notebooks might be used for teaching, documentation, or runbooks among other uses.

I recently heard about a public preview for Redgate’s SQL Prompt for ADS, and I wondered if the features would work only in a query window or if the features would also work in a notebook. After testing, I found that yes, SQL Prompt features do work in notebooks. It doesn’t matter if you are working in a query window or a notebook, you can take advantage of SQL Prompt!

To try it out, I installed the most recent ADS version and the public preview for SQL Prompt for ADS. The first feature I tested was formatting.


There is some built-in formatting in ADS, but there is just one style. SQL Prompt has several built-in styles, plus it imports styles from SSMS if you have it installed and allows you to create your own custom styles.

You must tell ADS that you want to use SQL Prompt for formatting either for the current operation or as a default. To set it up as the default, right-click in a notebook code cell or in the query window. Then select Format Document With as shown in Figure 1.



Figure 1: Choose a formatter

A dialog will pop up. Click Configure Default Formatter as shown in Figure 2.

Figure 2: Configure the default

Then click Redgate SQL Prompt as shown in Figure 3.


Figure 3: Select SQL Prompt

From there on, SQL Prompt will be the default formatting tool for both the notebooks and query window.

One advantage of SQL Prompt is that you have several formats from which to choose. There are five built-in formatting styles and any created in SSMS will automatically import. To see the styles, first bring up the command pallet by typing CTRL+SHIFT+P. You can search for everything related to Prompt as shown in Figure 4. Select SQL Prompt: Change Active Formatting Style.


Figure 4: Find Change Active Formatting Style

Here you’ll see a list of built-in styles plus any of your custom styles shown in Figure 5. You can select any of them to be your default style going forward.


Figure 5: Select a formatting style

Notice in Figure 4 that you can also delete, create, or edit formatting styles. Now, formatting the way you like it is just a right-click away in both notebooks and the query window.

Another feature available in this preview is the well-loved snippets. Learn about that next!


Snippets save SQL Prompt users tons of time. They are as simple as typing in three or four characters to get anything from a SELECT statement to a function definition. Just like formatting, this feature can be seen in the notebooks. Figure 6 shows the famous SSF (select star from) snippet.


Figure 6: Select star from

Snippets are great for things that you type often, like the team’s official comment section for procs. To see the available snippets, go to the command pallet and search for Preferences: Configure User Snippets as shown in Figure 7.


Figure 7: Configure user snippets

You’ll be able to see your custom snippet list and create your own.


SQL Prompt is a popular tool that has worked in SSMS and Visual Studio to save you time writing T-SQL code. Now, there is a preview of SQL Prompt that runs in Azure Data Studio, and you get these features in both query windows and notebook

Posted in Uncategorized | Leave a comment