Issue: Connection was denied since Deny Public Network Access is set to Yes
In this blog we are going to learn how to resolve Error which is ''connection was denied since deny public network access is set to Yes'' let's create an SQL Azure database and then configure it with a private endpoint, first of all, we have to create a virtual network, For creating a virtual network go to the Azure portal and then click on the search bar and search for virtual networks, then create a virtual network by clicking virtual networks, on the left side of the dashboard, click on create button and then in basic tab select the resource group, after selecting the resource group give the name of virtual network and select the region and then click on Review + Create button as shown in below picture.
Inside this virtual network, we have to create multiple Sub-Virtual Networks, so one Sub-virtual network we will create will be for our azure SQL database and one for our remote virtual machine.
For creating a Sub-Virtual Network we will click on the Subnets tab and then click on +Subnet button, by clicking +Subnet button it will open a form as shown in the picture below, we have to name the Subnet and click save, after that again we will click +Subnet button and create another subnet and name it.
Once our Subnets are created we have to create Azure SQL Server, for creating Azure SQL Server we have to go to the Azure portal and click on SQL Databases on the dashboard, it will open a window as shown below, Click on the +Create button, then insert information ie Resource Group Database name and then create Server name, after creating server name then click on configure database and select as per your requirement and click apply, then click on Review + Create Button and then click on create.
Once our Azure SQL Server is created we will now have to create a Virtual Machine, to create a virtual machine we have to go on the main page of our azure portal, on the top of the dashboard click on the Virtual Machines, it will open a window, on that window we have to click on +Create Button and then click on a new machine, select the subscription, resource group, name of the machine then allow the selected port which is RDP3389 and then click on Disks:
On the disks page, you can select the OS Disk type and Encryption type as per your requirement then click on networking.
In the networking tab, you have to select Virtual Network Name, Subnet, Public IP, NIC network security group, public inbound ports then Click on Review + Create Button, then click on create.
now we have to install the azure data studio, for which we open Internet Explorer and search for Azure Data Studio and install.
now our Virtual Server Machine is ready let's go to the server and copy the Server name as shown is the picture below.
No comments:
Post a Comment