question

Lescudero94 avatar image
1 Vote"
Lescudero94 asked AlbertoMorillo commented

How to connect azure virtual machine to SQL database Azure

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
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AlbertoMorillo avatar image
0 Votes"
AlbertoMorillo answered AlbertoMorillo edited

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.



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Lescudero94 avatar image
0 Votes"
Lescudero94 answered AlbertoMorillo commented

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

Thank you very much.

· 5
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you for visiting Microsoft QA. Anything you need about Azure SQL Database please let us know. Have a good day!

0 Votes 0 ·

Alberto the connection was a success.
I only have a problem about import and export.
I need to migrate a SQL Server 2017 Express database to the current one I have inside the Azure SQL Server 2019 server.
I can't do it..

0 Votes 0 ·

To better help you, please answer this question to me. Are you trying to migrate from SQL Server Express (on-premise) to Azure SQL 2019 VM? Or are you trying to migrate from SQL Server Express (on-premise) to Azure SQL Database (DTU-model or vCore model)?

0 Votes 0 ·
Show more comments