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: azure-sql/database/service-tier-hyperscale-replicas.md
+49-13Lines changed: 49 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,21 +73,44 @@ Aside from the main scenarios listed above, named replicas offer flexibility and
73
73
- 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.
74
74
- 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.
75
75
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.":::
77
100
78
101
# [T-SQL](#tab/tsql)
79
102
```sql
80
103
ALTERDATABASE [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]);
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
91
114
```
92
115
93
116
---
@@ -105,38 +128,51 @@ Just like for HA replicas, even though the primary, HA, and named replicas share
105
128
106
129
### Modifying a named replica
107
130
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.":::
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
121
150
```
122
151
123
152
---
124
153
125
154
### Removing a named replica
126
155
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.":::
128
163
129
164
# [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:
0 commit comments