Migrate SQL Server databases at scale to Azure using PowerShell / CLI

This article is contributed. See the original author and article here.

The Azure SQL Migration extension for Azure Data Studio provides a seamless and robust migration experience to help you migrate your SQL Server databases to Azure. However, if you have multiple databases across multiple SQL Server instances, migrating them together at scale using graphical UI may not be the most efficient method. Today, we are announcing Public Preview of new migration capabilities added to Az.DataMigration module in Azure PowerShell and az datamigration extension in Azure CLI. With these migration capabilities added to Azure PowerShell and Azure CLI, you can automate tasks and activities related to SQL Server database assessments, performance data collection for Azure recommendations and migration of multiple databases (across multiple SQL Server instances) at scale.


By automating migration activities, you can save time and efficiently migrate a large number of SQL Server databases to Azure SQL Managed Instance or SQL Server on Azure Virtual Machines. For example, the code snippet below demonstrates a SQL Server database migration to Azure SQL Managed Instance using Azure CLI with three commands.


Step 1: Create a new Azure Database Migration service in your Azure subscription.



az datamigration sql-service create --resource-group "myRG" --sql-migration-service-name "myMigrationService" --location "EastUS2"



Step 2: Configure and start online database migration from SQL Server on-premises (with backups in Azure Storage) to Azure SQL Managed Instance.



az datamigration sql-managed-instance create `
--source-location '{"AzureBlob":{"storageAccountResourceId":"/subscriptions/mySubscriptionID/resourceGroups/myRG/providers/Microsoft.Storage/storageAccounts/dbbackupssqlbits","accountKey":"myAccountKey","blobContainerName":"dbbackups"}}' `
--migration-service "/subscriptions/mySubscriptionID/resourceGroups/myRG/providers/Microsoft.DataMigration/SqlMigrationServices/myMigrationService" `
--scope "/subscriptions/mySubscriptionID/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/mySQLMI" `
--source-database-name "AdventureWorks2008" `
--source-sql-connection authentication="SqlAuthentication" data-source="mySQLServer" password="myPassword" user-name="sqluser" `
--target-db-name "AdventureWorks2008" `
--resource-group myRG `
--managed-instance-name mySQLMI



Step 3: Perform a migration cutover once all backups are restored to Azure SQL Managed Instance.



$migOpId = az datamigration sql-managed-instance show --managed-instance-name "mySQLMI" --resource-group "myRG" --target-db-name "AdventureWorks2008" --expand=MigrationStatusDetails --query "properties.migrationOperationId"
az datamigration sql-managed-instance cutover --managed-instance-name "mySQLMI" --resource-group "myRG" --target-db-name "AdventureWorks2008" --migration-operation-id $migOpId



Sample scripts to run end-to-end SQL Server database migrations to Azure SQL Managed Instance or SQL Server on Azure Virtual Machines are available in the Azure Samples Github repository (aka.ms/sqldatamigration-samples).


To learn more, see documentation [Migrate databases at scale using automation]


See what’s new for Dynamics 365 at the Microsoft Business Applications Launch Event

See what’s new for Dynamics 365 at the Microsoft Business Applications Launch Event

This article is contributed. See the original author and article here.

Organizations face new challenges every day. Priorities change, markets shift, opportunities emergethe pace isn’t slowing down. As your competitors transform their business models and customer expectations evolve, your future depends on how well you can empower your teams to adapt, innovate, and make a positive impact every day. You need to be ready for disruption, to embrace constant change, and, most of all, be fast on your feet.

Building a more agile future

That’s why we’re excited to invite you to the Microsoft Business Applications Launch Event on April 6, 2022. Register now for your first look at hundreds of new features, enhancements, and innovations to transform your business into a more agile, customer-centric organization.

Catch all the latest advancements across Microsoft Dynamics 365 being unveiled, including:

  • More collaborative content creation, improved authoring efficiency, and advanced personalization using Dynamics 365 Marketing.
  • Ambient and actionable business data, a single workspace in Sales Hub, and AI-guided live feedback with Dynamics 365 Sales.
  • Simplified setup with guided, task-based experiences and inbox enhancements for rapid issue resolution using Dynamics 365 Customer Service.
  • Subscription billing and intelligent automation around invoicing, ledger settlements, and year-end close services in Dynamics 365 Finance.

And that’s just the start. You’ll also learn how new features across Microsoft business applications are already helping our customers navigate change and seize opportunities. You’ll hear from Charles Lamanna, Microsoft Corporate Vice President of Business Applications and Platform, about how your business can innovate by modernizing processes and uncovering game-changing insights. Then listen in as senior Microsoft engineers and experts behind the technology guide you through the latest advancements in Dynamics 365 and Microsoft Power Platform 2022 release wave 1 and how they’ll help you:

  • Adapt quickly to change as new business priorities, market conditions, and customer opportunities emerge.
  • Innovate everywhere by solving problems with solutions that ease collaboration and work seamlessly together.
  • Deliver more value to your customers in less time by quickly adopting or enhancing solutions that accelerate results.
  • Create more memorable customer experiences by modernizing your processes and uncovering insights into your supply chain.

Business Applications Launch Event with Charles Lamanna, Corporate Vice President, Business Applications and Platform at Microsoft

Real-life innovation

Your inside look at business applications goes even more in-depth with demonstrations of real-life customer scenarios, led by the experts who know Dynamics 365 and Microsoft Power Platform inside and out. See new capabilities in actionand learn what’s possiblefor organizations big and small, across every industry. You’ll be the first to find out how new features are aligned with customer needs to help solve pain points across organizations, ease everyone’s workload, and take on today’s toughest business challenges.

Fresh insights

Innovation in AI, mixed reality, and industry solutions is enabling a new generation of agile organizations. Understand the why and how behind the trends with insights and best practices from industry leaders on how to accelerate results. Have questions for the experts? You’ll have a chance to ask them during the live Q&A chat. You don’t want to miss this digital launch event packed full of ways to help you adapt fast, collaborate with ease, innovate together, and make a positive impact. We hope to see you there. 

Microsoft Business Applications Launch Event

Wednesday, April 6, 2022

9:00 AM to 10:30 AM Pacific Time (UTC-7)

The post See what’s new for Dynamics 365 at the Microsoft Business Applications Launch Event appeared first on Microsoft Dynamics 365 Blog.

Brought to you by Dr. Ware, Microsoft Office 365 Silver Partner, Charleston SC.