Dynamic Data Masking in SQL server | Security feature in SQL server 2016 | Ms SQL

Published: 03 June 2022
on channel: Right to Learn @BK
8k
138

Want to hide sensitive information from unauthorized users ??
Then you are at the right place. Please do watch this video and learn how to do it.

::A security feature introduced in SQL Server 2016 that limits the access of unauthorized users to sensitive data.
:: This feature requires no coding effort from the application side or encrypting or applying any change to the actual data.
:: We have 4 main types of masking functions.

select * from customer

--** DEFAULT **---

alter table customer
alter column DOB date masked with (function = 'default()')

--** EMAIL **---
alter table customer
alter column email varchar(40) masked with (function = 'email()')


--** PARTIAL **---
alter table customer
alter column Card_number varchar (30) masked with (function = 'partial(2,"xx-xxxx-xxxx-",4)')


--** RANDOM **---
alter table customer
alter column mobile_no bigint masked with (function = 'random(111,999)')

--** To view masking function of a Column in a table **--
select OBJECT_NAME(OBJECT_ID) Tablename, name as Column_Name, is_masked, masking_function
from sys.masked_columns
order by Tablename, Column_Name


--** REMOVE MASKED on any Column **--
alter table customer
alter column first_name drop masked

--** Grant Access to view Masked Rows **--
Grant unmask to mask_test

--** Revoke Access to view Masked Rows **--
Revoke unmask to mask_test



Dynamic Data Masking(Ms Docs)


Watch video Dynamic Data Masking in SQL server | Security feature in SQL server 2016 | Ms SQL online without registration, duration 20 minute 11 second in high hd quality. This video was added by user Right to Learn @BK 03 June 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 8 thousand once and liked it 138 people.