How to connect to the Azure Database?

Asked

Viewed 643 times

5

Well friends, I have a database on Azure, but I can’t connect to it. The error is that my IP is not authorized to perform such connection, what I did was add a new rule to the firewall of the database server, but every time I change IP I have this problem. What should I do to solve this problem once and for all?

1 answer

2


  • Log in to Azure;
  • On the database part, choose the desired database;
  • Choose the option "Manage";
  • Azure will tell you that you need to add a Firewall exception to your IP and ask for confirmation. Confirm;
  • The next screen will ask if you want to use the online editor to access the bank. From now on, the database can be accessed even by your local SQL Server Management Studio.

About always ask for each IP change, it is a security feature of the Azure service. It would only be possible to fix an IP in your database if it was hosted inside a virtual machine, for example, without this endpoints, which is mandatory in the case of database hosting.

  • Well my friend, thank you very much for the answer, but the problem is that every time I change IP I need to put an exception in Firewall.

  • Yeah, that’s just the way it works.

  • 1

    Oops, so I could create a VM and create the BD there dendro, but how would I access the resources of that VM through an Asp.Net MVC application for example, as would use the Entity Framwork?

  • The same as the one you use today. The difference is that it wouldn’t all come configured for you. You would have to learn how to set up IIS, the Web Deploy, and so on. It’s a little long way, but it’s worth it.

  • Well @Cigano Morrison Mendez if I continue using the Database as it is without the VM, when creating a Web Application Asp.Net MVC I could not make it available because the Firewall would block all access, correct? In that case, what would be the alternative?

  • @Jedaiasrodrigues Wrong. Firewall only blocks external accesses. Access made within the same cloud environment is free.

  • Just to confirm... So that means that if I create a Web Application and publish in Azure, I will have no problems with accessing the database?

  • @Jedaiasrodrigues Not at all. The exchange of information between the components must take place freely. Only external access is regulated (and rightly so) to avoid security problems.

  • then any time I want to update something in the database, create tables manually I will have to create a new rule in the firewall if my IP is different correct?

  • @Jedaiasrodrigues Apparently you are not using the concept of Migrations, where the Web Deploy makes all bank changes for you. Teaching to configure this part in this answer.

Show 5 more comments

Browser other questions tagged

You are not signed in. Login or sign up in order to post.