Ask the Expert

Depersonalizing data

We want to depersonalize our data when we copy it from a production environment to a test environment. This is for privacy and security reasons. We have made a batch program that is able to change data from a flat file. We use it on unloads of DB2 production databases and, afterwards, we are able to load the data into test databases. But Oracle only has the extract facility, which delivers binary files. Is there a similar way to do this or is there any other way to depersonalize data in a standard way?

    Requires Free Membership to View

Oracle's export utility creates a dump of data in a proprietary binary format. However, you can still create flat files from the Oracle database, but not with the export utility. You can use SQL*Plus as follows:
set echo off
set heading off
set feadback off
set pagesize 0
spool flat_file.txt
select col_A||','||col_B||','||col_C||','||col_D
from my_table;
spool off

The other option is to use Oracle's DBMS_UTILITY.TABLE_TO_COMMA supplied procedure. It assists in making comma-delimited flat files.

This was first published in November 2003

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: