Back to results for “Security”
SQL Server › Dynamic Data Masking

How do you remove dynamic data masking from a column once it is no longer needed?

Intermediate

Answer

You use an ALTER TABLE statement with the ALTER COLUMN clause and the DROP MASKED option, which removes the masking function from that column so all users with normal query permission will once again see the real, unmasked value.
ALTER TABLE Customers
ALTER COLUMN Email DROP MASKED;
Real-world example A team removes dynamic data masking from an internal test database's email column, since the fake test data in that specific environment does not need to be protected the way real production customer data does.

Common follow-ups: Should test and development environments typically use the same masking rules as production?;What happens to existing UNMASK permissions after masking is removed from a column?