mssql An error occurred while creating a new firewall rule Value cannot be null. (Parameter serverName)

1 minute read

You are receiving the following error message because your IP address (client or local) has not been added to the Azure firewall on the Azure SQL Server.
Error: mssql An error occurred while creating a new firewall rule Value cannot be null. (Parameter serverName)

If you want to grant access to your local or client IP, then follow the below steps:

  1. Go to Azure portal
  2. Select “SQL Servers” from Azure Services.
      Azure Services - SQL severs
    Fig 1. Azure Services - SQL servers
  3. Select your SQL Server from the list to which you want to add the network firewall settings.
      Azure SQL servers
    Fig 2. Azure SQL servers
  4. Select “Networking” from the left-side menu.
  5. Under the firewall rules, enter the rule name and the start and end IP addresses of your client or local machine.
      Azure SQL server - Networking
    Fig 3. Azure SQL server - Networking
  6. Save the changes.

Note: Your client IP address will change frequently unless you’re using a static IP address.

Try to connect the SQL server from your client, and it should be able to successfully connect the SQL server and access the database.

Tags:

Categories:

Updated:

Leave a comment