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 |
az sql mi link create
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]
Examples
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')
Required Parameters
Name of the instance link.
Name of Azure SQL Managed Instance.
Name of the resource group.
Optional Parameters
Do not wait for the long-running operation to finish.
Name of the primary availability group.
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.
Name of the secondary availability group.
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.
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.
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.
Name of the target database.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az sql mi link delete
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]
Examples
Forcefully deletes an instance link.
az sql mi link delete -g 'rg1' --instance-name 'mi1' -n 'link1' --yes
Optional Parameters
Name of the instance link.
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.
Name of Azure SQL Managed Instance.
Do not wait for the long-running operation to finish.
Name of the resource group.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Do not prompt for confirmation.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az sql mi link list
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
Examples
List all instance links on a specific managed instance.
az sql mi link list -g {rg} --instance-name {mi}
Required Parameters
Name of Azure SQL Managed Instance.
Name of the resource group.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az sql mi link show
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]
Examples
Show the information about a specific instance link
az sql mi link show -g 'rg1' --instance-name 'mi1' --name 'link1'
Optional Parameters
Name of the instance link.
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.
Name of Azure SQL Managed Instance.
Name of the resource group.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az sql mi link update
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]
Examples
Change replication mode to Sync
az sql mi link update -g 'rg1' --mi 'mi1' -n 'link1' --replication-mode 'Sync'
Optional Parameters
Name of the instance link.
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.
Name of Azure SQL Managed Instance.
Do not wait for the long-running operation to finish.
Replication mode value. Possible values include 'Sync' and 'Async'.
Name of the resource group.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.