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)
Смотрите видео Dynamic Data Masking in SQL server | Security feature in SQL server 2016 | Ms SQL онлайн без регистрации, длительностью 20 минут 11 секунд в хорошем hd качестве. Это видео добавил пользователь Right to Learn @BK 03 Июнь 2022, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 8 тысяч раз и оно понравилось 138 людям.