Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

az sql mi link

Instance link management commands.

Commands

Name Description Type Status
az sql mi link create

Create a Managed Instance link between Sql On-Prem and Sql Managed Instance.

Core GA
az sql mi link delete

Drop a Managed Instance link between Sql On-Prem and Sql Managed Instance.

Core GA
az sql mi link failover

Performs requested failover type in this Managed Instance link.

Core GA
az sql mi link list

Get a list of Managed Instance links in instance.

Core GA
az sql mi link show

Get a Managed Instance link info.

Core GA
az sql mi link update

Update a Managed Instance link replication mode.

Core GA

az sql mi link create

Create a Managed Instance link between Sql On-Prem and Sql Managed Instance.

az sql mi link create --instance-name --managed-instance --managed-instance-name --mi
 --link-name --name
 --resource-group
 [--acquire-policy-token]
 [--change-reference]
 [--databases]
 [--failover-mode {Manual, None}]
 [--instance-ag-name --instance-availability-group-name]
 [--instance-link-role {Primary, Secondary}]
 [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
 [--partner-ag-name --partner-availability-group-name]
 [--partner-endpoint]
 [--seeding-mode {Automatic, Manual}]

Examples

Create a Managed Instance link with minimal properties.

az sql mi link create -g testrg --mi testcl --name link1 --instance-ag-name instanceAg --partner-ag-name partnerAg --partner-endpoint TCP://SERVER:7022 --databases "[{database-name:testdb}]"

Required Parameters

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

Name of the managed instance.

--link-name --name -n

Managed Instance link name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--databases

Databases in the distributed availability group Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Properties Arguments
--failover-mode

The link failover mode - can be Manual if intended to be used for two-way failover with a supported SQL Server, or None for one-way failover to Azure.

Property Value
Parameter group: Properties Arguments
Accepted values: Manual, None
--instance-ag-name --instance-availability-group-name

Managed instance side availability group name.

Property Value
Parameter group: Properties Arguments
--instance-link-role

Managed instance side link role.

Property Value
Parameter group: Properties Arguments
Accepted values: Primary, Secondary
--no-wait

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

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--partner-ag-name --partner-availability-group-name

SQL server side availability group name.

Property Value
Parameter group: Properties Arguments
--partner-endpoint

SQL server side endpoint - IP or DNS resolvable name.

Property Value
Parameter group: Properties Arguments
--seeding-mode

Database seeding mode – can be Automatic (default), or Manual for supported scenarios.

Property Value
Parameter group: Properties Arguments
Default value: Automatic
Accepted values: Automatic, Manual

az sql mi link delete

Drop a Managed Instance link between Sql On-Prem and Sql Managed Instance.

az sql mi link delete [--acquire-policy-token]
 [--change-reference]
 [--ids]
 [--instance-name --managed-instance --managed-instance-name --mi]
 [--link-name --name]
 [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
 [--resource-group]
 [--subscription]
 [--yes]

Examples

Initiate a Managed Instance link drop.

az sql mi link delete -g testrg --mi testcl --name link1

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--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.

Property Value
Parameter group: Resource Id Arguments
--instance-name --managed-instance --managed-instance-name --mi

Name of the managed instance.

Property Value
Parameter group: Resource Id Arguments
--link-name --name -n

Managed Instance link name.

Property Value
Parameter group: Resource Id Arguments
--no-wait

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

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--subscription

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

Property Value
Parameter group: Resource Id Arguments
--yes -y

Do not prompt for confirmation.

Property Value
Default value: False

az sql mi link failover

Performs requested failover type in this Managed Instance link.

az sql mi link failover --failover-type {ForcedAllowDataLoss, Planned}
 [--acquire-policy-token]
 [--change-reference]
 [--ids]
 [--instance-name --managed-instance --managed-instance-name --mi]
 [--link-name --name]
 [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
 [--resource-group]
 [--subscription]
 [--yes]

Examples

Failover a Managed Instance link.

az sql mi link failover -g testrg --mi testcl --name link1 --failover-type ForcedAllowDataLoss

Required Parameters

--failover-type

The failover type, can be ForcedAllowDataLoss or Planned.

Property Value
Parameter group: Parameters Arguments
Accepted values: ForcedAllowDataLoss, Planned

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--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.

Property Value
Parameter group: Resource Id Arguments
--instance-name --managed-instance --managed-instance-name --mi

The name of the managed instance.

Property Value
Parameter group: Resource Id Arguments
--link-name --name -n

Managed Instance link name.

Property Value
Parameter group: Resource Id Arguments
--no-wait

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

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--subscription

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

Property Value
Parameter group: Resource Id Arguments
--yes -y

Do not prompt for confirmation.

Property Value
Default value: False

az sql mi link list

Get a list of Managed Instance links in instance.

az sql mi link list --instance-name --managed-instance --managed-instance-name --mi
 --resource-group
 [--max-items]
 [--next-token]

Examples

Lists all Managed Instance links in instance.

az sql mi link list -g testrg --mi testcl

Required Parameters

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

Name of the managed instance.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--max-items

Total number of items to return in the command's output. If the total number of items available is more than the value specified, a token is provided in the command's output. To resume pagination, provide the token value in --next-token argument of a subsequent command.

Property Value
Parameter group: Pagination Arguments
--next-token

Token to specify where to start paginating. This is the token value from a previously truncated response.

Property Value
Parameter group: Pagination Arguments

az sql mi link show

Get a Managed Instance link info.

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

Examples

Gets the Managed Instance link info.

az sql mi link show -g testrg --mi testcl --name link1

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

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

Property Value
Parameter group: Resource Id Arguments
--instance-name --managed-instance --managed-instance-name --mi

Name of the managed instance.

Property Value
Parameter group: Resource Id Arguments
--link-name --name -n

Managed Instance link name.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--subscription

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

Property Value
Parameter group: Resource Id Arguments

az sql mi link update

Update a Managed Instance link replication mode.

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

Examples

Update a Managed Instance link replication mode.

az sql mi link update -g testrg --mi testcl --name link1 --replication-mode Sync

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--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.

Property Value
Parameter group: Resource Id Arguments
--instance-name --managed-instance --managed-instance-name --mi

The name of the managed instance.

Property Value
Parameter group: Resource Id Arguments
--link-name --name -n

Managed Instance link name.

Property Value
Parameter group: Resource Id Arguments
--no-wait

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

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--replication-mode

Replication mode of the link.

Property Value
Parameter group: Properties Arguments
Accepted values: Async, Sync
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--subscription

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

Property Value
Parameter group: Resource Id Arguments

Feedback

Was this page helpful?