The SQL Server IaaS Agent extension (SqlIaasExtension) runs on SQL Server on Azure Virtual Machines (VMs) to automate management and administration tasks.
The SQL Server IaaS Agent extension allows for integration with the Azure portal, and depending on the management mode, unlocks a number of feature benefits for SQL Server on Azure VMs:
Get-AzSqlVM | Where-Object {$_.LicenseType -eq ‘AHUB’}. ( or)
$ az sql vm list — query “[?sqlServerLicenseType==’AHUB’]”
The SQL Server IaaS Agent extension unlocks a number of feature benefits for managing your SQL Server VM.
Three (3) modes of SQL IaaS extension :
We can view the current mode of your SQL Server IaaS agent by using Azure PowerShell command given below ,
# Get the SqlVirtualMachine
$sqlvm = Get-AzSqlVM -Name $vm.Name -ResourceGroupName $vm.ResourceGroupName
$sqlvm.SqlManagementType
Installation of SQL IaaS extension :
3. Here we can see the option called as “SQL Automatic VM registration” next to Add button.
4. Click on it and we can see the list of subscriptions where we need to add this extension .
5. Then if we click on Register , then the agent will be installed on the light mode and then we can start using the benifits .
6. We can now login to the VM and check the status of the extension that we have installed .
We can also use the Get-AzVMSqlServerExtension Azure PowerShell cmdlet ,
Get-AzVMSqlServerExtension -VMName “vmname” -ResourceGroupName “resourcegroupname”
7. We can also see the list of all the DB types installed on Azure in one place called “Azure SQL” . We need to type it on the search bar on Azure and then we can see the PAAS, IAAS, etc in one place where we can use this as an inventory for our official purposes.
Limitations:
The SQL IaaS Agent extension only supports:
Uninstall the agent :
We can use the below powershell command to un register the agent if we are not interested .
Unregister-AzProviderFeature -FeatureName BulkRegistration -ProviderNamespace Microsoft.SqlVirtualMachine
This is the free service given by Microsoft to start leverage the features of this agent as part of the SQL management.
Contact us if you are looking for an Azure training.