Published on

June 21, 2017

Introduction to SQL Server Data Warehouse Migration

In this blog post, we will explore the Data Warehouse Migration Utility, a powerful tool designed to migrate data from SQL Server on premises and Azure SQL to Azure SQL Data Warehouse (ASDW). Whether you are looking to move your data to the cloud or simply transfer data between different SQL Server instances, this utility can simplify the process for you.

Requirements

Before we get started, make sure you have the following:

  • SQL Server Management Studio (SSMS)
  • SQL Server on premises installed
  • An Azure Account
  • Data Warehouse Migration Utility
  • A database with tables (for this article, we will use the AdventureWorks database, but any database with tables and data will work)

Getting Started

Let’s walk through the process of migrating a table from SQL Server on premises to ASDW using the Data Warehouse Migration Utility:

  1. Open SQL Server Management Studio (SSMS) on your desktop.
  2. Launch the Data Warehouse Migration Utility (if you haven’t installed it, refer to the requirements section for instructions).
  3. Select the source and destination types. In this example, we are copying data from SQL Server on premises to ASDW.
  4. Enter the SQL Server on premises name and authentication information, then press Connect.
  5. Select the database with the table(s) you want to export to ASDW (in this example, we will use the AdventureWorks database).
  6. Select the specific table(s) you want to migrate (in this example, we will migrate the Production.ScrapReason table).
  7. Choose the option to migrate the schema. This will automatically generate the T-SQL code to create the schema and table in ASDW.
  8. Click the Run Script icon to execute the generated T-SQL code.
  9. Enter your ASDW connection information when prompted.
  10. If there are any errors, you can refer to the Error Log for troubleshooting. Common issues include firewall rules not being enabled in Azure or objects already being created.
  11. Once the migration is successful, you will be able to see the newly created schema and table in SSMS when you connect to ASDW.
  12. To migrate the data, click the Migrate Data icon.
  13. Choose the option to Run Migration.
  14. Review the path of the packages and click Next.
  15. Specify your ASDW credentials and click Generate.
  16. Locate the generated batch files. One is for exporting data and the other is for importing data.
  17. Execute the batch file for importing data to ASDW.
  18. Verify that the data has been successfully migrated by querying the table in ASDW.

Conclusion

In this article, we have explored the Data Warehouse Migration Utility and learned how it can simplify the process of migrating data from SQL Server on premises to Azure SQL Data Warehouse. By generating the schema and tables automatically, and invoking bcp commands to import the data, this utility streamlines the migration process. Whether you are moving your data to the cloud or transferring data between SQL Server instances, the Data Warehouse Migration Utility is a valuable tool to have in your arsenal.

References: BCP Utility, Data Warehouse Migration Utility

Click to rate this post!
[Total: 0 Average: 0]

Let's work together

Send us a message or book free introductory meeting with us using button below.