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
This article shows you how to implement [dynamic data masking](dynamic-data-masking-overview.md) with the Azure portal. You can also implement dynamic data masking using [Azure SQL Database cmdlets](/powershell/module/az.sql/) or the [REST API](/rest/api/sql/).
19
+
This article shows you how to implement [dynamic data masking](dynamic-data-masking-overview.md) with the Azure portal. You can also implement dynamic data masking using [Azure SQL Database PowerShell cmdlets](/powershell/module/az.sql/) or the [REST API](/rest/api/sql/).
17
20
18
21
> [!NOTE]
19
-
> This feature cannot be set using portal for SQL Managed Instance (use PowerShell or REST API). For more information, see [Dynamic Data Masking](/sql/relational-databases/security/dynamic-data-masking).
22
+
> This feature cannot be set using the Azure portal for Azure SQL Managed Instance (use PowerShell or REST API). For more information, see [Dynamic Data Masking](/azure/azure-sql/database/dynamic-data-masking-overview?view=azuresql-mi&preserve-view=true).
20
23
21
24
## Enable dynamic data masking
22
25
23
26
1. Launch the Azure portal at [https://portal.azure.com](https://portal.azure.com).
24
-
2. Go to your database resource in the Azure portal.
25
-
3. Select the **Dynamic Data Masking** pane under the **Security** section.
26
-
27
-

28
-
29
-
4. In the **Dynamic Data Masking** configuration page, you may see some database columns that the recommendations engine has flagged for masking. In order to accept the recommendations, just click **Add Mask** for one or more columns and a mask is created based on the default type for this column. You can change the masking function by clicking on the masking rule and editing the masking field format to a different format of your choice. Be sure to click **Save** to save your settings.
27
+
1. Go to your database resource in the Azure portal.
28
+
1. Under the **Security** section, select **Dynamic Data Masking**.
29
+
1. In the **Dynamic Data Masking** configuration page, you might see some database columns that the recommendations engine has flagged for masking. In order to accept the recommendations, select **Add Mask** for one or more columns, and a mask is created based on the default type for this column. You can change the masking function by selecting on the masking rule and editing the masking field format to a different format of your choice. Select **Save** to save your settings. In the following screenshot, you can see recommended dynamic data masks for the sample `AdventureWorksLT` database.
30
30
31
-

31
+
:::image type="content" source="media/dynamic-data-masking-configure-portal/recommendations.png" alt-text="Screenshot that shows the Dynamic Data Masking configuration page, based on the AdventureWorksLT sample database." lightbox="media/dynamic-data-masking-configure-portal/recommendations.png":::
32
32
33
-
5. To add a mask for any column in your database, at the top of the **Dynamic Data Masking** configuration page, click**Add Mask** to open the **Add Masking Rule** configuration page.
33
+
1. To add a mask for any column in your database, at the top of the **Dynamic Data Masking** configuration page, select**Add Mask** to open the **Add Masking Rule** configuration page.
34
34
35
-

35
+
:::image type="content" source="media/dynamic-data-masking-configure-portal/add-mask.png" alt-text="Screenshot that shows the Add Masking Rule configuration page." lightbox="media/dynamic-data-masking-configure-portal/add-mask.png":::
36
36
37
-
6. Select the **Schema**, **Table** and **Column** to define the designated field for masking.
38
-
7.**Select how to mask** from the list of sensitive data masking categories.
37
+
1. Select the **Schema**, **Table** and **Column** to define the designated field for masking.
38
+
1.**Select how to mask** from the list of sensitive data masking categories.
39
39
40
-

40
+
:::image type="content" source="media/dynamic-data-masking-configure-portal/mask-field-format.png" alt-text="Screenshot that shows the sensitive data masking categories under the Select how to mask section." lightbox="media/dynamic-data-masking-configure-portal/mask-field-format.png":::
41
41
42
-
8. Click**Add** in the data masking rule page to update the set of masking rules in the dynamic data masking policy.
43
-
9. Type the SQL authenticated users or authenticated identities from Microsoft Entra ID ([formerly Azure Active Directory](/entra/fundamentals/new-name)) that should be excluded from masking, and have access to the unmasked sensitive data. This should be a semicolon-separated list of users. Users with administrator privileges always have access to the original unmasked data.
42
+
1. Select**Add** in the data masking rule page to update the set of masking rules in the dynamic data masking policy.
43
+
1. Type the SQL authenticated users or authenticated identities from Microsoft Entra ID ([formerly Azure Active Directory](/entra/fundamentals/new-name)) that should be excluded from masking, and have access to the unmasked sensitive data. This should be a semicolon-separated list of users. Users with administrator privileges always have access to the original unmasked data.
:::image type="content" source="media/dynamic-data-masking-configure-portal/excluded-users.png" alt-text="Screenshot from the Azure portal of the SQL users excluded from masking (administrators are always excluded) list box.":::
46
46
47
47
> [!TIP]
48
48
> To make it so the application layer can display sensitive data for application privileged users, add the SQL user or Microsoft Entra identity the application uses to query the database. It is highly recommended that this list contain a minimal number of privileged users to minimize exposure of the sensitive data.
49
49
50
-
10. Click**Save** in the data masking configuration page to save the new or updated masking policy.
50
+
1. Select**Save** in the data masking configuration page to save the new or updated masking policy.
51
51
52
-
## Next steps
52
+
## Related content
53
53
54
-
- For an overview of dynamic data masking, see [dynamic data masking](dynamic-data-masking-overview.md).
55
-
- You can also implement dynamic data masking using [Azure SQL Database cmdlets](/powershell/module/az.sql/) or the [REST API](/rest/api/sql/).
54
+
-[Dynamic data masking](dynamic-data-masking-overview.md)
Easily manage your existing scaled-out sharded databases using tools (such as the [Elastic Database client library](elastic-database-client-library.md)). First convert an existing set of databases to use the [shard map manager](elastic-scale-shard-map-management.md).
19
+
Easily manage your existing scaled-out sharded databases using tools (such as the [Building scalable cloud databases](elastic-database-client-library.md)). First convert an existing set of databases to use the [shard map manager](elastic-scale-shard-map-management.md).
17
20
18
21
## Overview
19
22
20
23
To migrate an existing sharded database:
21
24
22
25
1. Prepare the [shard map manager database](elastic-scale-shard-map-management.md).
23
-
2. Create the shard map.
24
-
3. Prepare the individual shards.
25
-
4. Add mappings to the shard map.
26
+
1. Create the shard map.
27
+
1. Prepare the individual shards.
28
+
1. Add mappings to the shard map.
26
29
27
30
These techniques can be implemented using either the [.NET Framework client library](https://www.nuget.org/packages/Microsoft.Azure.SqlDatabase.ElasticScale.Client/), or the PowerShell scripts found at [Azure SQL Database - Elastic Database tools scripts](https://github.com/Azure/elastic-db-tools/tree/master/Samples/PowerShell). The examples here use the PowerShell scripts.
Select the type of shard map to create. The choice depends on the database architecture:
57
62
58
63
1. Single tenant per database (For terms, see the [glossary](elastic-scale-glossary.md).)
59
-
2. Multiple tenants per database (two types):
64
+
1. Multiple tenants per database (two types):
60
65
1. List mapping
61
-
2. Range mapping
66
+
1. Range mapping
62
67
63
68
For a single-tenant model, create a **list mapping** shard map. The single-tenant model assigns one database per tenant. This is an effective model for SaaS developers as it simplifies management.
64
69
65
-
![List mapping][1]
70
+
:::image type="content" source="media/elastic-convert-to-use-elastic-tools/listmapping.png" alt-text="Diagram of list mapping.":::
66
71
67
72
The multi-tenant model assigns several tenants to an individual database (and you can distribute groups of tenants across multiple databases). Use this model when you expect each tenant to have small data needs. In this model, assign a range of tenants to a database using **range mapping**.
68
73
69
-
![Range mapping][2]
74
+
:::image type="content" source="media/elastic-convert-to-use-elastic-tools/rangemapping.png" alt-text="Diagram of range mapping.":::
70
75
71
76
Or you can implement a multi-tenant database model using a *list mapping* to assign multiple tenants to an individual database. For example, DB1 is used to store information about tenant ID 1 and 5, and DB2 stores data for tenant 7 and tenant 10.
72
77
73
-
![Multiple tenants on single DB][3]
78
+
:::image type="content" source="media/elastic-convert-to-use-elastic-tools/multipleonsingledb.png" alt-text="Diagram of multiple tenants on single DB.":::
74
79
75
80
**Based on your choice, choose one of these options:**
76
81
@@ -99,7 +104,7 @@ Setting up this pattern also requires creation of a list map as shown in step 2,
99
104
100
105
## Step 3: Prepare individual shards
101
106
102
-
Add each shard (database) to the shard map manager. This prepares the individual databases for storing mapping information. Execute this method on each shard.
107
+
Add each shard (database) to the shard map manager. This prepares the individual databases for storing mapping information. Execute this method on each shard. The `$ShardMap` is the shard map created in [step 2](#step-2-create-the-shard-map).
@@ -112,29 +117,31 @@ The addition of mappings depends on the kind of shard map you created. If you cr
112
117
113
118
### Option 1: Map the data for a list mapping
114
119
115
-
Map the data by adding a list mapping for each tenant.
120
+
Map the data by adding a list mapping for each tenant. Use the following sample PowerShell script to create the mappings and associate them with the new shards.
116
121
117
122
```powershell
118
-
# Create the mappings and associate it with the new shards
123
+
# Create the mapping and associate it with the new shards
Add the range mappings for all the tenant ID range - database associations:
129
+
Add the range mappings for all the tenant ID range - database associations. Use the following sample PowerShell script to create the mappings and associate them with the new shards.
125
130
126
131
```powershell
127
-
# Create the mappings and associate it with the new shards
132
+
# Create the mapping and associate it with the new shards
Once you have completed the setup, you can begin to use the Elastic Database client library. You can also use [data-dependent routing](elastic-scale-data-dependent-routing.md) and [multi-shard query](elastic-scale-multishard-querying.md).
148
155
149
-
## Next steps
150
-
151
-
Get the PowerShell scripts from [Azure Elastic Database tools scripts](https://github.com/Azure/elastic-db-tools/tree/master/Samples/PowerShell).
152
-
153
-
The Elastic database tools client library is available on GitHub: [Azure/elastic-db-tools](https://github.com/Azure/elastic-db-tools).
154
-
155
-
Use the split-merge tool to move data to or from a multi-tenant model to a single tenant model. See [Split merge tool](elastic-scale-configure-deploy-split-and-merge.md).
156
-
157
-
## Additional resources
158
-
159
-
For information on common data architecture patterns of multi-tenant software-as-a-service (SaaS) database applications, see [Design Patterns for Multi-tenant SaaS Applications with Azure SQL Database](saas-tenancy-app-design-patterns.md).
160
-
161
-
## Questions and feature requests
162
-
163
-
For questions, use the [Microsoft Q&A question page for SQL Database](/answers/topics/azure-sql-database.html) and for feature requests, add them to the [SQL Database feedback forum](https://feedback.azure.com/d365community/forum/04fe6ee0-3b25-ec11-b6e6-000d3a4f0da0).
0 commit comments