SlideShare a Scribd company logo
Dynamic data masking sql server 2016
Dynamic Data
Masking
in SQL Server 2016
SQLschool.gr
Team
Antonios Chatzipavlis
SQL Server Evangelist • Trainer
Vassilis Ioannidis
SQL Server Expert • Trainer
Fivi Panopoulou
System Engineer • Speaker
Sotiris Karras
System Engineer • Speaker
Followus
insocialmedia
@sqlschool / @panfivi
fb/sqlschoolgr
yt/c/SqlschoolGr
SQL School Greece group
Helpneeded?
help@sqlschool.gr
DynamicDataMasking
Presentation
Content
 Introducing Dynamic Data Masking
 Using Dynamic Data Masking
 DDM on Azure
 Some points to keep
Introducing Dynamic Data Masking
• Protect sensitive data and personally identifiable
information
• Regulatory Compliance
• Expose sensitive data only on a need-to-know basis
• Custom obfuscation in application, views or third party
solutions are used to address this need
The Need
Dynamic Data Masking in SQL Server 2016
• Built-in feature for SQL Server
2016 and Azure SQL DB
• Data masked on the fly when
queried, underlying data do
not change
• Control on how the data
appear in the result set
 Dynamic data masking is a data protection feature that
masks the sensitive data in the result set of a query over
chosen database fields
• Protects against unauthorized disclosure of sensitive
data in the application
• Very simple to configure and use
• Does not require changes in application code
• Centralized masking logic
Benefits
• “Dynamic data masking does not aim to prevent
database users from connecting directly to the database
and running exhaustive queries that expose pieces of
the sensitive data”
• It is not a method for physical data encryption
• It is complementary to other SQL Server security
features
Keep in mind
Using Dynamic Data Masking
 Steps
 Masking Functions
 Permissions
 System view information
Dynamic data masking sql server 2016
• Decide which columns need to be masked
• Choose the masking function that best fits your needs
for each column
• Alter columns to add the masking rules
• The underlying data is unaffected
• Designate which users should see masked data and
configure the permissions.
Steps
Default
Masking Functions
Data Type Family Masked Data
String XXXX
Numeric 0
Date and Time 01.01.1900 00:00:00.0000000
Binary 0
ALTER COLUMN ColumnName
ADD MASKED WITH (FUNCTION = 'default()')
Full masking according to the data types of the designated
fields.
Email
Masking Functions
ALTER COLUMN ColumnName
ADD MASKED WITH (FUNCTION = ‘email()')
Exposes the first letter of an email address and the constant
suffix ".com", in the form of an email address.
aXXX@XXXX.com
Random
Masking Functions
ALTER COLUMN ColumnName
ADD MASKED WITH (FUNCTION = 'random([start range], [end range])')
A random masking function for use on any numeric type to
mask the original value with a random value within a
specified range.
Custom String (Partial)
Masking Functions
ALTER COLUMN ColumnName
ADD MASKED WITH (FUNCTION = ‘partial(prefix,[padding],suffix)’
Exposes the first and last letters and adds a custom padding
string in the middle
• Phone: partial(4,”XXXXXXXXXXX”,0)
• Credit Card: partial(0,”XXXX-XXXX-XXXX-”,4)
• Email: partial(1,”xxxx@xxxx.”,2)
• To retrieve the original data the user must have the
UNMASK permission
• To add, replace, remove masking of existing columns
ALTER ANY MASK permission
• The CONTROL permission on the database includes
both the ALTER ANY MASK and UNMASK permission
! Users without UNMASK but with UPDATE permission can
still update data.
Permissions
system view to query for table-columns that have a
dynamic data masking function applied to them
• Simlar to sys.columns view
• is_masked
• masking_function
sys.masked_columns
Dynamic Data Masking in
Action
DDM on Azure
Azure
Set up DDM using Azure Portal
• Define users excluded from
masking
• Define Masking rules
• Designated fields and masking
functions for each one
There is a recommendations engine that
proposes potentially sensitive fields to
mask
Azure
Default Full Masking according to the
datatypes
Credit card XXXX-XXXX-XXXX-1234
Social Security
number
XXX-XX-1234
Email aXX@XXXX.com
Random Number Random number between selected
boundaries
Custom Text Prefix, Padding String, Suffix
Some points to keep
 Limitations and Restrictions
 Considerations
 Performance
• Not compatible with Always Encrypted columns
• Not compatible with File Stream
• Not compatible with Column set
• A column with data masking cannot be a key for a
FULLTEXT index.
• Masking rule cannot be defined on a computed column
Limitations and Restrictions
• Dynamic Data Masking is applied when running SQL
Server Import and Export
• Dynamic Data Masking is applied when using SELECT
INTO or INSERT INTO to copy data from a masked
column
• Be careful with updates
Considerations
Minimal Performance Impact
Data masking is performed right before the data is
returned.
Performance
SELECT *
FROM Person.EmailAddress;
Dynamic data masking sql server 2016
Dynamic data masking sql server 2016
S E L E C T K N O W L E D G E F R O M S Q L S E R V E R
Copyright © 2015 SQLschool.gr. All right reserved.
PRESENTER MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION

More Related Content

What's hot (20)

PPT
Database backup & recovery
Mustafa Khan
 
PPTX
SQL locks-presentation
Nuzhat Bhat
 
PPT
Oracle Architecture
Neeraj Singh
 
PPTX
PySpark dataframe
Jaemun Jung
 
PPT
Oracle GoldenGate
oracleonthebrain
 
PDF
Massive Data Processing in Adobe Using Delta Lake
Databricks
 
PDF
Snowflake free trial_lab_guide
slidedown1
 
PDF
Data Security at Scale through Spark and Parquet Encryption
Databricks
 
PDF
Getting Started with Databricks SQL Analytics
Databricks
 
PPTX
MariaDB Galera Cluster
Abdul Manaf
 
PPTX
Physical architecture of sql server
Divya Sharma
 
PPTX
MaxScale이해와활용-2023.11
NeoClova
 
PDF
Data Privacy with Apache Spark: Defensive and Offensive Approaches
Databricks
 
PPTX
Oracle architecture ppt
Deepak Shetty
 
PPT
Your tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
John Kanagaraj
 
PPT
Oracle archi ppt
Hitesh Kumar Markam
 
PDF
Adaptive Query Execution: Speeding Up Spark SQL at Runtime
Databricks
 
PPTX
Snowflake essentials
qureshihamid
 
PPTX
Introduction to NoSQL
PolarSeven Pty Ltd
 
PPT
Oracle backup and recovery
Yogiji Creations
 
Database backup & recovery
Mustafa Khan
 
SQL locks-presentation
Nuzhat Bhat
 
Oracle Architecture
Neeraj Singh
 
PySpark dataframe
Jaemun Jung
 
Oracle GoldenGate
oracleonthebrain
 
Massive Data Processing in Adobe Using Delta Lake
Databricks
 
Snowflake free trial_lab_guide
slidedown1
 
Data Security at Scale through Spark and Parquet Encryption
Databricks
 
Getting Started with Databricks SQL Analytics
Databricks
 
MariaDB Galera Cluster
Abdul Manaf
 
Physical architecture of sql server
Divya Sharma
 
MaxScale이해와활용-2023.11
NeoClova
 
Data Privacy with Apache Spark: Defensive and Offensive Approaches
Databricks
 
Oracle architecture ppt
Deepak Shetty
 
Your tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
John Kanagaraj
 
Oracle archi ppt
Hitesh Kumar Markam
 
Adaptive Query Execution: Speeding Up Spark SQL at Runtime
Databricks
 
Snowflake essentials
qureshihamid
 
Introduction to NoSQL
PolarSeven Pty Ltd
 
Oracle backup and recovery
Yogiji Creations
 

Viewers also liked (10)

PDF
Row level security
Antonios Chatzipavlis
 
PDF
Introduction to Azure Data Lake
Antonios Chatzipavlis
 
PDF
Exploring sql server 2016
Antonios Chatzipavlis
 
PDF
Live Query Statistics & Query Store in SQL Server 2016
Antonios Chatzipavlis
 
PDF
Microsoft SQL Family and GDPR
Antonios Chatzipavlis
 
PDF
Introduction to azure document db
Antonios Chatzipavlis
 
PDF
Introduction to sql database on azure
Antonios Chatzipavlis
 
PDF
Exploring sql server 2016 bi
Antonios Chatzipavlis
 
PDF
Introduction to Machine Learning on Azure
Antonios Chatzipavlis
 
PDF
Azure SQL Data Warehouse
Antonios Chatzipavlis
 
Row level security
Antonios Chatzipavlis
 
Introduction to Azure Data Lake
Antonios Chatzipavlis
 
Exploring sql server 2016
Antonios Chatzipavlis
 
Live Query Statistics & Query Store in SQL Server 2016
Antonios Chatzipavlis
 
Microsoft SQL Family and GDPR
Antonios Chatzipavlis
 
Introduction to azure document db
Antonios Chatzipavlis
 
Introduction to sql database on azure
Antonios Chatzipavlis
 
Exploring sql server 2016 bi
Antonios Chatzipavlis
 
Introduction to Machine Learning on Azure
Antonios Chatzipavlis
 
Azure SQL Data Warehouse
Antonios Chatzipavlis
 
Ad

Similar to Dynamic data masking sql server 2016 (20)

PPTX
Row-level security and Dynamic Data Masking
SolidQ
 
PPTX
Keeping Private Data Private
Dobler Consulting
 
PPTX
A Designer's Favourite Security and Privacy Features in SQL Server and Azure ...
Karen Lopez
 
PPTX
Designer's Favorite New Features in SQLServer
Karen Lopez
 
PPT
SQL Server 2016 Security Features
Sam Nasr, MCSA, MVP
 
PPTX
"Test Data Management In a Nutshell" by Satyajit Singh
Agile Testing Alliance
 
PDF
Data masking a developer's guide
Sriramachandra Murthy
 
PPTX
Snowflake Data Access.pptx
Anup Mukhopadhyay
 
PPTX
2° Ciclo Microsoft CRUI 3° Sessione: l'evoluzione delle piattaforme tecnologi...
Jürgen Ambrosi
 
PDF
Oracle Data Masking
Inprise Group
 
PPTX
Karen's Favourite Features of SQL Server 2016
Karen Lopez
 
PDF
Data masking techniques for Insurance
NIIT Technologies
 
PPTX
Securing SQL Azure DB? How?
Boris Hristov
 
PPTX
MySQL Enterprise Data Masking
Georgi Kodinov
 
PPTX
DevTalks.ro 2019 MySQL Data Masking Talk
Georgi Kodinov
 
PPTX
Securing SQL Azure DB? How?
Boris Hristov
 
PPTX
SQL Server 2016 New Security Features
Gianluca Sartori
 
PDF
Opteamix_whitepaper_Data Masking Strategy.pdf
Opteamix LLC
 
PDF
Data goverance two_8.2.18 - copy
Sandra (Sandy) Dunn
 
PPTX
Seguridad en sql server 2016 y 2017
Maximiliano Accotto
 
Row-level security and Dynamic Data Masking
SolidQ
 
Keeping Private Data Private
Dobler Consulting
 
A Designer's Favourite Security and Privacy Features in SQL Server and Azure ...
Karen Lopez
 
Designer's Favorite New Features in SQLServer
Karen Lopez
 
SQL Server 2016 Security Features
Sam Nasr, MCSA, MVP
 
"Test Data Management In a Nutshell" by Satyajit Singh
Agile Testing Alliance
 
Data masking a developer's guide
Sriramachandra Murthy
 
Snowflake Data Access.pptx
Anup Mukhopadhyay
 
2° Ciclo Microsoft CRUI 3° Sessione: l'evoluzione delle piattaforme tecnologi...
Jürgen Ambrosi
 
Oracle Data Masking
Inprise Group
 
Karen's Favourite Features of SQL Server 2016
Karen Lopez
 
Data masking techniques for Insurance
NIIT Technologies
 
Securing SQL Azure DB? How?
Boris Hristov
 
MySQL Enterprise Data Masking
Georgi Kodinov
 
DevTalks.ro 2019 MySQL Data Masking Talk
Georgi Kodinov
 
Securing SQL Azure DB? How?
Boris Hristov
 
SQL Server 2016 New Security Features
Gianluca Sartori
 
Opteamix_whitepaper_Data Masking Strategy.pdf
Opteamix LLC
 
Data goverance two_8.2.18 - copy
Sandra (Sandy) Dunn
 
Seguridad en sql server 2016 y 2017
Maximiliano Accotto
 
Ad

More from Antonios Chatzipavlis (20)

PPTX
Data virtualization using polybase
Antonios Chatzipavlis
 
PDF
SQL server Backup Restore Revealed
Antonios Chatzipavlis
 
PDF
Migrate SQL Workloads to Azure
Antonios Chatzipavlis
 
PDF
Machine Learning in SQL Server 2019
Antonios Chatzipavlis
 
PDF
Workload Management in SQL Server 2019
Antonios Chatzipavlis
 
PDF
Loading Data into Azure SQL DW (Synapse Analytics)
Antonios Chatzipavlis
 
PDF
Introduction to DAX Language
Antonios Chatzipavlis
 
PDF
Building diagnostic queries using DMVs and DMFs
Antonios Chatzipavlis
 
PDF
Exploring T-SQL Anti-Patterns
Antonios Chatzipavlis
 
PDF
Designing a modern data warehouse in azure
Antonios Chatzipavlis
 
PDF
Modernizing your database with SQL Server 2019
Antonios Chatzipavlis
 
PDF
Designing a modern data warehouse in azure
Antonios Chatzipavlis
 
PDF
SQLServer Database Structures
Antonios Chatzipavlis
 
PDF
Sqlschool 2017 recap - 2018 plans
Antonios Chatzipavlis
 
PDF
Azure SQL Database for the SQL Server DBA - Azure Bootcamp Athens 2018
Antonios Chatzipavlis
 
PDF
Statistics and Indexes Internals
Antonios Chatzipavlis
 
PDF
Implementing Mobile Reports in SQL Sserver 2016 Reporting Services
Antonios Chatzipavlis
 
PDF
Auditing Data Access in SQL Server
Antonios Chatzipavlis
 
PDF
Stretch db sql server 2016 (sn0028)
Antonios Chatzipavlis
 
PDF
Troubleshooting sql server
Antonios Chatzipavlis
 
Data virtualization using polybase
Antonios Chatzipavlis
 
SQL server Backup Restore Revealed
Antonios Chatzipavlis
 
Migrate SQL Workloads to Azure
Antonios Chatzipavlis
 
Machine Learning in SQL Server 2019
Antonios Chatzipavlis
 
Workload Management in SQL Server 2019
Antonios Chatzipavlis
 
Loading Data into Azure SQL DW (Synapse Analytics)
Antonios Chatzipavlis
 
Introduction to DAX Language
Antonios Chatzipavlis
 
Building diagnostic queries using DMVs and DMFs
Antonios Chatzipavlis
 
Exploring T-SQL Anti-Patterns
Antonios Chatzipavlis
 
Designing a modern data warehouse in azure
Antonios Chatzipavlis
 
Modernizing your database with SQL Server 2019
Antonios Chatzipavlis
 
Designing a modern data warehouse in azure
Antonios Chatzipavlis
 
SQLServer Database Structures
Antonios Chatzipavlis
 
Sqlschool 2017 recap - 2018 plans
Antonios Chatzipavlis
 
Azure SQL Database for the SQL Server DBA - Azure Bootcamp Athens 2018
Antonios Chatzipavlis
 
Statistics and Indexes Internals
Antonios Chatzipavlis
 
Implementing Mobile Reports in SQL Sserver 2016 Reporting Services
Antonios Chatzipavlis
 
Auditing Data Access in SQL Server
Antonios Chatzipavlis
 
Stretch db sql server 2016 (sn0028)
Antonios Chatzipavlis
 
Troubleshooting sql server
Antonios Chatzipavlis
 

Recently uploaded (20)

PDF
A GraphRAG approach for Energy Efficiency Q&A
Marco Brambilla
 
PDF
The European Business Wallet: Why It Matters and How It Powers the EUDI Ecosy...
Lal Chandran
 
PDF
apidays Singapore 2025 - Trustworthy Generative AI: The Role of Observability...
apidays
 
PPTX
apidays Helsinki & North 2025 - API access control strategies beyond JWT bear...
apidays
 
PDF
Research Methodology Overview Introduction
ayeshagul29594
 
PDF
apidays Singapore 2025 - From API Intelligence to API Governance by Harsha Ch...
apidays
 
PPTX
Feb 2021 Ransomware Recovery presentation.pptx
enginsayin1
 
PPTX
apidays Helsinki & North 2025 - APIs at Scale: Designing for Alignment, Trust...
apidays
 
PDF
JavaScript - Good or Bad? Tips for Google Tag Manager
📊 Markus Baersch
 
PPTX
BinarySearchTree in datastructures in detail
kichokuttu
 
PDF
apidays Singapore 2025 - Streaming Lakehouse with Kafka, Flink and Iceberg by...
apidays
 
PDF
OOPs with Java_unit2.pdf. sarthak bookkk
Sarthak964187
 
PDF
1750162332_Snapshot-of-Indias-oil-Gas-data-May-2025.pdf
sandeep718278
 
PDF
Development and validation of the Japanese version of the Organizational Matt...
Yoga Tokuyoshi
 
PPTX
apidays Singapore 2025 - The Quest for the Greenest LLM , Jean Philippe Ehre...
apidays
 
PPTX
Aict presentation on dpplppp sjdhfh.pptx
vabaso5932
 
PPTX
Powerful Uses of Data Analytics You Should Know
subhashenia
 
PDF
Data Science Course Certificate by Sigma Software University
Stepan Kalika
 
PDF
NIS2 Compliance for MSPs: Roadmap, Benefits & Cybersecurity Trends (2025 Guide)
GRC Kompas
 
PPTX
03_Ariane BERCKMOES_Ethias.pptx_AIBarometer_release_event
FinTech Belgium
 
A GraphRAG approach for Energy Efficiency Q&A
Marco Brambilla
 
The European Business Wallet: Why It Matters and How It Powers the EUDI Ecosy...
Lal Chandran
 
apidays Singapore 2025 - Trustworthy Generative AI: The Role of Observability...
apidays
 
apidays Helsinki & North 2025 - API access control strategies beyond JWT bear...
apidays
 
Research Methodology Overview Introduction
ayeshagul29594
 
apidays Singapore 2025 - From API Intelligence to API Governance by Harsha Ch...
apidays
 
Feb 2021 Ransomware Recovery presentation.pptx
enginsayin1
 
apidays Helsinki & North 2025 - APIs at Scale: Designing for Alignment, Trust...
apidays
 
JavaScript - Good or Bad? Tips for Google Tag Manager
📊 Markus Baersch
 
BinarySearchTree in datastructures in detail
kichokuttu
 
apidays Singapore 2025 - Streaming Lakehouse with Kafka, Flink and Iceberg by...
apidays
 
OOPs with Java_unit2.pdf. sarthak bookkk
Sarthak964187
 
1750162332_Snapshot-of-Indias-oil-Gas-data-May-2025.pdf
sandeep718278
 
Development and validation of the Japanese version of the Organizational Matt...
Yoga Tokuyoshi
 
apidays Singapore 2025 - The Quest for the Greenest LLM , Jean Philippe Ehre...
apidays
 
Aict presentation on dpplppp sjdhfh.pptx
vabaso5932
 
Powerful Uses of Data Analytics You Should Know
subhashenia
 
Data Science Course Certificate by Sigma Software University
Stepan Kalika
 
NIS2 Compliance for MSPs: Roadmap, Benefits & Cybersecurity Trends (2025 Guide)
GRC Kompas
 
03_Ariane BERCKMOES_Ethias.pptx_AIBarometer_release_event
FinTech Belgium
 

Dynamic data masking sql server 2016

  • 3. SQLschool.gr Team Antonios Chatzipavlis SQL Server Evangelist • Trainer Vassilis Ioannidis SQL Server Expert • Trainer Fivi Panopoulou System Engineer • Speaker Sotiris Karras System Engineer • Speaker
  • 7. Presentation Content  Introducing Dynamic Data Masking  Using Dynamic Data Masking  DDM on Azure  Some points to keep
  • 9. • Protect sensitive data and personally identifiable information • Regulatory Compliance • Expose sensitive data only on a need-to-know basis • Custom obfuscation in application, views or third party solutions are used to address this need The Need
  • 10. Dynamic Data Masking in SQL Server 2016 • Built-in feature for SQL Server 2016 and Azure SQL DB • Data masked on the fly when queried, underlying data do not change • Control on how the data appear in the result set  Dynamic data masking is a data protection feature that masks the sensitive data in the result set of a query over chosen database fields
  • 11. • Protects against unauthorized disclosure of sensitive data in the application • Very simple to configure and use • Does not require changes in application code • Centralized masking logic Benefits
  • 12. • “Dynamic data masking does not aim to prevent database users from connecting directly to the database and running exhaustive queries that expose pieces of the sensitive data” • It is not a method for physical data encryption • It is complementary to other SQL Server security features Keep in mind
  • 13. Using Dynamic Data Masking  Steps  Masking Functions  Permissions  System view information
  • 15. • Decide which columns need to be masked • Choose the masking function that best fits your needs for each column • Alter columns to add the masking rules • The underlying data is unaffected • Designate which users should see masked data and configure the permissions. Steps
  • 16. Default Masking Functions Data Type Family Masked Data String XXXX Numeric 0 Date and Time 01.01.1900 00:00:00.0000000 Binary 0 ALTER COLUMN ColumnName ADD MASKED WITH (FUNCTION = 'default()') Full masking according to the data types of the designated fields.
  • 17. Email Masking Functions ALTER COLUMN ColumnName ADD MASKED WITH (FUNCTION = ‘email()') Exposes the first letter of an email address and the constant suffix ".com", in the form of an email address. [email protected]
  • 18. Random Masking Functions ALTER COLUMN ColumnName ADD MASKED WITH (FUNCTION = 'random([start range], [end range])') A random masking function for use on any numeric type to mask the original value with a random value within a specified range.
  • 19. Custom String (Partial) Masking Functions ALTER COLUMN ColumnName ADD MASKED WITH (FUNCTION = ‘partial(prefix,[padding],suffix)’ Exposes the first and last letters and adds a custom padding string in the middle • Phone: partial(4,”XXXXXXXXXXX”,0) • Credit Card: partial(0,”XXXX-XXXX-XXXX-”,4) • Email: partial(1,”xxxx@xxxx.”,2)
  • 20. • To retrieve the original data the user must have the UNMASK permission • To add, replace, remove masking of existing columns ALTER ANY MASK permission • The CONTROL permission on the database includes both the ALTER ANY MASK and UNMASK permission ! Users without UNMASK but with UPDATE permission can still update data. Permissions
  • 21. system view to query for table-columns that have a dynamic data masking function applied to them • Simlar to sys.columns view • is_masked • masking_function sys.masked_columns
  • 22. Dynamic Data Masking in Action
  • 24. Azure Set up DDM using Azure Portal • Define users excluded from masking • Define Masking rules • Designated fields and masking functions for each one There is a recommendations engine that proposes potentially sensitive fields to mask
  • 25. Azure Default Full Masking according to the datatypes Credit card XXXX-XXXX-XXXX-1234 Social Security number XXX-XX-1234 Email [email protected] Random Number Random number between selected boundaries Custom Text Prefix, Padding String, Suffix
  • 26. Some points to keep  Limitations and Restrictions  Considerations  Performance
  • 27. • Not compatible with Always Encrypted columns • Not compatible with File Stream • Not compatible with Column set • A column with data masking cannot be a key for a FULLTEXT index. • Masking rule cannot be defined on a computed column Limitations and Restrictions
  • 28. • Dynamic Data Masking is applied when running SQL Server Import and Export • Dynamic Data Masking is applied when using SELECT INTO or INSERT INTO to copy data from a masked column • Be careful with updates Considerations
  • 29. Minimal Performance Impact Data masking is performed right before the data is returned. Performance SELECT * FROM Person.EmailAddress;
  • 32. S E L E C T K N O W L E D G E F R O M S Q L S E R V E R Copyright © 2015 SQLschool.gr. All right reserved. PRESENTER MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION