If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > How to mask a DB2 column while extracting production data.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-02-06, 15:48
arunasanjeev arunasanjeev is offline
Registered User
 
Join Date: Feb 2006
Posts: 1
How to mask a DB2 column while extracting production data.

Hi,
I want to know how to mask a DB2 column while extracting production data. For this what kind of SQL I can use. Actually we want to copy some production data into a test region and some secured columns like SSN, bank account numbers should be masked before we load the data into test region. Appreciate the help!!

Thanks.
Reply With Quote
  #2 (permalink)  
Old 02-02-06, 16:12
faar faar is offline
Registered User
 
Join Date: Apr 2005
Posts: 14
hi ,
If you're using export/import command in order to migrate data from prod to test systems, you can use any sql function you like.
For example:
db2 export to file.ixf of ixf messages file.msg select a,b,substr(c,1,4)||'****'||substr(c,8,4) from table_name

will create a file which has only first and last 4 chars of c columns and stars(*) in between them.

then you can import this file into the test system as
db2 IMPORT FROM file.ixfl OF ixf MESSAGES mes.msg
CREATE INTO table_name IN tablespace_name;

this will create a new table.But there are also other options in import which you can find from the db documentation.
Reply With Quote
  #3 (permalink)  
Old 03-18-09, 12:10
rbarbour rbarbour is offline
Registered User
 
Join Date: Mar 2009
Posts: 1
Hi,

Just to update this thread, DB2 z/OS users can use the fast database copy utility BCV5 with the Data Masking option turned on for particular fields/columns. The advantage is masking / anonymizing sensitive data at high speed. BCV5 saves CPU and wall clock time as it does the copy and mask in one pass compared slower multiple step/pass procedures. See ESAi's website www.esaigroup.com for more details.

Thanks,
Rob
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On