Beginners Errors in Stretch Database SQL Server 2016 – Part 2
Check out the first basic error that beginners would experience while configuring stretch database in my previous article,
Another common error that usually occurred during the configuration is “Firewall”. If firewall is not able to identify the client IP address then it will throw an error like below.
Check the log to identify the detailed error message.
Client with IP address XXX.XXX.XX.XX is not allowed to access the server.
To fix the above issue, we have two ways.
Add the client IP in Azure SQL Server firewall.
Follow the below steps to add the client ip.
This will be applicable when you have SQL Server (Logical server) in Azure.
Step 1: Go to the SQL Server in Azure Portal
Step 2: Choose “Firewall”
Step 3: Click + Add Client IP and Save
Use the below stored procedure to add the IP Address in master database to allow the firewall.
sp_set_firewall_rule [@name = ] ‘name’,
[@start_ip_address =] ‘start_ip_address’,
[@end_ip_address =] ‘end_ip_address’
[ ; ]