Skip to content

Commit b655d7a

Browse files
authored
Merge pull request #22145 from AttinderPalSingh/main
removing limitation
2 parents f6e8a3a + 1d53716 commit b655d7a

8 files changed

Lines changed: 49 additions & 13 deletions
191 KB
Loading
89.1 KB
Loading
31.6 KB
Loading
87.3 KB
Loading
83.2 KB
Loading
108 KB
Loading
72 KB
Loading

azure-sql/database/service-tier-hyperscale-replicas.md

Lines changed: 49 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -73,21 +73,44 @@ Aside from the main scenarios listed above, named replicas offer flexibility and
7373
- Workload-dependent service level objective: as a named replica can have its own service level objective, it is possible to use different named replicas for different workloads and use cases. For example, one named replica could be used to serve Power BI requests, while another can be used to serve data to Apache Spark for Data Science tasks. Each one can have an independent service level objective and scale independently.
7474
- Workload-dependent routing: with up to 30 named replicas, it is possible to use named replicas in groups so that an application can be isolated from another. For example, a group of four named replicas could be used to serve requests coming from mobile applications, while another group two named replicas can be used to serve requests coming from a web application. This approach would allow a fine-grained tuning of performance and costs for each group.
7575

76-
The following example creates a named replica `WideWorldImporters_NR` for database `WideWorldImporters`. The primary replica uses service level objective HS_Gen5_4, while the named replica uses HS_Gen5_2. Both use the same logical server `MyServer`. If you prefer to use REST API directly, this option is also possible: [Databases - Create A Database As Named Replica Secondary](/rest/api/sql/2020-11-01-preview/databases/createorupdate#creates-a-database-as-named-replica-secondary).
76+
The following example creates a named replica `WideWorldImporters_NamedReplica` for database `WideWorldImporters`. The primary replica uses service level objective HS_Gen5_4, while the named replica uses HS_Gen5_2. Both use the same logical server `contosoeast`. If you prefer to use REST API directly, this option is also possible: [Databases - Create A Database As Named Replica Secondary](/rest/api/sql/2020-11-01-preview/databases/createorupdate#creates-a-database-as-named-replica-secondary).
77+
78+
# [Portal](#tab/portal)
79+
80+
1. In the [Azure portal](https://portal.azure.com), browse to the database for which you want to create the named replica.
81+
2. On the SQL Database page, select your database, scroll to **Data management**, select **Replicas**, and then select **Create replica**.
82+
83+
:::image type="content" source="./media/named-replicas-configure-portal\azure-create-named-replicas.png" alt-text="Screenshot that shows create named replica step.":::
84+
3. Choose Named replica under Replica configuration, select or create the server for the named replica, enter named replica database name and configure the **Compute + storage** options if necessary.
85+
86+
:::image type="content" source="./media/named-replicas-configure-portal/azure-choose-named-replica.png" alt-text="Screenshot that shows configuration of named replica.":::
87+
88+
4. Click **Review + create**, review the information, and then click **Create**.
89+
5. The named replica deployment process begins.
90+
91+
:::image type="content" source="./media/named-replicas-configure-portal/azure-deployment-named-replica.png" alt-text="Screenshot that shows named replica deployment status.":::
92+
93+
6. When the deployment is complete, the named replica displays its status.
94+
95+
:::image type="content" source="./media/named-replicas-configure-portal/azure-deployment-complete-named-replica.png" alt-text="Screenshot that shows named replica status after deployment.":::
96+
97+
7. Return to the primary database page, and then select **Replicas**. Your named replica is listed under **Named replicas**.
98+
99+
:::image type="content" source="./media/named-replicas-configure-portal/azure-named-replicas.png" alt-text="Screenshot that shows the SQL database primary and named replica.":::
77100

78101
# [T-SQL](#tab/tsql)
79102
```sql
80103
ALTER DATABASE [WideWorldImporters]
81-
ADD SECONDARY ON SERVER [MyServer]
82-
WITH (SERVICE_OBJECTIVE = 'HS_Gen5_2', SECONDARY_TYPE = Named, DATABASE_NAME = [WideWorldImporters_NR]);
104+
ADD SECONDARY ON SERVER [contosoeast]
105+
WITH (SERVICE_OBJECTIVE = 'HS_Gen5_2', SECONDARY_TYPE = Named, DATABASE_NAME = [WideWorldImporters_NamedReplica]);
83106
```
84107
# [PowerShell](#tab/azure-powershell)
85108
```azurepowershell
86-
New-AzSqlDatabaseSecondary -ResourceGroupName "MyResourceGroup" -ServerName "MyServer" -DatabaseName "WideWorldImporters" -PartnerResourceGroupName "MyResourceGroup" -PartnerServerName "MyServer" -PartnerDatabaseName "WideWorldImporters_NR" -SecondaryType Named -SecondaryServiceObjectiveName HS_Gen5_2
109+
New-AzSqlDatabaseSecondary -ResourceGroupName "MyResourceGroup" -ServerName "contosoeast" -DatabaseName "WideWorldImporters" -PartnerResourceGroupName "MyResourceGroup" -PartnerServerName "contosoeast" -PartnerDatabaseName "WideWorldImporters_NamedReplica" -SecondaryType Named -SecondaryServiceObjectiveName HS_Gen5_2
87110
```
88111
# [Azure CLI](#tab/azure-cli)
89112
```azurecli
90-
az sql db replica create -g MyResourceGroup -n WideWorldImporters -s MyServer --secondary-type named --partner-database WideWorldImporters_NR --partner-server MyServer --service-objective HS_Gen5_2
113+
az sql db replica create -g MyResourceGroup -n WideWorldImporters -s contosoeast --secondary-type named --partner-database WideWorldImporters_NamedReplica --partner-server contosoeast --service-objective HS_Gen5_2
91114
```
92115

93116
---
@@ -105,38 +128,51 @@ Just like for HA replicas, even though the primary, HA, and named replicas share
105128

106129
### Modifying a named replica
107130

108-
You can define the service level objective of a named replica when you create it, via the `ALTER DATABASE` command or in any other supported way (AZ CLI, PowerShell, REST API). If you need to change the service level objective after the named replica has been created, you can do it using the `ALTER DATABASE ... MODIFY` command on the named replica itself. For example, if `WideWorldImporters_NR` is the named replica of `WideWorldImporters` database, you can do it as shown below.
131+
You can define the service level objective of a named replica when you create it, via the `ALTER DATABASE` command or in any other supported way (Portal, AZ CLI, PowerShell, REST API). If you need to change the service level objective after the named replica has been created, you can do it using the `ALTER DATABASE ... MODIFY` command on the named replica itself. For example, if `WideWorldImporters_NamedReplica` is the named replica of `WideWorldImporters` database, you can do it as shown below.
132+
133+
# [Portal](#tab/portal)
134+
135+
Open named replica database page, and then select **Compute + storage**. Update the vCores.
136+
137+
:::image type="content" source="./media/named-replicas-configure-portal/azure-update-named-replica.png" alt-text="Screenshot that shows named replica service level objective update.":::
109138

110139
# [T-SQL](#tab/tsql)
111140
```sql
112-
ALTER DATABASE [WideWorldImporters_NR] MODIFY (SERVICE_OBJECTIVE = 'HS_Gen5_4')
141+
ALTER DATABASE [WideWorldImporters_NamedReplica] MODIFY (SERVICE_OBJECTIVE = 'HS_Gen5_4')
113142
```
114143
# [PowerShell](#tab/azure-powershell)
115144
```azurepowershell
116-
Set-AzSqlDatabase -ResourceGroup "MyResourceGroup" -ServerName "MyServer" -DatabaseName "WideWorldImporters_NR" -RequestedServiceObjectiveName "HS_Gen5_4"
145+
Set-AzSqlDatabase -ResourceGroup "MyResourceGroup" -ServerName "contosoeast" -DatabaseName "WideWorldImporters_NamedReplica" -RequestedServiceObjectiveName "HS_Gen5_4"
117146
```
118147
# [Azure CLI](#tab/azure-cli)
119148
```azurecli
120-
az sql db update -g MyResourceGroup -s MyServer -n WideWorldImporters_NR --service-objective HS_Gen5_4
149+
az sql db update -g MyResourceGroup -s contosoeast -n WideWorldImporters_NamedReplica --service-objective HS_Gen5_4
121150
```
122151

123152
---
124153

125154
### Removing a named replica
126155

127-
To remove a named replica, you drop it just like you would a regular database. Make sure you are connected to the `master` database of the server with the named replica you want to drop, and then use the following command:
156+
To remove a named replica, you drop it just like you would a regular database.
157+
158+
# [Portal](#tab/portal)
159+
160+
Open named replica database page, and choose `Delete` option.
161+
162+
:::image type="content" source="./media/named-replicas-configure-portal/azure-delete-named-replicas.png" alt-text="Screenshot that shows deletion of named replica.":::
128163

129164
# [T-SQL](#tab/tsql)
165+
Make sure you are connected to the `master` database of the server with the named replica you want to drop, and then use the following command:
130166
```sql
131-
DROP DATABASE [WideWorldImporters_NR];
167+
DROP DATABASE [WideWorldImporters_NamedReplica];
132168
```
133169
# [PowerShell](#tab/azure-powershell)
134170
```azurepowershell
135-
Remove-AzSqlDatabase -ResourceGroupName "MyResourceGroup" -ServerName "MyServer" -DatabaseName "WideWorldImporters_NR"
171+
Remove-AzSqlDatabase -ResourceGroupName "MyResourceGroup" -ServerName "contosoeast" -DatabaseName "WideWorldImporters_NamedReplica"
136172
```
137173
# [Azure CLI](#tab/azure-cli)
138174
```azurecli
139-
az sql db delete -g MyResourceGroup -s MyServer -n WideWorldImporters_NR
175+
az sql db delete -g MyResourceGroup -s contosoeast -n WideWorldImporters_NamedReplica
140176
```
141177
---
142178

0 commit comments

Comments
 (0)