Set-AzSqlInstanceDtc
Sets properties for an Azure SQL Managed Instance DTC
Syntax
SetByNameParameterSet (Default)
Set-AzSqlInstanceDtc
[-ResourceGroupName] <String>
[-InstanceName] <String>
[[-DtcEnabled] <Boolean>]
[[-ExternalDnsSuffixSearchList] <System.Collections.Generic.List`1[System.String]>]
[-XaTransactionsEnabled <Boolean>]
[-SnaLu6point2TransactionsEnabled <Boolean>]
[-XaTransactionsDefaultTimeout <Int32>]
[-XaTransactionsMaximumTimeout <Int32>]
[-AllowInboundEnabled <Boolean>]
[-AllowOutboundEnabled <Boolean>]
[-Authentication <String>]
[-AsJob]
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
SetByParentObjectParameterSet
Set-AzSqlInstanceDtc
[-InstanceObject] <AzureSqlManagedInstanceModel>
[[-DtcEnabled] <Boolean>]
[[-ExternalDnsSuffixSearchList] <System.Collections.Generic.List`1[System.String]>]
[-XaTransactionsEnabled <Boolean>]
[-SnaLu6point2TransactionsEnabled <Boolean>]
[-XaTransactionsDefaultTimeout <Int32>]
[-XaTransactionsMaximumTimeout <Int32>]
[-AllowInboundEnabled <Boolean>]
[-AllowOutboundEnabled <Boolean>]
[-Authentication <String>]
[-AsJob]
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzSqlInstanceDtc
[-InputObject] <AzureSqlManagedInstanceDtcModel>
[[-DtcEnabled] <Boolean>]
[[-ExternalDnsSuffixSearchList] <System.Collections.Generic.List`1[System.String]>]
[-XaTransactionsEnabled <Boolean>]
[-SnaLu6point2TransactionsEnabled <Boolean>]
[-XaTransactionsDefaultTimeout <Int32>]
[-XaTransactionsMaximumTimeout <Int32>]
[-AllowInboundEnabled <Boolean>]
[-AllowOutboundEnabled <Boolean>]
[-Authentication <String>]
[-AsJob]
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
SetByResourceIdParameterSet
Set-AzSqlInstanceDtc
[-ResourceId] <String>
[[-DtcEnabled] <Boolean>]
[[-ExternalDnsSuffixSearchList] <System.Collections.Generic.List`1[System.String]>]
[-XaTransactionsEnabled <Boolean>]
[-SnaLu6point2TransactionsEnabled <Boolean>]
[-XaTransactionsDefaultTimeout <Int32>]
[-XaTransactionsMaximumTimeout <Int32>]
[-AllowInboundEnabled <Boolean>]
[-AllowOutboundEnabled <Boolean>]
[-Authentication <String>]
[-AsJob]
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Set-AzSqlInstanceDtc cmdlet modifies properties of an Azure SQL Managed instance DTC.
Examples
Example 1 Enable DTC for a managed instance
Set-AzSqlInstanceDtc -ResourceGroupName ResourceGroup1 -InstanceName ManagedInstance1 -DtcEnabled $true
ResourceGroupName : ResourceGroup1
ManagedInstanceName : ManagedInstance1
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup1/providers/Microsoft.Sql/managedInstances/ManagedInstance1/dtc/current
DtcEnabled : True
DtcHostNameDnsSuffix : suffix1.net
DtcHostName : name1.suffix1.net
ExternalDnsSuffixSearchList : {suffix1.net}
SecuritySettings : Microsoft.Azure.Management.Sql.Models.ManagedInstanceDtcSecuritySettings
This command enables managed instance DTC for the managed instance ManagedInstance1.
Example 2 Enable XA transactions for DTC
$dtc = Set-AzSqlInstanceDtc -ResourceGroupName ResourceGroup1 -InstanceName ManagedInstance1 -XaTransactionsEnabled $true
Write-Output $dtc.SecuritySettings
TransactionManagerCommunicationSettings : Microsoft.Azure.Management.Sql.Models.ManagedInstanceDtcTransactionManagerCommunicationSettings
XaTransactionsEnabled : True
SnaLu6point2TransactionsEnabled : True
XaTransactionsDefaultTimeout : 0
XaTransactionsMaximumTimeout : 0
This command enables XA transactions for managed instance DTC
Example 3 Enable DTC for a previously fetched managed instance
$managedInstance = Get-AzSqlInstance -ResourceGroupName ResourceGroup1 -InstanceName ManagedInstance1
Set-AzSqlInstanceDtc -InstanceObject $managedInstance
ResourceGroupName : ResourceGroup1
ManagedInstanceName : ManagedInstance1
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup1/providers/Microsoft.Sql/managedInstances/ManagedInstance1/dtc/current
DtcEnabled : True
DtcHostNameDnsSuffix : suffix1.net
DtcHostName : name1.suffix1.net
ExternalDnsSuffixSearchList : {suffix1.net}
SecuritySettings : Microsoft.Azure.Management.Sql.Models.ManagedInstanceDtcSecuritySettings
This command enables managed instance DTC by passing managed instance object.
Example 4 Enable XA transactions for a previously fetched DTC object
$dtc = Get-AzSqlInstanceDtc -ResourceGroupName ResourceGroup1 -InstanceName ManagedInstance1
$dtc = Set-AzSqlInstanceDtc -InputObject $dtc -DtcEnabled $true
Write-Output $dtc.SecuritySettings
TransactionManagerCommunicationSettings : Microsoft.Azure.Management.Sql.Models.ManagedInstanceDtcTransactionManagerCommunicationSettings
XaTransactionsEnabled : True
SnaLu6point2TransactionsEnabled : True
XaTransactionsDefaultTimeout : 0
XaTransactionsMaximumTimeout : 0
This command enables XA transactions for DTC by passing DTC object.
Example 5 Enable DTC with a specific resource ID
Set-AzSqlInstanceDtc -ResourceId /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup1/providers/Microsoft.Sql/managedInstances/ManagedInstance1/dtc/current -DtcEnabled $true
ResourceGroupName : ResourceGroup1
ManagedInstanceName : ManagedInstance1
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup1/providers/Microsoft.Sql/managedInstances/ManagedInstance1/dtc/current
DtcEnabled : True
DtcHostNameDnsSuffix : suffix1.net
DtcHostName : name1.suffix1.net
ExternalDnsSuffixSearchList : {suffix1.net}
SecuritySettings : Microsoft.Azure.Management.Sql.Models.ManagedInstanceDtcSecuritySettings
This command enables managed instance DTC by passing the resource ID of the DTC.
Parameters
-AllowInboundEnabled
Enable inbound traffic.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-AllowOutboundEnabled
Enable outbound traffic.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-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
-Authentication
Authentication type.
Parameter properties
Type: String
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
-DtcEnabled
DTC enabled status.
Parameter properties
Parameter sets
(All)
Position: 2
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ExternalDnsSuffixSearchList
External DNS suffix search list.
Parameter properties
Type: List<T> [ String ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: 3
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Force
Skip confirmation message for performing the action.
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
Input object of the managed instance DTC.
SetByInputObjectParameterSet
Position: 0
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-InstanceName
Name of the managed instance.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
SetByNameParameterSet
Position: 1
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-InstanceObject
Input object of the managed instance.
Parameter properties
Parameter sets
SetByParentObjectParameterSet
Position: 0
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceGroupName
Name of the resource group.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
SetByNameParameterSet
Position: 0
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceId
Resource ID of the managed instance DTC.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
SetByResourceIdParameterSet
Position: 0
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-SnaLu6point2TransactionsEnabled
SNA LU 6.2 transactions enabled status.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
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
-XaTransactionsDefaultTimeout
XA transactions default timeout.
Parameter properties
Type: Nullable<T> [ Int32 ]
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
-XaTransactionsEnabled
XA transactions enabled status.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-XaTransactionsMaximumTimeout
XA transactions maximum timeout.
Parameter properties
Type: Nullable<T> [ Int32 ]
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
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