07 November 2019

SQL Server Dynamic data masking (2016 feature)

SQL Server Dynamic data masking is available in four different formats based on the data types.

Default- Fully masked data as per the data types of the selected fields.
ALTER COLUMN City ADD MASKED WITH (FUNCTION = 'default()')

Email – Using this method we can apply masking on the email data of the users.
ALTER COLUMN Email ADD MASKED WITH (FUNCTION = 'email()')

Custom String – As per the name, this method can be used to mask the starting characters and last characters as per the custom requirement.
ALTER COLUMN [Mobile Number] ADD MASKED WITH (FUNCTION = 'partial(1,"XXXXXXX",0)')

Random – This function is used to replace number columns with random values.

ALTER COLUMN [OrdrerNO] ADD MASKED WITH (FUNCTION = 'random(1, 5)')

No comments:

Post a Comment

Resource Governor

Resource Governor  is a feature that you can use to manage SQL Server workload and system resource consumption. Resource Governor enables y...