Skip to content
Azure Lessons
Azure Lessons
  • Home
  • AWS
  • Azure
    • Azure Virtual Machine
    • Azure Active Directory
    • Azure CLI
    • Azure CLI Commands List
    • Azure Cognitive Services
    • Azure Cosmos DB
    • Azure DevOps
    • Azure Functions
    • Azure PowerShell Commands
    • Azure Sentinel
    • Azure SQL
    • Azure Storage
    • Azure Synapse
  • Blogs
  • FREE EBOOK

Cannot Open Server requested by the login. The login failed

June 25, 2025June 25, 2025 by Rajkishore

This Azure tutorial will discuss how to fix the error. Cannot open server requested by the login. the login failed, which I got while trying to log in to the Azure SQL database.

Table of Contents

  • Cannot Open Server requested by the login. The login failed.
    • Solution
  • Wrapping Up

Cannot Open Server requested by the login. The login failed.

Recently, I was working on a requirement to write a stored procedure in my Azure SQL DB. I encountered this error when attempting to log in to the Query Editor (Preview).

  1. Log in to the Azure Portal (https://portal.azure.com/)
  2. Search for the SQL databases in the Azure Portal and click on the search result
Cannot Open Server Requested By The Login Azure SQL

You will see all your list of Azure SQL databases here. Click on the one that you want to use. Now, click on the Query editor (preview) link from the left navigation on the SQL database page. Enter your login username and password, and click the Login button. You can see that I got the error below.

cannot open server requested by the login. the login failed

The Exact error message was as below.

Cannot open server ‘sql1246’ requested by the login. Client with IP address ‘106.##.106.###’ is not allowed to access the server. To enable access, use the Windows Azure Management Portal or run sp_set_firewall_rule on the master database to create a firewall rule for this IP address or address range. It may take up to five minutes for this change to take effect. Set server firewall (sql1246)

Now we will see how to fix this error.

Solution

To fix the error, you need to set the firewall for the SQL server(sql1246) in my case. Follow the steps below.

1. To set the firewall, click the Set server firewall link in the error message itself; otherwise, you can search for SQL Server in the Azure Portal and click on the search result.

You will get the list of SQL servers and click on the specific one for which you need to set the Firewall( You can see the complete error message to find the name of the SQL Server).

2. On the SQL Server page, click the Firewalls and Virtual Networks link in the left navigation. The next step is to click the + Add client IP button, as highlighted below, and enter the Client IP address in the Rule name, Start IP, and End IP text boxes. (For the exact Client IP, refer to the complete error message). Finally, click on the Save button as shown in the screenshot below.

microsoft sql cannot open server requested by the login. the login failed

Once you click the Save button, a pop-up will appear below. Click on the OK button.

cannot open server requested by the login. the login failed azure sql

3. Now navigate to the Azure SQL Database and click on the Now click on the Query editor (preview) link from the left navigation on the Azure SQL database page. Enter your login username and password, and click the Login button. You will be able to log in successfully as shown below

cannot open server requested by the login. the login failed.

Wrapping Up

In this article, we discussed how to resolve the error ‘Cannot open server requested by login,‘ which I encountered while attempting to log in to the Azure SQL database.

You may also like the following article below

  • How To Connect To Azure SQL Database
  • How to Export Azure SQL Database
Microsoft Azure
Rajkishore

I am Rajkishore, and I am a Microsoft Certified IT Consultant. I have over 14 years of experience in Microsoft Azure and AWS, with good experience in Azure Functions, Storage, Virtual Machines, Logic Apps, PowerShell Commands, CLI Commands, Machine Learning, AI, Azure Cognitive Services, DevOps, etc. Not only that, I do have good real-time experience in designing and developing cloud-native data integrations on Azure or AWS, etc. I hope you will learn from these practical Azure tutorials. Read more.

How to create Cosmos DB in Azure
What is Microsoft Entra Connect
Subscribe To Our YouTube Channel Subscribe to AzureLessons YouTube Channel

Recent Posts

  • Azure VM Backup Pricing
  • Azure VM
  • What Is Edge Location In AWS
  • DP-300 Certification
  • What Is Cloud Shell In Azure
  • About Us
  • Contact Us
  • Privacy Policy
  • Sitemap
© 2026 Azure Lessons
Azure
Virtual
Machine
By: Rajkishore
Azure Consultant
PDF

Free 25+ page PDF

Download free Azure Virtual Machine PDF

Download our free 25+ page Azure Virtual Machine guide and master cloud deployment today!

No spam, ever. You will also get new Azure tutorials by email. Unsubscribe any time. Privacy policy

Check your inbox

Your Azure Virtual Machine PDF is on its way to . Can't find it in a few minutes? Look in your Promotions or Spam folder.