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/azure-sql/database/dynamic-data-masking-overview.md
+163-3Lines changed: 163 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,10 +7,10 @@ ms.subservice: security
7
7
ms.custom: sqldbrb=1
8
8
ms.devlang:
9
9
ms.topic: conceptual
10
-
author: DavidTrigano
11
-
ms.author: datrigan
10
+
author: Madhumitatripathy
11
+
ms.author: matripathy
12
12
ms.reviewer: kendralittle, vanto, mathoma
13
-
ms.date: 09/12/2021
13
+
ms.date: 04/05/2022
14
14
tags: azure-synpase
15
15
---
16
16
# Dynamic data masking
@@ -99,6 +99,166 @@ Write:
99
99
100
100
To learn more about permissions when using dynamic data masking with T-SQL command, see [Permissions](/sql/relational-databases/security/dynamic-data-masking#permissions)
101
101
102
+
## Granular permission example
103
+
104
+
Prevent unauthorized access to sensitive data and gain control by masking it to an unauthorized user at different levels of the database. You can grant or revoke UNMASK permission at the database-level, schema-level, table-level or at the column-level to a user. Using UNMASK permission provides a more granular way to control and limit unauthorized access to data stored in the database and improve data security management.
105
+
106
+
1. Create schema to contain user tables
107
+
108
+
```sql
109
+
CREATESCHEMAData;
110
+
GO
111
+
```
112
+
113
+
1. Create table with masked columns
114
+
115
+
```sql
116
+
CREATETABLEData.Membership (
117
+
MemberID int IDENTITY(1,1) NOT NULLPRIMARY KEY CLUSTERED,
118
+
FirstName varchar(100) MASKED WITH (FUNCTION ='partial(1, "xxxxx", 1)') NULL,
119
+
LastName varchar(100) NOT NULL,
120
+
Phone varchar(12) MASKED WITH (FUNCTION ='default()') NULL,
121
+
Email varchar(100) MASKED WITH (FUNCTION ='email()') NOT NULL,
122
+
DiscountCode smallint MASKED WITH (FUNCTION ='random(1, 100)') NULL,
123
+
BirthDay datetime MASKED WITH (FUNCTION ='default()') NULL
0 commit comments