You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/sql-database/scripts/sql-database-add-managed-instance-to-failover-group-cli.md
+20-32Lines changed: 20 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,57 +14,45 @@ ms.date: 07/16/2019
14
14
---
15
15
# Use CLI to add an Azure SQL Database managed instance to a failover group
16
16
17
-
This PowerShell script example creates two managed instances, adds them to a failover group, and then tests failover from the primary managed instance to the secondary managed instance.
17
+
This Azure CLI example creates two managed instances, adds them to a failover group, and then tests failover from the primary managed instance to the secondary managed instance.
If you choose to install and use the CLI locally, this article requires that you are running the Azure CLI version 2.0 or later. Run `az --version` to find the version. If you need to install or upgrade, see [Install the Azure CLI](/cli/azure/install-azure-cli).
If you choose to install and use the CLI locally, this article requires that you are running the Azure CLI version 2.0 or later. Run `az --version` to find the version. If you need to install or upgrade, see [Install the Azure CLI](/cli/azure/install-azure-cli).
[!code-azurecli-interactive[main](../../../cli_scripts/sql-database/failover-groups/add-managed-instance-to-failover-group-az-cli.sh"Add managed instance to a failover group")]
28
30
29
-
## Clean up deployment
31
+
###Clean up deployment
30
32
31
33
Use the following command to remove the resource group and all resources associated with it. You will need to remove the resource group twice. Removing the resource group the first time will remove the managed instance and virtual clusters but will then fail with the error message `az group delete : Long running operation failed with status 'Conflict'.`. Run the az group delete command a second time to remove any residual resources as well as the resource group.
32
34
33
35
```azurecli-interactive
34
-
az group delete --name $resourceGroupName
36
+
az group delete --name $resource
35
37
```
36
38
37
-
## Script explanation
39
+
## Sample reference
38
40
39
41
This script uses the following commands. Each command in the table links to command specific documentation.
40
42
41
-
|Command | Notes|
43
+
|||
42
44
|---|---|
43
-
|[az group create](/cli/azure/group#az-group-create)| Creates a resource group in which all resources are stored. |
44
-
|[az network vnet create](/cli/azure/network/vnet#az-network-vnet-create)| Creates a virtual network. |
45
-
|[az network vnet subnet create](/cli/azure/network/vnet/subnet#az-network-vnet-subnet-create)| Adds a subnet configuration to a virtual network. |
46
-
|[az network vnet show](/cli/azure/network/vnet#az-network-vnet-show)| Gets a virtual network in a resource group. |
47
-
|[az network vnet subnet show](/cli/azure/network/vnet/subnet#az-network-vnet-subnet-show)| Gets a subnet in a virtual network. |
48
-
|[az network nsg create](/cli/azure/network/nsg#az-network-nsg-create)| Creates a network security group. |
49
-
|[az network route-table create](/cli/azure/network/route-table#az-network-route-table-create)| Creates a route table. |
50
-
|[az network vnet subnet update](/cli/azure/network/vnet/subnet#az-network-vnet-subnet-update)| Updates a subnet configuration for a virtual network. |
51
-
|[az network vnet update](/cli/azure/network/vnet#az-network-vnet-update)| Updates a virtual network. |
52
-
|[az network nsg show](/cli/azure/network/nsg#az-network-nsg-show)| Gets a network security group. |
53
-
|[az network nsg rule create](/cli/azure/network/nsg/rule#az-network-nsg-rule-create)| Adds a network security rule configuration to a network security group. |
|[az sql instance-failover-group set-primary](/cli/azure/sql/instance-failover-group#az-sql-instance-failover-group-set-primary)| Executes a failover of a managed instance failover group. |
64
-
|[az group delete](/cli/azure/vm/extension#az-vm-extension-set)| Deletes a resource group including all nested resources. |
Copy file name to clipboardExpand all lines: articles/sql-database/scripts/sql-database-add-single-db-to-failover-group-cli.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,18 +12,18 @@ ms.author: mathoma
12
12
ms.reviewer: carlrab
13
13
ms.date: 07/16/2019
14
14
---
15
-
# Use CLI to add an Azure SQL Database single database into a failover group
15
+
# Use CLI to add an Azure SQL Database into a failover group
16
16
17
17
This Azure CLI script example creates a single database, creates a failover group, adds the database to it, and tests failover.
18
18
19
19
If you choose to install and use the CLI locally, this topic requires that you are running the Azure CLI version 2.0 or later. Run `az --version` to find the version. If you need to install or upgrade, see [Install the Azure CLI](/cli/azure/install-azure-cli).
Copy file name to clipboardExpand all lines: articles/sql-database/scripts/sql-database-create-and-configure-database-cli.md
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,38 +16,38 @@ ms.date: 06/25/2019
16
16
17
17
This Azure CLI script example creates an Azure SQL database and configure a server-level firewall rule. Once the script has been successfully run, the SQL Database can be accessed from all Azure services and the configured IP address.
If you choose to install and use the CLI locally, this topic requires that you are running the Azure CLI version 2.0 or later. Run `az --version` to find the version. If you need to install or upgrade, see [Install the Azure CLI](/cli/azure/install-azure-cli).
Use the following command to remove the resource group and all resources associated with it.
32
34
33
35
```azurecli-interactive
34
-
az group delete --name $resourceGroupName
36
+
az group delete --name $resource
35
37
```
36
38
37
-
## Script explanation
39
+
## Sample reference
38
40
39
41
This script uses the following commands. Each command in the table links to command specific documentation.
40
42
41
-
|Command | Notes|
43
+
|||
42
44
|---|---|
43
-
|[az group create](/cli/azure/group#az-group-create)| Creates a resource group in which all resources are stored. |
44
-
|[az sql server create](/cli/azure/sql/server#az-sql-server-create)| Creates a SQL Database server that hosts a single database or elastic pool. |
45
-
|[az sql server firewall create](/cli/azure/sql/server/firewall-rule#az-sql-server-firewall-rule-create)| Creates a firewall rule to allow access to all single databases an elastic pools on the SQL Database server from the entered IP address range. |
46
-
|[az sql db create](/cli/azure/sql/db#az-sql-db-create)| Creates a single database or elastic pool. |
47
-
|[az group delete](/cli/azure/resource#az-resource-delete)| Deletes a resource group including all nested resources. |
45
+
|[az sql server](/cli/azure/sql/server#az-sql-server-create)| Server commands |
46
+
|[az sql server firewall](/cli/azure/sql/server/firewall-rule#az-sql-server-firewall-rule-create)| Server firewall commands. |
Copy file name to clipboardExpand all lines: articles/sql-database/scripts/sql-database-create-configure-managed-instance-cli.md
+15-21Lines changed: 15 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,45 +19,39 @@ This Azure CLI script example creates an Azure SQL Database managed instance in
19
19
> [!IMPORTANT]
20
20
> For limitations, see [supported regions](../sql-database-managed-instance-resource-limits.md#supported-regions) and [supported subscription types](../sql-database-managed-instance-resource-limits.md#supported-subscription-types).
If you choose to install and use the CLI locally, this article requires that you are running the Azure CLI version 2.0 or later. Run `az --version` to find the version. If you need to install or upgrade, see [Install the Azure CLI](/cli/azure/install-azure-cli).
Use the following command to remove the resource group and all resources associated with it.
35
37
36
38
```azurecli-interactive
37
-
az group delete --name $resourceGroupName
39
+
az group delete --name $resource
38
40
```
39
41
40
-
## Script explanation
42
+
## Sample reference
41
43
42
44
This script uses the following commands. Each command in the table links to command specific documentation.
43
45
44
-
|Command | Notes|
46
+
|||
45
47
|---|---|
46
-
|[az group create](/cli/azure/group#az-group-create)| Creates a resource group in which all resources are stored. |
47
-
|[az network vnet create](/cli/azure/network/vnet#az-network-vnet-create)| Creates a virtual network. |
48
-
|[az network vnet subnet create](/cli/azure/network/vnet/subnet#az-network-vnet-subnet-create)| Adds a subnet configuration to a virtual network. |
49
-
|[az network vnet show](/cli/azure/network/vnet#az-network-vnet-show)| Gets a virtual network in a resource group. |
50
-
|[az network vnet update](/cli/azure/network/vnet#az-network-vnet-update)| Sets the goal state for a virtual network. |
51
-
|[az network vnet subnet show](/cli/azure/network/vnet/subnet#az-network-vnet-subnet-show)| Gets a subnet in a virtual network |
52
-
|[az network vnet subnet update](/cli/azure/network/vnet/subnet#az-network-vnet-subnet-update)| Configures the goal state for a subnet configuration in a virtual network. |
53
-
|[az network route-table create](/cli/azure/network/route-table#az-network-route-table-create)| Creates a route table. |
0 commit comments