Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sql mi maintenance configuration examples #14216

Merged
merged 4 commits into from
Feb 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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