Encrypted Columns

The simplest way to populate your database with test data.

Moderators: JonathanWatts, David Atkinson, Anu Deshpande, Michelle Taylor, Lionel, Emma A, sherr

Encrypted Columns

Postby Matt_F » Sat Jun 23, 2012 7:24 pm

Is it possible to generate data for encrypted columns where the data has been encrypted using SQL Server symmetric keys?

For example, could realistic data be generated and then encrypted using the specified symmetric key for FirstName and Surname columns in a customer table.

I think this may be possible using a custom generator, however I can't see how I could specify the symmetric key to be used.
Matt_F
 
Posts: 2
Joined: Sat Jun 23, 2012 7:17 pm

Postby Chris Auckland » Mon Jun 25, 2012 8:54 pm

I might have misunderstood, but if you generate data for a encrypted column, then as long as the account that you use to generate the data has access to the key and certificate then the newly inserted data would be encrypted.

However, I haven't really played around with encrypted columns, so I don't know that this is definitely correct.

If you manually insert a row to you encrypted column, is it automatically encrypted, or does it only encrypt if you insert in a certain way?
Chris
Chris Auckland
 
Posts: 757
Joined: Tue Oct 24, 2006 2:12 pm
Location: Red Gate Software Ltd.

Postby Matt_F » Tue Jun 26, 2012 9:03 am

Thanks for the reply Chris.

The data is only encrypted when inserted through a stored procedure which takes the incoming parameters, encrypts the data and then inserts.
Matt_F
 
Posts: 2
Joined: Sat Jun 23, 2012 7:17 pm

Postby Chris Auckland » Fri Jun 29, 2012 11:38 am

Sorry for the delay.

You're right then; I think this could only be done through a custom generator.

You might be able to do it with a SQL Statement generator pulling the unencrypted data from another table and then inserting it thought the sp, but I haven't ever tried it myself.
Chris
Chris Auckland
 
Posts: 757
Joined: Tue Oct 24, 2006 2:12 pm
Location: Red Gate Software Ltd.


Return to SQL Data Generator 2

Who is online

Users browsing this forum: No registered users and 0 guests