Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't connect to Azure SQL database from Visual Studio

When I try to open my Azure SQL Server database in Visual Studio enter image description here

and then use my Azure user account (I already added this user to SQL Owner role) [email protected] I got the following error

Cannot open server "DomainName.com" requested by the login. The login failed. (Microsoft SQL Server, Error: 40532)

like image 860
Ebeid ElSayed Avatar asked Nov 30 '22 10:11

Ebeid ElSayed


2 Answers

It seems to be I need to use [email protected]@AzureSQLInstanceName as a user name, and my domain password as password. I got that from the database connection strings section on Azure portal.

like image 61
Ebeid ElSayed Avatar answered Dec 06 '22 13:12

Ebeid ElSayed


Make sure you've added the IP address you are calling from the to SQL Firewall: Your Server >> Settings >> Firewall Settings.

like image 44
viperguynaz Avatar answered Dec 06 '22 14:12

viperguynaz