Skip to content

Latest commit

 

History

History
107 lines (64 loc) · 5.63 KB

File metadata and controls

107 lines (64 loc) · 5.63 KB
title Assess an application’s data access layer with Data Migration Assistant
description Learn how to use Data Migration Assistant to assess an application’s data access layer.
ms.date 01/23/2020
ms.prod sql
ms.prod_service dma
ms.reviewer
ms.technology dma
ms.topic conceptual
keywords
helpviewer_keywords
Data Migration Assistant, Assess
ms.assetid
author HJToland3
ms.author rajpo
ms.custom seo-lt-2019

Assess an app's data access layer with Data Migration Assistant

Applications typically connect and persist data to a database. The data access layer of the application provides simplified access to this data. Data Migration Assistant (DMA) has enabled users to assess their databases and related objects. The latest version of DMA (v5.0) introduces support for analyzing database connectivity and embedded SQL queries in the application code.

Consider the C# code segment below:

Sample C# code segment

In this case, you can see that the application is using a SQL query to get the name of an employee.

Sample C# code segment detail

As an application owner, I need to be able to identify the various databases that the application can connect to and the queries embedded in the application’s data access layer. In addition, I need to identify any changes required to modernize the application to Azure Data services.

Assess an app with Data Access Migration Toolkit

To enable this assessment, we recently introduced the Data Access Migration Toolkit (DAMT), a Visual Studio Code extension. The latest version of this extension (v 0.2) adds support for .Net applications and T-SQL dialect.

  1. Download and install VS Code from here.

  2. Enable the Data Access Migration Toolkit extension from the Extensions Marketplace.

    Data Access Migration Toolkit extension page

  3. Open the application project in Visual Studio Code.

    Application project in Visual Studio Code

  4. Start the extension console (Ctrl-Shft-P), and then run the Data Access: Analyze Workspace command.

    Extension console in Visual Studio Code

  5. Select the SQL Server dialect.

    SQL Server dialect selection

    At the end of the analysis, the command produces a report of SQL connectivity commands and queries.

    Data Access Report

  6. Review the report for data connectivity components and for SQL queries embedded in the application code, which appear highlighted.

    SQL queries in application code

    These queries can be analyzed through DMA for compatibility and feature parity issues based on the target SQL platform.

  7. To assess the application’s data layer, export the report as json file.

    .json file export

    In this case, the generated file is:

    View contents of json file

    Data Migration Assistant enables assessing the queries identified in the application within the context of modernizing the database to Azure Data platform.

  8. Start Data Migration Assistant, and then create an assessment project.

    Data Migration Assistant new assessment project

  9. Select the source SQL Server instance.

    Data Migration Assistant select SQL Server source

  10. Select the database to which the application is connecting.

    Data Access Migration select application database

    To facilitate data access assessment, DMA introduces the ability to include json files with application queries. Next, we’ll include the json file we crafted earlier with the application queries.

  11. Select the database and browse to the json file exported from Data Access Migration Toolkit to include the queries from the application for the assessment.

    Data Migration Assistant open DMAT json file

  12. Start the assessment.

    Data Migration Assistant start assessment

  13. Review the assessment report. The generated report will include any compatibility or feature parity issues detected in the application queries as shown below.

    Data Migration Assistant assessment report

Now, in addition to having the database perspective of the migration, users also have a view from the application perspective.

See also