az sql mi link

Instance link management commands.

Commands

Name Description Type Status
az sql mi link create

Creates a new instance link.

Core GA
az sql mi link delete

Removes an instance link.

Core GA
az sql mi link list

Returns information about link feature for Azure SQL Managed Instance.

Core GA
az sql mi link show

Returns information about link feature for Azure SQL Managed Instance.

Core GA
az sql mi link update

Updates the properties of an instance link.

Core GA

Creates a new instance link.

This command creates an Azure SQL Managed Instance link by joining distributed availability group on SQL Server based on the parameters passed.

az sql mi link create --distributed-availability-group-name
                      --instance-name
                      --resource-group
                      [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                      [--primary-ag]
                      [--secondary-ag]
                      [--source-endpoint]
                      [--target-database]

Creates an instance link.

az sql mi link create -g 'rg1' --instance-name 'mi1' --name 'link1' --primary-availability-group-name 'primaryag1' --secondary-availability-group-name 'secondaryag1' --source-endpoint '"tcp://server1:5022" --target-database 'db1' --no-wait')
--distributed-availability-group-name --link --name -n

Name of the instance link.

--instance-name --managed-instance --managed-instance-name --mi

Name of Azure SQL Managed Instance.

--resource-group -g

Name of the resource group.

--no-wait

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

accepted values: 0, 1, f, false, n, no, t, true, y, yes
--primary-ag --primary-availability-group-name

Name of the primary availability group.

--secondary-ag --secondary-availability-group-name

Name of the secondary availability group.

--source-endpoint

IP adress of the source endpoint.

--target-database --target-db

Name of the target database.

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.

Removes an instance link.

This command may cause data loss if the link is dropped and replica's LSNs are not synchronized with the primary, thus user must explicitly confirm the command when prompted, or use --yes parameter.

az sql mi link delete [--distributed-availability-group-name]
                      [--ids]
                      [--instance-name]
                      [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                      [--resource-group]
                      [--subscription]
                      [--yes]

Forcefully deletes an instance link.

az sql mi link delete -g 'rg1' --instance-name 'mi1' -n 'link1' --yes
--distributed-availability-group-name --link --name -n

Name of the instance link.

--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.

--instance-name --managed-instance --managed-instance-name --mi

Name of Azure SQL 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
--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.

--yes -y

Do not prompt for confirmation.

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.

Returns information about link feature for Azure SQL Managed Instance.

az sql mi link list --instance-name
                    --resource-group

List all instance links on a specific managed instance.

az sql mi link list -g {rg} --instance-name {mi}
--instance-name --managed-instance --managed-instance-name --mi

Name of Azure SQL Managed Instance.

--resource-group -g

Name of the resource group.

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.

Returns information about link feature for Azure SQL Managed Instance.

az sql mi link show [--distributed-availability-group-name]
                    [--ids]
                    [--instance-name]
                    [--resource-group]
                    [--subscription]

Show the information about a specific instance link

az sql mi link show -g 'rg1' --instance-name 'mi1' --name 'link1'
--distributed-availability-group-name --link --name -n

Name of the instance link.

--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.

--instance-name --managed-instance --managed-instance-name --mi

Name of Azure SQL 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.

Updates the properties of an instance link.

az sql mi link update [--distributed-availability-group-name]
                      [--ids]
                      [--instance-name]
                      [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                      [--replication-mode {Async, Sync}]
                      [--resource-group]
                      [--subscription]

Change replication mode to Sync

az sql mi link update -g 'rg1' --mi 'mi1' -n 'link1' --replication-mode 'Sync'
--distributed-availability-group-name --link --name -n

Name of the instance link.

--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.

--instance-name --managed-instance --managed-instance-name --mi

Name of Azure SQL 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
--replication-mode

Replication mode value. Possible values include 'Sync' and 'Async'.

accepted values: Async, Sync
--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.