This article demonstrates using Visual Studio step by step for Azure SQL Database operations.
Please click here to go through my previous article about “Creating an Azure SQL Database and connecting through SQL Server Management Studio.”
Azure has too many functionalities nowadays, and day by day, the Microsoft team is adding more and more features into Azure. Here, in this article, we are going to use Visual Studio 2017 for Azure Database operations.
First of all, login to the Azure portal. Click here to go to Azure login page.
After signing into the Azure portal, click on “SQL databases” from the left panel of the website, as shown in the below image.
We will get the created database. Click on the created database “employee”.
Now, click on “Tools” as shown in the below image.
Click on the “Open in Visual Studio” menu.
Click on the “Configure Firewall” link for providing the access for a specific computer.
Now, enter the rule name as per your convenience and enter the IP address of the computer from where you are going to use the Visual Studio to connect to Azure SQL Database.
Here, we can also give permission for continuous series of IP addresses by providing the Start IP address and End IP address, or we can allow only for one computer by entering the same IP address in both fields.
We can also see the current system’s IP address from the “Firewall settings” screen. After entering the IP address details, click on the “Save” button as shown in the below image.
We will get success message. Click OK.
Now, click on the “Open in Visual Studio” button.
Click on the “Open…” button as below.
Now, enter the password for authentication.
We can see that Azure SQL Database is connected to the SQL Server Object Explore.
Right click on the “employee” table and click on the “New Query”, as shown in the below image.
Now, write a SQL query for creating a table “Department” and execute it as below.
In this easy way, we can perform all database operations through Visual Studio.
In this article, we have learned how to use Visual Studio to perform Azure SQL database operations on an existing database.