Binary Data

The simplest way to populate your database with test data.

Binary Data

Postby rodmusser » Wed Jan 26, 2011 8:02 pm

We use encrypted columns to store sensitive data (e.g. SSN, birthdates, etc). These columns are defined as varbinary types. How can I generate binary data so that they are functionally correct? For example, all SSN need to be 9 digits.
Posts: 1
Joined: Wed Jan 26, 2011 7:48 pm

Postby james.billings » Fri Jan 28, 2011 10:36 am

The Binary generator will generate random values between 0 and the max as defined for the column by default. So a varbinary(50) column would end up with data randomly between those minimum and maximum lengths.

You can set these figures manually, so for your SSN column, you could set both Min Length and Max Length to 9.

If you need the binary values to be generated in a specific way to emulate your encryption routines however, you'll probably need to write a custom generator. You'll find some examples in:

C:\\Program Files (x86)\\Red Gate\\SQL Data Generator 1\\UserExample\\Generator

(omit the (x86) if you're on a 32-bit OS)

And also some information on our website here
Posts: 1120
Joined: Wed Jun 16, 2010 11:10 am
Location: Red Gate

Return to SQL Data Generator Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests