Editar

Compartir a través de


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>]
Set-AzSqlInstanceDatabase
   [[-Name] <String>]
   [-Tag <Hashtable>]
   [-InstanceObject] <AzureSqlManagedInstanceModel>
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzSqlInstanceDatabase
   [-Tag <Hashtable>]
   [-InputObject] <AzureSqlManagedDatabaseModel>
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzSqlInstanceDatabase
   [-Tag <Hashtable>]
   [-ResourceId] <String>
   [-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

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

The database object

Type:AzureSqlManagedDatabaseModel
Aliases:DatabaseObject
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-InstanceName

The name of the instance.

Type:String
Position:1
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-InstanceObject

The managed instance object

Type:AzureSqlManagedInstanceModel
Aliases:ParentObject
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Name

The name of the instance database to create.

Type:String
Aliases:InstanceDatabaseName
Position:0
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

The name of the resource group.

Type:String
Position:2
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ResourceId

The instance database resource id

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Tag

The tags to associate with the instance database

Type:Hashtable
Aliases:Tags
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

AzureSqlManagedDatabaseModel

AzureSqlManagedInstanceModel

String

Outputs

AzureSqlManagedDatabaseModel