How to solve the problem of network access failure when deploying sqlserver on azure


Recently, when deploying the azure virtual machine, we couldn’t access the network database all the time. After searching the data, we found that azure does not open the network access rules by default, and it needs to be set manually.

Open TCP port for default instance of database engine in Windows Firewall

1. On the start menu, click Run and type WF.msc , and then click OK.

2. In the left pane of windows firewall with advanced security, right-click inbound rules, and then click new rule in the Action pane.

3. In the rule type dialog box, select port, and then click next.

4. In the protocols and ports dialog box, select TCP. Select specific local port, and then type the port number of the database engine instance (port number 1433 for the default instance or the port number you selected for the private port in the endpoint step).

5. Click next.

6. In the actions dialog box, select allow connections, and then click next.
Security note: select “only allow secure connections” to increase security. Select this option if you want to configure additional security options in your environment.

7. In the profile dialog box, select public, and then click next.
Security note: select public to allow access through the Internet. If possible, select a more restrictive profile.

8. In the Name dialog box, type a name and description for this rule, and then click finish.

Open additional ports for other components as needed.

Many friends use this method to successfully solve the problem that the network cannot be accessed when deploying sqlserver on azure. If you need it, you can refer to the above and try it. At the same time, I hope that this article can share your love.