1
0
mirror of https://github.com/Microsoft/sql-server-samples.git synced 2025-12-08 14:58:54 +00:00
Files
sql-server-samples/samples/databases/wide-world-importers/sample-scripts/dynamic-data-masking
Jos de Bruijn 8a7fdb4253 adding sample script for data masking
submitting on behalf of Rick Davis
2016-10-20 10:45:02 -07:00
..

Sample for use of Dynamic Data Masking in WideWorldImporters

This script demonstrates the use of Dynamic Data Masking to mask sensitive data for certain users.

Contents

About this sample
Before you begin
Running the sample
Sample details
Disclaimers
Related links

About this sample

  1. Applies to: SQL Server 2016 (or higher), Azure SQL Database
  2. Key features: Dynamic Data Masking
  3. Workload: OLTP
  4. Programming Language: T-SQL
  5. Author: Rick Davis
  6. Update history: 20 October 2016 - initial revision

Before you begin

To run this sample, you need the following prerequisites.

Software prerequisites:

  1. SQL Server 2016 (or higher) or Azure SQL Database.
  • With SQL Server, make sure SQL authentication is enabled.
  1. SQL Server Management Studio
  2. The WideWorldImporters database.

Running the sample

  1. Open the script DemonstrateDDM.sql in Management Studio and connect to the WideWorldImporters database.

  2. Follow the instructions in the script.

Sample details

The WideWorldImporters sample database leverages Dynamic Data Masking to mask sensitive banking data in the table 'Purchasing.Suppliers'.

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.

The user 'GreatLakesSales' is an example unprivileged user, and will only see the masked values.

Disclaimers

The code included in this sample is not intended to be used for production purposes.

For more information, see these articles: