Saturday, October 26, 2019

Adding your Managed Instance Subnet in your storage Account's Network and Firewall settings

Hello Readers!

The below blog content is to highlight an azure limitation and a workaround to fix that till Azure came up with a direct solution for it. Its about enabling access for managed instance in the network and firewall settings of a storage account , if you are choosing the 'Public- Selected Networks ' configuration.

If you have noticed, when we add a particular VNet/Subnet to the settings, it will first enable service end points onto the subnet we are adding as the first step. This is not really possible for the dedicated subnet we create and maintain for Azure managed instances . As per design or existing configurations, managed instances' subnet can not have service end point enabled.

So how do we enable it?

There is a workaround for this limitation. 

We can find the managed endpoint IP address for the managed instances and whitelist that. It will be accepted in the network and firewall settings of the storage account , just like how we add a public IP to it. But the important part is having both your storage account and Managed instance in different Regions.

Below is how you do it.


Step1 : Finding the managed endpoint IP
Connect to Cloudshell (Powershell client embedded in the azure portal) or your own PowerShell client.

If you are logging in from your own Powershell client, make sure you have Az module installed by running the below commands and you are logged into your subscription.

Install-Module -Name Az #Installing Az module

connect-Azaccount #Logging into Azure subscription

resolve-dnsname 'xxxxx-mi1.xxxxx.database.windows.net' | select -first 1  | %{ resolve-dnsname $_.NameHost.Replace(".vnet","")}  #Finding the managed endpoint IP of your managed instance.

Please replace "xxxxx-mi1.xxxxx.database.windows.net" in the above script with the private endpoint URL of your managed instance which you get from the "Connection strings" of your managed instance in the Azure portal.

Managed endpoint address is common for all the instances in your MI subnet. 

Step2: Adding the IP into the firewall settings of the storage account.

This was covered in the bottom of my previous blog on storage account . Access it from here. 

May be in future, microsoft will come with a better solution which would support enabling service end point in MI Subnet. Let us all keep checking azure updates page 

Thats the end of this blog. Please follow if you are finding my blogs knowledgeable. If you do , you will receive notifications when I post something new here. Thanks for reading and Connecting ! 

Friday, October 25, 2019

How to perform a Geo-Restore in your Azure SQL managed Instance(Using Azure portal)

Hello Readers!

The below blog content is on how do we perform Geo-restore of databases backed up automatically from the azure managed instances.


Geo-restore only means restoring the database backup taken from an instance in one region to another . It is listed as one of DR method that can be used,  in the event of a disaster causing the whole region data centers going down.

Lets get to it

Using Azure portal

Step 1:
Go to the Target instance Page in the Azure portal and click on 'New Database'



Step2: Choose the backup

In the popup we get, set a name for the New database that will be created from this restore operation.


Choose backup against  'Use Existing Data'




After the above steps, you can select the backups of databases in the drop down list below.



The backup list contains the instances in your subscription and the latest restore points created by the automated backup.

You can choose one and click on OK to initiate restore.

You can initiate many of these restore activities. It will be queued and processed according to your Vcore settings.

Thanks for visiting !.