|
| 1 | +# Sample for use of Dynamic Data Masking in WideWorldImporters |
| 2 | + |
| 3 | +This script demonstrates the use of Dynamic Data Masking to mask sensitive data for certain users. |
| 4 | + |
| 5 | + |
| 6 | +### Contents |
| 7 | + |
| 8 | +[About this sample](#about-this-sample)<br/> |
| 9 | +[Before you begin](#before-you-begin)<br/> |
| 10 | +[Running the sample](#run-this-sample)<br/> |
| 11 | +[Sample details](#sample-details)<br/> |
| 12 | +[Disclaimers](#disclaimers)<br/> |
| 13 | +[Related links](#related-links)<br/> |
| 14 | + |
| 15 | + |
| 16 | +<a name=about-this-sample></a> |
| 17 | + |
| 18 | +## About this sample |
| 19 | + |
| 20 | +<!-- Delete the ones that don't apply --> |
| 21 | +1. **Applies to:** SQL Server 2016 (or higher), Azure SQL Database |
| 22 | +1. **Key features:** Dynamic Data Masking |
| 23 | +1. **Workload:** OLTP |
| 24 | +1. **Programming Language:** T-SQL |
| 25 | +1. **Author:** Rick Davis |
| 26 | +1. **Update history:** 20 October 2016 - initial revision |
| 27 | + |
| 28 | +<a name=before-you-begin></a> |
| 29 | + |
| 30 | +## Before you begin |
| 31 | + |
| 32 | +To run this sample, you need the following prerequisites. |
| 33 | + |
| 34 | +**Software prerequisites:** |
| 35 | + |
| 36 | +<!-- Examples --> |
| 37 | +1. SQL Server 2016 (or higher) or Azure SQL Database. |
| 38 | + - With SQL Server, make sure SQL authentication is enabled. |
| 39 | +2. SQL Server Management Studio |
| 40 | +3. The WideWorldImporters database. |
| 41 | + |
| 42 | +<a name=run-this-sample></a> |
| 43 | + |
| 44 | +## Running the sample |
| 45 | + |
| 46 | +1. Open the script DemonstrateDDM.sql in Management Studio and connect to the WideWorldImporters database. |
| 47 | + |
| 48 | +2. Follow the instructions in the script. |
| 49 | + |
| 50 | +## Sample details |
| 51 | + |
| 52 | +The WideWorldImporters sample database leverages Dynamic Data Masking to mask sensitive banking data in the table 'Purchasing.Suppliers'. |
| 53 | + |
| 54 | +When connecting to the database and running a query using a privileged user such as the database owner, you will see the sensitive data in the clear. |
| 55 | + |
| 56 | +The user 'GreatLakesSales' is an example unprivileged user, and will only see the masked values. |
| 57 | + |
| 58 | +<a name=disclaimers></a> |
| 59 | + |
| 60 | +## Disclaimers |
| 61 | +The code included in this sample is not intended to be used for production purposes. |
| 62 | + |
| 63 | +<a name=related-links></a> |
| 64 | + |
| 65 | +## Related Links |
| 66 | +For more information, see these articles: |
| 67 | +- [Row-Level Security documentation](https://msdn.microsoft.com/library/dn765131.aspx) |
| 68 | +- [Row-Level Security SQL Server 2016 (video)](https://channel9.msdn.com/Events/DataDriven/SQLServer2016/Row-Level-Security) |
0 commit comments