Edit

Share via


What is Microsoft Copilot in SSMA for Oracle (Preview)?

Copilot in SQL Server Migration Assistant (SSMA) enhances the code conversion process from Oracle to SQL by providing intelligent, AI-powered assistance for complex or unsupported objects. When the SSMA rule engine encounters conversion challenges, such as syntax differences, proprietary Oracle features, or unsupported data types, Copilot steps in to analyze the issue, explain the root cause, and generate alternative SQL-compatible code.

By integrating with Azure OpenAI, Copilot in SSMA for Oracle (Preview) allows you to review, refine, and validate the suggested code directly within the SSMA interface, streamlining the migration process and reducing manual effort.

Prerequisites

To use Copilot in SSMA for Oracle (Preview) for code conversion, ensure you have the following Azure OpenAI resource details:

  • Azure OpenAI Endpoint URL
  • Azure OpenAI Deployment
  • Model Name
  • Azure OpenAI Key

If you don't have these details, follow the steps in the How to create Azure OpenAI resource section.

Steps to run Copilot in SSMA for Oracle (Preview)

Once the code conversion is done, the target objects that the SSMA rule engine couldn't convert, display warnings or errors. For those objects, you can launch Fix with Copilot.

If the OpenAI resource isn't registered, you need to complete the following fields:

  • Azure OpenAI Endpoint URL
  • Azure OpenAI Deployment
  • Model Name
  • Azure OpenAI Key

Screenshot of Validate endpoint dialog.

Once the validation is successful, you can view the converted code. It takes a few minutes to generate the converted code. After the code is generated, you can review the suggested changes.

Code conversion interface

The Code Conversion window has three sections:

Section Description
Errors to fix This section shows the possible issues identified or errors to fix that SSMA rule engine couldn't convert or failed to parse the PL/SQL statement.
Explanation Provides root cause of conversion issues, describing the logic behind its suggestions, and offering clear, contextual insights to help you understand and validate the generated Transact-SQL code.
Code review window Allows you to view side-by-side differences between SSMA-generated and Copilot-converted code. It highlights changes, enabling you to evaluate improvements, understand modifications, and make informed decisions before accepting suggestions.

Screenshot of code comparison dialog.

You can retry or send additional information in the prompt if they aren't satisfied with the conversion. If the converted code is suitable, you can accept the suggestions.

Manage accepted changes in the IDE

Once you review and accept the Copilot-generated code, you can find the accepted changes in the SSMA IDE. Follow these steps to save and synchronize the changes with your database:

  1. Navigate to the SSMA IDE where the accepted changes are displayed.
  2. Save the changes to ensure they're stored locally.
  3. Use the synchronization feature to replicate the changes to your database.

Modify Azure OpenAI settings

If you need to change the Azure OpenAI details, go to Tools > Project Settings > Copilot in the SSMA menu. Update the Azure OpenAI Endpoint, Azure OpenAI Deployment, Model Name, and Azure OpenAI Key as required.

Review and validation

As this code is generated by AI, it's crucial to review, validate, and test the changes before accepting or saving them. Ensure that the code meets your requirements, and functions correctly in your environment.

Limitations

Copilot-generated code for tables and user-defined data types can't be saved directly in SSMA. In such cases, SSMA provides a download option to save the Copilot-generated code locally.