Share via


az sql mi dtc

Commands related to managed instance DTC management.

The managed instance DTC object can be fetched and updated using these commands.

Commands

Name Description Type Status
az sql mi dtc show

Get managed instance DTC settings.

Core GA
az sql mi dtc update

Update managed instance DTC settings.

Core GA
az sql mi dtc wait

Place the CLI in a waiting state until a condition is met.

Core GA

az sql mi dtc show

Get managed instance DTC settings.

This command gets managed instance DTC settings.

az sql mi dtc show [--ids]
                   [--managed-instance-name]
                   [--resource-group]
                   [--subscription]

Examples

Gets the managed instance DTC

az sql mi show --g resourceGroup1 --managed-instance-name managedInstance1

Gets the managed instance DTC with the specified resource ID

az sql mi show --ids /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup1/providers/Microsoft.Sql/managedInstances/ManagedInstance1/dtc/current

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--managed-instance-name --mi

The name of the managed instance.

--resource-group -g

Name of the resource group.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az sql mi dtc update

Update managed instance DTC settings.

This command updates the managed instance DTC settings. All parameters are optional.

az sql mi dtc update [--add]
                     [--allow-inbound-enabled {0, 1, f, false, n, no, t, true, y, yes}]
                     [--allow-outbound-enabled {0, 1, f, false, n, no, t, true, y, yes}]
                     [--authentication]
                     [--dtc-enabled {0, 1, f, false, n, no, t, true, y, yes}]
                     [--external-dns-suffix-search-list]
                     [--force-string {0, 1, f, false, n, no, t, true, y, yes}]
                     [--ids]
                     [--managed-instance-name]
                     [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                     [--remove]
                     [--resource-group]
                     [--set]
                     [--sna-lu-transactions {0, 1, f, false, n, no, t, true, y, yes}]
                     [--subscription]
                     [--xa-default-timeout]
                     [--xa-max-timeout]
                     [--xa-transactions {0, 1, f, false, n, no, t, true, y, yes}]

Examples

Enable DTC on a managed instance

az sql mi dtc update -g resourceGroup1 --mi managedInstance1 --dtc-enabled true
az sql mi dtc update --ids /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup1/providers/Microsoft.Sql/managedInstances/ManagedInstance1/dtc/current --dtc-enabled true

Allow XA transactions for managed instance DTC

az sql mi dtc update -g resourceGroup1 --mi managedInstance1 --xa-transactions-enabled true

Optional Parameters

--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.

--allow-inbound-enabled

Allow Inbound traffic to managed instance DTC.

Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--allow-outbound-enabled

Allow Outbound traffic of managed instance DTC.

Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--authentication

Authentication type of managed instance DTC.

--dtc-enabled

Active status of managed instance DTC.

Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--external-dns-suffix-search-list --external-dns-suffixes

External dns suffix search list of managed instance DTC. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--managed-instance-name --mi

The name of the managed instance.

--no-wait

Do not wait for the long-running operation to finish.

Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--remove

Remove a property or an element from a list. Example: --remove property.list <indexToRemove> OR --remove propertyToRemove.

--resource-group -g

Name of the resource group.

--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>.

--sna-lu-transactions --sna-lu6point2-transactions-enabled

Allow SNA LU 6.2 Transactions to managed instance DTC.

Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--xa-default-timeout --xa-transactions-default-timeout

Default timeout for XA Transactions (in seconds).

--xa-max-timeout --xa-transactions-maximum-timeout

Maximum timeout for XA Transactions (in seconds).

--xa-transactions --xa-transactions-enabled

Allow XA Transactions to managed instance DTC.

Accepted values: 0, 1, f, false, n, no, t, true, y, yes
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az sql mi dtc wait

Place the CLI in a waiting state until a condition is met.

az sql mi dtc wait [--created]
                   [--custom]
                   [--deleted]
                   [--exists]
                   [--ids]
                   [--interval]
                   [--managed-instance-name]
                   [--resource-group]
                   [--subscription]
                   [--timeout]
                   [--updated]

Optional Parameters

--created

Wait until created with 'provisioningState' at 'Succeeded'.

Default value: False
--custom

Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].

--deleted

Wait until deleted.

Default value: False
--exists

Wait until the resource exists.

Default value: False
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--interval

Polling interval in seconds.

Default value: 30
--managed-instance-name --mi

The name of the managed instance.

--resource-group -g

Name of the resource group.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--timeout

Maximum wait in seconds.

Default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.