Masking,replacing Sensitive data in SQL 2008

  • when prod db is restored in test server, i have to hide/replace sensitive fields (name, phone etc)

    Is it doable in SQL 2008 and SQL 2012?

  • Sure. Run update statements to make the required data changes.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • masking is not available in the sense that Oracle provides, as said already, just provide update scripts to obfuscate the tables

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • There will be a way to do this in SQL Server 2016 (and it's already there in Azure SQL Database). Otherwise, no, it's write update statements or look to a third party tool to help out. SQL Data Generator from Redgate (my employer) can do data masking.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • To confirm, Encryption (using master certificate) is only for protecting/securing the data, but it does not obfuscate it i.e, changing the values from AAA to BBB.

  • balasach82 (10/8/2015)


    To confirm, Encryption (using master certificate) is only for protecting/securing the data, but it does not obfuscate it i.e, changing the values from AAA to BBB.

    That's right. Encryption of a database means that the data is encrypted prior to writing to disk so that even if someone gets ahold of your .mdb file, they can't read the information. That's completely different than masking, which is either showing 'AAA' as 'BBB' or changing 'AAA' to 'BBB'.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply