Set-AzSqlInstanceDatabase
Updated an Azure SQL Managed Instance database.
Syntax
Set-AzSqlInstanceDatabase
[-Name] <String>
[-InstanceName] <String>
[-ResourceGroupName] <String>
[-Tag <Hashtable>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
SetInstanceDatabaseFromAzureSqlManagedInstanceModel
Set-AzSqlInstanceDatabase
[[-Name] <String>]
[-InstanceObject] <AzureSqlManagedInstanceModel>
[-Tag <Hashtable>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
SetInstanceDatabaseFromAzureSqlManagedDatabaseModel
Set-AzSqlInstanceDatabase
[-InputObject] <AzureSqlManagedDatabaseModel>
[-Tag <Hashtable>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
SetInstanceDatabaseFromAzureResourceId
Set-AzSqlInstanceDatabase
[-ResourceId] <String>
[-Tag <Hashtable>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Set-AzSqlInstanceDatabase cmdlet updates properties on the given managed database.
Examples
Example 1
Set-AzSqlInstanceDatabase -Name "name1" -InstanceName "instance1" -ResourceGroupName "rg1" -Tags @{tag1="value1"}
Location : westcentralus
Tags : {[tag1, value1]}
Collation : SQL_Latin1_General_CP1_CI_AS
Status : Online
RestorePointInTime :
DefaultSecondaryLocation : westus2
CatalogCollation :
CreateMode :
StorageContainerUri :
StorageContainerSasToken :
SourceDatabaseId :
FailoverGroupId :
RecoverableDatabaseId :
RestorableDroppedDatabaseId :
LongTermRetentionBackupResourceId :
AutoCompleteRestore :
LastBackupName :
ResourceGroupName : rg1
ManagedInstanceName : instance1
Name : name1
CreationDate : 4/11/2022 5:26:30 PM
EarliestRestorePoint : 6/14/2022 5:07:14 PM
Id : /subscriptions/subscription_id/resourceGroups/rg1/providers/Microsoft.Sql/managedInstances/instance1/databases/name1
This command sets tags to existing managed database.
Parameters
-AsJob
Run cmdlet in the background
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: cf
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Parameter properties
Type: IAzureContextContainer
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzContext, AzureRmContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
The database object
SetInstanceDatabaseFromAzureSqlManagedDatabaseModel
Position: 0
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-InstanceName
The name of the instance.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
SetInstanceDatabaseFromInputParameters
Position: 1
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-InstanceObject
The managed instance object
Parameter properties
Parameter sets
SetInstanceDatabaseFromAzureSqlManagedInstanceModel
Position: 0
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-Name
The name of the instance database to create.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: InstanceDatabaseName
Parameter sets
SetInstanceDatabaseFromInputParameters
Position: 0
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceGroupName
The name of the resource group.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
SetInstanceDatabaseFromInputParameters
Position: 2
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceId
The instance database resource id
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
SetInstanceDatabaseFromAzureResourceId
Position: 0
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-Tag
The tags to associate with the instance database
Parameter properties
Type: Hashtable
Default value: None
Supports wildcards: False
DontShow: False
Aliases: Tags
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: wi
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs