Skip to content

Commit

Permalink
Add sql mi maintenance configuration examples (#14216)
Browse files Browse the repository at this point in the history
* Update create example

* Update examples for update MI scenario

* Update changelog

* Update ChangeLog.md

Co-authored-by: Yabo Hu <yabhu@microsoft.com>
  • Loading branch information
kukislav and VeryEarly authored Feb 19, 2021
1 parent a44c879 commit 1959d3c
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 0 deletions.
31 changes: 31 additions & 0 deletions src/Sql/Sql/help/New-AzSqlInstance.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,37 @@ InstancePoolName : instancePool0

This command creates a new instance in an instance pool with name instancePool0

### Example 6: Create a new instance with maintenance configuration
```powershell
PS C:\>New-AzSqlInstance -Name managedInstance1 -ResourceGroupName resourcegroup01 -Location "westus" -AdministratorCredential (Get-Credential) -SubnetId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name" -VCore 8 -ComputeGeneration Gen5 -Edition GeneralPurpose -MaintenanceConfigurationId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_WestUS_MI_2"
Location : westus
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/managedInstances/managedInstance1
ResourceGroupName : resourcegroup01
ManagedInstanceName : managedInstance1
Tags :
Identity :
Sku : Microsoft.Azure.Management.Internal.Resources.Models.Sku
FullyQualifiedDomainName : managedInstance1.wusxxxxxxxxxxxxx.database.windows.net
AdministratorLogin : adminLogin1
AdministratorPassword :
SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name
LicenseType : LicenseIncluded
VCores : 8
StorageSizeInGB : 256
Collation : SQL_Latin1_General_CP1_CI_AS
PublicDataEndpointEnabled : False
ProxyOverride :
TimezoneId : UTC
DnsZonePartner :
DnsZone : ad35cna0mw
InstancePoolName :
MinimalTlsVersion :
BackupStorageRedundancy : Geo
MaintenanceConfigurationId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_WestUS_MI_2
```

This command creates a new instance with maintenance configuration MI_2

## PARAMETERS

### -AdministratorCredential
Expand Down
62 changes: 62 additions & 0 deletions src/Sql/Sql/help/Set-AzSqlInstance.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,68 @@ InstancePoolName : instancePool0

This command sets existing instance using new values for -AdministratorPassword, -LicenseType, -StorageSizeInGB and -VCore for an instance within an instance pool

### Example 4: Update maintenance configuration for existing instance
```powershell
PS C:\> Set-AzSqlInstance -Name "managedInstance1" -ResourceGroupName "resourcegroup01" -MaintenanceConfigurationId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_WestUS_MI_2"
Location : westus
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/managedInstances/managedInstance1
ResourceGroupName : resourcegroup01
ManagedInstanceName : managedInstance1
Tags :
Identity :
Sku : Microsoft.Azure.Management.Internal.Resources.Models.Sku
FullyQualifiedDomainName : managedInstance1.wusxxxxxxxxxxxxx.database.windows.net
AdministratorLogin : adminLogin1
AdministratorPassword :
SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name
LicenseType : LicenseIncluded
VCores : 8
StorageSizeInGB : 256
Collation : SQL_Latin1_General_CP1_CI_AS
PublicDataEndpointEnabled : False
ProxyOverride :
TimezoneId : UTC
DnsZonePartner :
DnsZone : ad35cna0mw
InstancePoolName :
MinimalTlsVersion :
BackupStorageRedundancy : Geo
MaintenanceConfigurationId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_WestUS_MI_2
```

This command updates existing instance with maintenance configuration MI_2

### Example 5: Remove maintenance configuration from existing instance
```powershell
PS C:\> Set-AzSqlInstance -Name "managediInstance1" -ResourceGroupName "Resourcegroup01" -MaintenanceConfigurationId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default"
Location : westus
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/managedInstances/managedInstance1
ResourceGroupName : resourcegroup01
ManagedInstanceName : managedInstance1
Tags :
Identity :
Sku : Microsoft.Azure.Management.Internal.Resources.Models.Sku
FullyQualifiedDomainName : managedInstance1.wusxxxxxxxxxxxxx.database.windows.net
AdministratorLogin : adminLogin1
AdministratorPassword :
SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name
LicenseType : LicenseIncluded
VCores : 8
StorageSizeInGB : 256
Collation : SQL_Latin1_General_CP1_CI_AS
PublicDataEndpointEnabled : False
ProxyOverride :
TimezoneId : UTC
DnsZonePartner :
DnsZone : ad35cna0mw
InstancePoolName :
MinimalTlsVersion :
BackupStorageRedundancy : Geo
MaintenanceConfigurationId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default
```

This command resets maintenance configuration to default for existing instance

## PARAMETERS

### -AdministratorPassword
Expand Down

0 comments on commit 1959d3c

Please sign in to comment.