

#Random data generator sql how to#
Note: As I was setting up the second try, I had a feeling I would be doing this again, so I took screenshots to create a step by step guide so I could remember how to do this after a couple of months. I was happy to find out SQL Data Generator supports that scenario. I fired back up SQL Data Generator with the hope it could do that. Random data serves no purpose it needs context. I can see their point it helps with their testing. People want the data to match production, but with all the PII data scrubbed. Side Note: What's funny is no matter where I work this is the most requested item. What they wanted was production data but with all the Personally Identifiable Information (PII) randomized. SQL Data Generator worked as advertised, but it didn't meet our needs.
#Random data generator sql manual#
Another person doing the testing was hoping to use the same data set to do some manual testing. The person working on the load test told me his tests weren't going to be testing as close to production as possible. SQL Data Generator kicked off and about 10 minutes later I had a database full of data. I started up SQL Data Generator, pointed it at the database, told it to create a lot of random data, with the volume of data between a couple of hundred rows and a couple of million rows. The min and max possible value (for dates and numbers).Percentage of Null Entries (if null is allowed).SQL Data Generator will see that column name and populate that column with a set of predefined first names.įor each table SQL Data Generator allows you to control how much data is generated. Chances are you probably have a column in your database called FirstName or NameFirst. If the name matches a rule, it will instead generate pre-defined data. SQL Data Generator also looks at the column names and compares that against a rules engine. But the folks over at Redgate have thought that through. Random strings, such as AG4f3dks, are typically not very helpful. If the column is a varchar, it will generate random strings. If the column is a date, it will generate random date data. How it works is it reads the schema of the database and determines the type of data needed. Redgate's SQL Data Generator was written for this very scenario, generating data for testing. Rather than use production data, I thought this would be a good opportunity to try out Redgate's SQL Data Generator Tool. A request such as this came across my desk this week for a load test. Typically this is for two reasons, they want the volume of data to match production, or the "fake" data doesn't make any sense. At some point during the development lifecycle someone, be it a developer, QA, or a business owner, asks for "real" data to test against.
