Dijeli putem


az sql mi link

Instance link management commands.

Commands

Name Description Type Status
az sql mi link create

Creates a new instance link.

Core Deprecated
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 Deprecated
az sql mi link show

Returns information about link feature for Azure SQL Managed Instance.

Core Deprecated
az sql mi link update

Updates the properties of an instance link.

Core Deprecated
Deprecated

The output will be changed in next breaking change release(2.67.0). Deprecated output properties: targetDatabase, primaryAvailabilityGroupName, secondaryAvailabilityGroupNamesourceEndpoint, sourceReplicaId, targetReplicaId, linkState, lastHardenedLsn. New output properties: databases, partnerAvailabilityGroupName, instanceAvailabilityGroupName, partnerEndpoint, distributedAvailabilityGroupName, instanceLinkRole, partnerLinkRole, failoverMode, seedingMode. To know more about the Breaking Change, please visit aka.ms/mi-link-rest-api-create-or-update.

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]
                      [--primary-availability-group-name]
                      [--secondary-ag]
                      [--secondary-availability-group-name]
                      [--source-endpoint]
                      [--target-database]
                      [--target-db]

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

Name of the primary availability group.

--primary-availability-group-name
Deprecated

Option '--primary-availability-group-name' has been deprecated and will be removed in next breaking change release(2.67.0). Use '--partner-availability-group-name' instead.

Name of the primary availability group.

--secondary-ag

Name of the secondary availability group.

--secondary-availability-group-name
Deprecated

Option '--secondary-availability-group-name' has been deprecated and will be removed in next breaking change release(2.67.0). Use '--instance-availability-group-name' instead.

Name of the secondary availability group.

--source-endpoint
Deprecated

Argument '--source-endpoint' has been deprecated and will be removed in next breaking change release(2.67.0). Use '--partner-endpoint' instead.

IP adress of the source endpoint.

--target-database
Deprecated

Option '--target-database' has been deprecated and will be removed in next breaking change release(2.67.0). Use '--databases' instead.

Name of the 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.

Deprecated

The output will be changed in next breaking change release(2.67.0). Deprecated output properties: targetDatabase, primaryAvailabilityGroupName, secondaryAvailabilityGroupNamesourceEndpoint, sourceReplicaId, targetReplicaId, linkState, lastHardenedLsn. New output properties: databases, partnerAvailabilityGroupName, instanceAvailabilityGroupName, partnerEndpoint, distributedAvailabilityGroupName, instanceLinkRole, partnerLinkRole, failoverMode, seedingMode. To know more about the Breaking Change, please visit aka.ms/mi-link-rest-api-list-by-instance.

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.

Deprecated

The output will be changed in next breaking change release(2.67.0). Deprecated output properties: targetDatabase, primaryAvailabilityGroupName, secondaryAvailabilityGroupNamesourceEndpoint, sourceReplicaId, targetReplicaId, linkState, lastHardenedLsn. New output properties: databases, partnerAvailabilityGroupName, instanceAvailabilityGroupName, partnerEndpoint, distributedAvailabilityGroupName, instanceLinkRole, partnerLinkRole, failoverMode, seedingMode. To know more about the Breaking Change, please visit aka.ms/mi-link-rest-api-get.

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.

Deprecated

The output will be changed in next breaking change release(2.67.0). Deprecated output properties: targetDatabase, primaryAvailabilityGroupName, secondaryAvailabilityGroupNamesourceEndpoint, sourceReplicaId, targetReplicaId, linkState, lastHardenedLsn. New output properties: databases, partnerAvailabilityGroupName, instanceAvailabilityGroupName, partnerEndpoint, distributedAvailabilityGroupName, instanceLinkRole, partnerLinkRole, failoverMode, seedingMode. To know more about the Breaking Change, please visit aka.ms/mi-link-rest-api-create-or-update.

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.