Creating And Using Azure SQL Server And Azure SQL Database

I am going to explain SQL Server and SQL database in Microsoft Azure portal. You can create a database and Server from Azure portal and access it in Visual Studio. Afterwards, you can use it as Entity Framework Designer from the database in any Application.

Let’s login to Azure new portal and create a SQL database.

SQL Server

For creating a database on Azure portal, you have to fill in some details of it. Give a name to your database, subscription name, resource group whatever you want to use, blank database and a Server.

Click Servers, if you want to use an existing SQL Server from the list of the available Servers into your Azure, then you can select it (you must know name and password of the Server). Here, I am going to create a new one.

SQL Server

To create a new Server, follow the steps given below.

  • Server Name – Give a name to your Server.
  • Server Admin Login – Enter user name but make sure that your login name meets the requirements, given below – it’s a SQL identifier and not a typical system name such as an admin, administrator, sa, root, dbmanager, loginmanager etc.
  • Password- Create a password for your Server, which would be used when you connect with it from MS SQL Server Management.
  • Confirm Password – The password should match with the password.
  • Location- Your Server location.

Click to select button to create a new Server.

SQL Server

Just click to create button to create a Server and database.

SQL Server

I want to add it with Microsoft SQL Server. To generate a client IP, click Add Client IP in Firewall Setting.

SQL Server

Here, I am using Visual Studio 2015. My Azure subscription is already connected with Visual Studio Server Explorer. Open SQL Databases under your Azure subscription. You’ll get your database, which you created on Azure portal. I want to open it in Microsoft SQL Server Explorer where we can create the scripts.

SQL Server

In next popup, give a Server name into Server name section, which you created in Azure portal along with the user name and password.

SQL Server

After clicking Connect button, you connect with Explorer. Now, you can create tables.

SQL Server

Add a new table.

SQL Server

After writing table script in to design section, click Update button.

SQL Server

Click Update database to update whole database.

SQL Server

Refresh the table and you will get the expected result.

SQL Server

If you want to connect with it again, then you have to enter only Server password.

SQL Server

Now, you can connect with ADO.NET Entity Data model. Also, you can use an Entity Framework approach.

Up Next
    Ebook Download
    View all
    Learn
    View all