Reader small image

You're reading from  Administrating Microsoft Dynamics 365 Business Central Online

Product typeBook
Published inJul 2022
PublisherPackt
ISBN-139781803234809
Edition1st Edition
Right arrow
Author (1)
Andrey Baludin
Andrey Baludin
author image
Andrey Baludin

Andrey Baludin is a solution architect and is currently employed with Awara IT Solutions (Gold Microsoft Partner). His educational qualifications includes a masters degree from St.Petersburg Polytechnic University. Andrey is a Microsoft MVP and has been working with Microsoft Dynamics NAV since 2008 from 5.0 to the latest versions of Dynamics 365 Business Central. Andrey is a real fan of Business Central and Azure, and his specialization is integrating Business Central with everything
Read more about Andrey Baludin

Right arrow

Chapter 9: Cloud Migration Setup

Now you have learned what cloud migration is from the previous chapter, we can start to set it up. You do not need developer skills here, as everything performs with an assisted setup. Here, we will learn important things such as connection string construction and how to troubleshoot typical issues that could occur during the setup process. In addition, we will investigate how you can automate the setup process with cloud migration application programming interfaces (APIs).

In this chapter, we are going to cover the following main topics:

  • Prerequisite 1—SQL Server setup
  • Prerequisite 2—Connection string construction
  • Prerequisite 3—Delegated admin consent
  • Migration setup and the self-hosted integration runtime (SHIR)
  • Cloud migration APIs

By the end of this chapter, you will know how to set up cloud migration to move your data from an on-premises environment to the cloud. We'll start by setting...

Prerequisite 1 – SQL Server setup

Before a cloud migration setup can run, we must check our on-premise SQL Server settings. If you use Azure SQL Server, then skip this section.

Our check includes three points, as outlined here:

  1. SQL Server version

You must check that you have SQL Server 2016 or higher since older versions are not supported. You can upgrade your SQL Server version if needed.

To check your SQL Server version, use Command Prompt, as follows:

  • Type SQLCMD -S servername\instancename
  • Type select @@version
  • Type go

The process is illustrated in the following screenshot:

Figure 9.1 – SQL Server version check

  1. Database compatibility level

Run SQL Server Management Studio (SSMS), click on your database, and choose Properties. Then, choose Options and check the Compatibility level value. This must be SQL Server 2016 (130) or higher. Change it if needed and apply the changes.

The process...

Prerequisite 2 – Connection string construction

You will need a connection string when you run a cloud migration setup, so, we need to prepare this beforehand.

A connection string consists of four parameters, as outlined here:

  • Server name
  • Database name
  • Username
  • User password

The full view looks like this:

server={Server name\Instance name};Initial Catalog ={Database name};user id ={User name};password ={User password};

As an example, I have SQL Server CloudMigration with a BCDEMO instance. My Business Central database is named Demo Database BC (18-0). To migrate this database, I created an Integration user with the password integration123. Using these parameters, my connection string will look like this:

server=CloudMigration\BCDEMO;Initial Catalog ="Demo Database BC (18-0)";user id =integration;password =integration123;

If I have my database in Azure SQL, the connection string might look like this:

Server=tcp:CloudMigration...

Migration setup and the SHIR

In this section, we will learn how to start the migration setup and the steps it requires. I will divide the setup process into the following three steps:

  1. Running the cloud migration wizard
  2. Installing the SHIR
  3. Finalizing the cloud migration setup

Let's learn about each step in detail.

Running the cloud migration wizard

To run the cloud migration wizard, proceed as follows:

  1. Open your target environment Dynamics 365 Business Central software as a service (SaaS) and go to the Assisted Setup page. Choose the Set up Cloud Migration option from the Get ready for business section, as illustrated in the next screenshot:

Figure 9.7 – Assisted setup

Important Note

You need to perform this setup in the Business Central cloud environment, and not on-premises.

  1. As a first step, you must choose a product that you want to migrate data from. Click on the ellipsis () near...

Cloud migration APIs

If you need to run the setup for multiple customers, databases, or environments, you can use APIs to automate your work. They have been implemented since Business Central 2022 wave 1. In Chapter 7, you learned how to call APIs in different ways, so I just describe which APIs are available and which parameters they have. You can read additional details about cloud migration APIs in Microsoft Docs at https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/cloudmigrationapi/cloud-migration-api-overview.

In the next chapter, you will also find a PowerShell script that uses all these APIs.

Cloud migration setup API

As we need to perform several actions to complete the setup, this API also consists of three steps, as detailed next.

First step

Here, we input basic parameters—source migration product, connection string, SQL Server type, and the company where we want to run the setup, as follows:

  • Headers: Content...

Summary

You know how to set up cloud migration and everything related to it. You are now able to deploy the SHIR, construct a connection string, and test it. Finally, you know how to automate this work with cloud migration APIs.

In the next chapter, you will learn how to migrate your data after you have done the setup, and I will present you with a very useful script from the Microsoft team that will help you with the routine automation.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Administrating Microsoft Dynamics 365 Business Central Online
Published in: Jul 2022Publisher: PacktISBN-13: 9781803234809
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Andrey Baludin

Andrey Baludin is a solution architect and is currently employed with Awara IT Solutions (Gold Microsoft Partner). His educational qualifications includes a masters degree from St.Petersburg Polytechnic University. Andrey is a Microsoft MVP and has been working with Microsoft Dynamics NAV since 2008 from 5.0 to the latest versions of Dynamics 365 Business Central. Andrey is a real fan of Business Central and Azure, and his specialization is integrating Business Central with everything
Read more about Andrey Baludin