How to connect azure virtual machine to SQL database Azure

Lucas Escudero 191 Reputation points

I just created a virtual machine in Azure with Windows Server 2022 and I need to create a database within the same resource group but outside of the Windows Server. I need to know how to connect to the database from the server to save the information.

Azure SQL Database
0 comments No comments
{count} vote

Accepted answer
  1. Alberto Morillo 33,421 Reputation points MVP

    Please follow the steps provided on this quickstart article, on how to create an Azure SQL Database. After that, you can create a firewall rule to add the IP of your Azure VM as a trusted connection using this step-by-step documentation.

    Finally, you can install SQL Server Management Studio (SSMS) on the Azure VM and get connected to your Azure SQL Database or you can create an ODBC Data Source to test connectivity.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Lucas Escudero 191 Reputation points

    Excellent Albert.
    I'll try and let you know how it went.

    Thank you very much.