Cannot open server requested by the login

I'm trying to connect to my Azure SQL database using pyodbc. The azure account that I am using is under the username (my university account). When I try to connect to the database, I get the error

Cannot open server "student.bham.ac.uk" requested by the login. The login failed. (40532).

The credentials that I am using are correct. The error makes me think that it might be confusing my login for the database server? What does this error mean and how can I fix the issue?

3 Answers

This seems to work for me:

If your SQL Database server is called myazureserver and your login is , then you must supply your login as @myazureserver.

1

I recently suffered this same problem and I fixed it this way:

  1. Go to your SQL Server resource on Azure
  2. Go to "Firewalls and virtual networks"
  3. Verify "allow Azure's service and resources accessing this server" is set as YES

enter image description here

Save changes and let up to 5 minutes to apply this changes.

1

What Hdot said works also for me

If your SQL Database server is called myazureserver and your login is , then you must supply your login as @myazureserver.

but, worth to mention that if you use DBeaver, you must update USER and PASSWORD in 'Driver Properties' tab (instead of 'Main'). This can be really confusing. enter image description here

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like