Binary Data

rodmusserrodmusser Posts: 2
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.

Comments

  • 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
    Systems Software Engineer

    Redgate Software

Sign In or Register to comment.