azureazure-sql-databasedata-masking

Social security number format missing under masking field format


I implemented the dynamic data masking in my current project, for that I created the Azure SQL database and table. After that I went to dynamic data masking option in azure portal, then click on dynamic data masking option it will open snapshot like this below figure.

enter image description here

But in the above image there is no social security number format under masking field format.

How can I see the social security number format under masking field format option?


Solution

  • After did R & D on how to mask the social security number in azure SQL database. I think Dynamic data masking provides for four different built in masking functions (default, Email, Custom String, and Random) see the below for more information.

    SQL Server 2016 New Features: Security and Encryption

    https://www.teamscs.com/2016/01/sql-server-2016-new-features-security-encryption/

    That’s why we are not able see the social security number format under masking filed format option in Azure Portal.

    So, I followed below link to implement the above concept.

    Dynamic Data Masking

    https://msdn.microsoft.com/en-us/library/mt130841.aspx

    For Example:-

     ALTER TABLE [dbo].[CustomerTables]
     ALTER COLUMN [SSN] ADD MASKED WITH (FUNCTION = 'partial(0,"XXX-XX-",4)');
    

    Pradeep