Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 831
  • Last Modified:

Masking columns in SQL server 2005

I am looking for guidance in Masking 10 columns in the Database of SQL Server 2005.My criteria is to maintain the same lenght of the fields in the columns after masking. I would like to mask with the ###### and please let me know where to start.  
0
Govinda2020
Asked:
Govinda2020
  • 4
  • 3
  • 2
1 Solution
 
chapmandewCommented:
why?
0
 
chapmandewCommented:
0
 
David L. HansenProgrammer AnalystCommented:
That is not usually done in database management; the applications using the data is usually responsible for masking.  You can declare your table's fields to be specific datatypes of course and I guess if you wanted to store numeric data as strings you could restrict the length by only allowing 6 characters but that is a bit of a hack because let's face it...you want to store numeric data and you should treat the data for what it is.  Anyway, think about why you want to do this and I'm sure we can all come up with a better solution that masking in the database for sure.
0
Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

 
Govinda2020Author Commented:
We have to mask the database as it contains customer data and sensitive data. The main purpose we have to copy live data to test environment. So we want to mask the relevant data without losing the relationship of the database.  So we wan to mask customer name, customer address and so on , the only requirement is to mask the data and there is no need for any encryption. Can you provide any sample SQL that can be use to mask a column and i will work on from them.
0
 
David L. HansenProgrammer AnalystCommented:
This is a common need.  Basically, if you have users that should not see the sensative data, don't let them use SQL Server to access the information in the database directly.  Your applications should mask/hide and otherwise protect and/or verify data going-in and coming-out of the database.   I hope that does not sound condescending in anyway...apologies if I'm coming off patronizing, but protecting your data is very important and the database simply HOLDS it.  Accomodating non-IT type users in viewing or especially in manipulating data is for applications, not for database management tools.
0
 
Govinda2020Author Commented:
Yeah you are correct, I am IT guy having access to Database and they do'nt want me to look at the data and even the reports and viewing the data in the applicaiton by users (non-IT) should not see the data. So I think the best option is to mask those senstive columns. Hope you understand where I am coming for. Please let me know if i can start if with sample SQL masking code to be done on one column in the database.
0
 
David L. HansenProgrammer AnalystCommented:
0
 
David L. HansenProgrammer AnalystCommented:
0
 
Govinda2020Author Commented:
Thanks sl8rz , I will try them and give you shout if I have anything
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 4
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now