SQL server databases migration to Azure SQL VM using Azure Data studio

Sanjeev Koppella 20 Reputation points
2024-10-16T12:12:27.3866667+00:00

Hello,

I am migrating the SQL server databases to Azure SQL VM using Azure data studio but step 6 - validating the connectivity failed with below error.

I am able to connect to SQL server using SSMS from same server.
I can be able to see the "Microsoft.DataMigration" has already registered in subscription.
I opened the connectivity from DMS to Source server (open the 1433 port).

Please help to resolve this error.

Failed to connect to the database. Error message: Cannot connect to SQL Database.

Please contact SQL server team for further support. Server: 'servername', Database: '', User: 'sa'.

Check the linked service configuration is correct, and make sure the SQL Database firewall allows the integration runtime to access.

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible.

Verify that the instance name is correct and that SQL Server is configured to allow remote connections.

(provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

Access is denied

Azure Database Migration service
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,013 questions
Azure Data Studio
Azure Data Studio
A cross-platform database tool for data professionals using on-premises and cloud data platforms on Windows, macOS, and Linux.
118 questions
{count} votes

Accepted answer
  1. Mahesh Kurva 725 Reputation points Microsoft Vendor
    2024-10-18T13:39:25.3166667+00:00

    Hi @Sanjeev Koppella,

    Thanks for your response.

    It seems like the internal server error you’re encountering is related to the SQL Server IaaS Agent extension.

    Here are some steps to help you troubleshoot and resolve this issue:

    Check Extension Health:

    • Go to the Azure portal and navigate to your SQL virtual machines resource.
    • Check the Extension health status under the Overview page. If the status is “Unhealthy” or “Failed,” you may need to repair the extension.

    Repair the Extension:

    • In the Azure portal, select your SQL Server VM. Go to SQL IaaS Agent Extension Settings under Help.
    • If the provisioning state shows as “Failed,” choose Repair to fix the extension. If the state is “Succeeded,” you can check the box next to Force repair to repair the extension regardless of its state.

    Verify SQL Server and Services:

    • Ensure that the main SQL IaaS Agent service and the SQL IaaS Query Service are running on your SQL Server VM. If these services are stopped, the extension will not function correctly.

    Retry the Operation:

    • Sometimes, internal server errors can be transient. Try restarting the migration process after some time.

    For more information, please refer the document: https://learn.microsoft.com/en-us/azure/azure-sql/virtual-machines/windows/sql-agent-extension-troubleshoot-known-issues?view=azuresql#check-extension-health.

    Hope this helps. Do let us know if you any further queries.

    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.